about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/instance.rs
AgeCommit message (Collapse)AuthorLines
2021-03-27lazily calls some fnsklensy-3/+4
2021-03-23Add has_default to GenericParamDefKind::Constkadmin-1/+1
This currently creates a field which is always false on GenericParamDefKind for future use when consts are permitted to have defaults Update const_generics:default locations Previously just ignored them, now actually do something about them. Fix using type check instead of value Add parsing This adds all the necessary changes to lower const-generics defaults from parsing. Change P<Expr> to AnonConst This matches the arguments passed to instantiations of const generics, and makes it specific to just anonymous constants. Attempt to fix lowering bugs
2021-03-04TypoOli Scherer-1/+1
2021-02-14param_env debugs are instrumental to rustc's successEllen-1/+1
2021-02-13debug!("paramenv={}paramenv={}paramenv={}paramenv={}")Ellen-0/+1
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2020-11-26Fix new 'unnecessary trailing semicolon' warningsAaron Hill-1/+1
2020-11-16compiler: fold by valueBastian Kauschke-6/+6
2020-11-06inliner: Use substs_for_mir_bodyTomasz Miąsko-2/+25
Changes from 68965 extended the kind of instances that are being inlined. For some of those, the `instance_mir` returns a MIR body that is already expressed in terms of the types found in substitution array, and doesn't need further substitution. Use `substs_for_mir_body` to take that into account.
2020-10-21Lift: take self by valueBastian Kauschke-1/+1
2020-10-15mangling: non-monomorphic `#[rustc_symbol_name]`David Wood-1/+11
This commit adjust `#[rustc_symbol_name]` so that it can be applied to non-monomorphic functions without producing an ICE. Signed-off-by: David Wood <david@davidtw.co>
2020-10-06Rollup merge of #76995 - LingMan:middle_matches, r=varkorYuki Okushi-4/+4
Reduce boilerplate with the matches! macro Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro. Limited to rustc_middle for now to get my feet wet.
2020-10-04Remember the `MirSource` for each `Body`Dylan MacKenzie-1/+2
2020-09-21Reduce boilerplate with the matches! macroLingMan-4/+4
Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro.
2020-09-04shim: monomorphic `FnPtrShim`s during constructionDavid Wood-28/+25
This commit adjusts MIR shim construction so that substitutions are applied to function pointer shims during construction, rather than during codegen (as determined by `substs_for_mir_body`) - as substitutions will no longer occur during codegen, function pointer shims can now be polymorphic without incurring double substitutions. Signed-off-by: David Wood <david@davidtw.co>
2020-09-02Fix some unwanted uses of Debug formatting on user-facing messagesDan Aloni-3/+4
While formatting for user diagnostics used `Display` for all most cases, some small amount of cases used `Debug` instead. Until now, `Display` and `Debug` yielded the same output for many types. However, with path trimming, we want to show a shorter path for the user, these cases need fixing.
2020-08-30mv compiler to compiler/mark-0/+605