summary refs log tree commit diff
path: root/src/librustc/ty/instance.rs
AgeCommit message (Collapse)AuthorLines
2019-10-11resolve_for_fn_ptr checks that the instance is an Item before returning shim.Adam Perry-10/+12
2019-10-10Instance::resolve_for_fn_ptr unconditionally resolves first.Adam Perry-9/+13
Per review feedback.
2019-10-10Improve docs for InstanceDef::ReifyShim.Adam Perry-1/+4
2019-10-09Clarify comment, dedupe match arms in shim.rs.Adam Perry-1/+3
Also add a missing terminal newline to a test.
2019-10-09Return ReifyShim from Instance::resolve_for_fn_ptr when track_caller present.Adam Perry-2/+2
This ICEs in MIR currently, which I think is to be expected since none of the MIR plumbing is set up. I added a test which confirms that the shim is being used for reifying a track_caller function.
2019-10-09Reifying callers of Instance::resolve use resolve_for_fn_ptr.Adam Perry-6/+3
2019-10-09Add Instance::resolve_for_fn_ptrAdam Perry-1/+23
2019-10-09Add InstanceDef::ReifyShim for track_caller functions.Adam Perry-0/+7
2019-10-04remove GeneratorSubsts visitorscsmoe-1/+1
2019-10-04generate GeneratorSubsts from SubstsRefcsmoe-1/+1
2019-10-03generate ClosureSubsts from SubstsRefcsmoe-6/+6
2019-09-29clean ClosureSubsts in rustc::tycsmoe-2/+2
2019-09-27Remove global_tcx from TyCtxtMark Rousskov-1/+1
The non-global context was removed; there's only one context now. This is a noop method that only serves to confuse readers -- remove it.
2019-09-25Rename `sty` to `kind`varkor-2/+2
2019-08-28Add Option<Span> to `require_lang_item`Yuki Okushi-1/+1
2019-08-11Remove `is_self` and `has_self_ty` methodsMatthew Jasper-2/+3
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-14/+14
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-31/+20
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-13/+13
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-6/+6
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-13/+13
2019-06-11Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-4/+4
2019-06-11rustc: deny(unused_lifetimes).Eduard-Mihai Burtescu-1/+1
2019-06-02deduplicate ty::Instance constructorsMark Mansi-27/+38
2019-05-26Rename "Associated*" to "Assoc*"Andrew Xu-2/+2
We are going to uniform the terminology of all associated items. Methods that may or may not have `self` are called "associated functions". Because `AssociatedFn` is a bit long, we rename `Associated` to `Assoc`.
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