about summary refs log tree commit diff
path: root/src/librustc/ty/instance.rs
AgeCommit message (Collapse)AuthorLines
2019-03-24Merge `DefPathData::VariantCtor` and `DefPathData::StructCtor`Vadim Petrochenkov-2/+1
2019-03-24Separate variant id and variant constructor id.David Wood-2/+1
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
2019-03-15rustc: slice substs in ty::print instead of passing the full ones.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.Eduard-Mihai Burtescu-4/+5
2019-03-15rustc: don't thread existential projections through path_generic_args.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: make util::ppaux private.Eduard-Mihai Burtescu-2/+7
2019-03-15rustc: explicitly pass the namespace to PrintCx::parameterized.Eduard-Mihai Burtescu-1/+2
2019-03-15rustc: tie the 'tcx between Print and PrintCx in ty::print.Eduard-Mihai Burtescu-1/+1
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-2/+3
2019-02-27Rename variadic to c_variadicDan Robertson-1/+1
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-6/+6
2019-02-10rustc: doc commentsAlexander Regueiro-6/+6
2019-02-05move librustc to 2018Mark Mansi-6/+6
2019-01-27Update generator transform and generated function signatureWim Looman-0/+5
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-03pass the parameter environment to `traits::find_associated_item`Ariel Ben-Yehuda-2/+3
dropping the param-env on the floor is obviously the wrong thing to do. The ICE was probably exposed by #54490 adding the problem-exposing use of `traits::find_associated_item`. Fixes #55380.
2018-11-17Don't auto-inline `const fn`Oliver Scherer-4/+1
2018-11-03Auto merge of #55101 - alexreg:trait-aliases, r=nikomatsakisbors-1/+3
Implement trait aliases (RFC 1733) Extends groundwork done in https://github.com/rust-lang/rust/pull/45047, and fully implements https://github.com/rust-lang/rfcs/pull/1733. CC @durka @nikomatsakis
2018-11-03Shift both late bound regions and bound typesscalexm-1/+1
2018-11-03Added support for trait aliases as bounds.Alexander Regueiro-1/+3
2018-10-24Move codegen_llvm::common::ty_fn_sig into rustc::ty::Instance.Masaki Hara-1/+62
2018-10-24Add vtable-shim helper methods for Instance.Masaki Hara-0/+27
2018-10-24Add InstanceDef::VtableShim.Masaki Hara-0/+7
2018-10-05Auto merge of #54743 - ljedrz:cleanup_ty_p2, r=zackmdavisbors-15/+16
Cleanup rustc/ty part 2 The second part of cleanups and minor improvements for rustc/ty. - improve allocations - calculate span after a possible early continue - simplify some patterns - mark a comment as FIXME - whitespace fixes The PR is independent from from the first part.
2018-10-03Poke in the dark and see if bors+windows stops screamingOliver Schneider-1/+3
2018-10-03rustc/ty: whitespace fixesljedrz-15/+16
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-1/+1
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-08-22Remove Ty prefix from ↵varkor-1/+1
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-07Avoid unnecessary pattern matching against Option and Resultljedrz-1/+1
2018-05-21rustc: make mk_substs_trait take &[Kind] instead of &[Ty].Eduard-Mihai Burtescu-2/+1
2018-05-17Rename trans to codegen everywhere.Irina Popa-8/+8
2018-05-08Store the GeneratorInterior in the new GeneratorSubstsJohn Kåre Alsaker-5/+4
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-1/+1
2018-03-13`trans_apply_param_substs` => `subst_and_normalize_erasing_regions`Niko Matsakis-2/+10
Consolidate `trans_apply_param_substs` and `trans_apply_param_substs_env`. Also remove `trans_impl_self_ty`
2018-03-13transition various normalization functions to the new methodsNiko Matsakis-1/+1
In particular: - `fully_normalize_monormophic_ty` => `normalize_erasing_regions` - `normalize_associated_type_in_env` => `normalize_erasing_regions` - `fully_normalize_associated_types_in` => `normalize_erasing_regions` - `erase_late_bound_regions_and_normalize` => `normalize_erasing_late_bound_regions`
2018-03-13refactor `ParamEnv::empty(Reveal)` into two distinct methodsNiko Matsakis-1/+1
- `ParamEnv::empty()` -- does not reveal all, good for typeck - `ParamEnv::reveal_all()` -- does, good for trans - `param_env.with_reveal_all()` -- converts an existing parameter environment
2018-03-08Add a variant to ConstVal for storing miri resultsOliver Schneider-2/+2
2018-03-06Add `inline` to `TransFnAttrs`Wesley Wiser-3/+2
Part of #47320
2018-02-23Introduce UnpackedKindvarkor-4/+1
This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker should catch more potential issues.
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-1/+1
2017-12-18normalize the results of `tcx.type_of` after substitutingAriel Ben-Yehuda-6/+1
Also remove `def_ty`, which was a footgun because it did not do the above.
2017-12-18Test with trans_apply_param_substsMaik Klein-1/+2
2017-12-18Move instance related methods from TyCtxt to InstanceMaik Klein-0/+36
2017-12-18Move common.rs functionality into TyCtxtMaik Klein-0/+9
2017-12-11Merge remote-tracking branch 'origin/master' into miriOliver Schneider-2/+2
2017-12-07make `fn_sig().subst()` ICE when used with a closureNiko Matsakis-2/+2
It's inefficient, and the substitution there doesn't account for the extra regions used by NLL inference, so it's a bad thing to encourage. As it happens all callers already know if they have a closure or not, from what I can tell.
2017-12-06Update miri to rustc changesOliver Schneider-1/+211
2017-11-18stop using the `closure_kinds` query / table for anythingNiko Matsakis-1/+1
Closure Kind is now extracted from the closure substs exclusively.
2017-11-05Fix MIR inlining panic in generic functionsinkuu-1/+1