about summary refs log tree commit diff
path: root/src/librustc_ty/ty.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-520/+0
2020-08-13merge `as_local_hir_id` with `local_def_id_to_hir_id`Bastian Kauschke-5/+5
2020-08-08fix clippy::into_iter_on_ref: use .iter() instead of into_iter() on references.Matthias Krüger-1/+1
2020-07-31Auto merge of #65989 - Aaron1011:fix/normalize-param-env, r=nikomatsakisbors-0/+5
Normalize all opaque types when converting ParamEnv to Reveal::All When we normalize a type using a ParamEnv with a reveal mode of RevealMode::All, we will normalize opaque types to their underlying types (e.g. `type MyOpaque = impl Foo` -> `StructThatImplsFoo`). However, the ParamEnv may still have predicates referring to the un-normalized opaque type (e.g. `<T as MyTrait<MyOpaque>>`). This can cause trait projection to fail, since a type containing normalized opaque types will not match up with the un-normalized type in the `ParamEnv`. To fix this, we now explicitly normalize all opaque types in caller_bounds of a `ParamEnv` when changing its mode to `RevealMode::All`. This ensures that all predicatse will refer to the underlying types of any opaque types involved, allowing them to be matched up properly during projection. To reflect the fact that normalization is occuring, `ParamEnv::with_reveal_all` is renamed to `ParamEnv::with_reveal_all_normalized` Fixes #65918
2020-07-27introduce PredicateAtomBastian Kauschke-9/+9
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-2/+2
2020-07-27split ignore_qualifiersBastian Kauschke-9/+8
2020-07-22Normalize opaque types when converting `ParamEnv` to `Reveal::All`Aaron Hill-0/+5
Fixes #65918
2020-07-05Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.Eduard-Mihai Burtescu-1/+1
2020-06-20Move bounds on associated types to the typeMatthew Jasper-15/+42
Given `trait X { type U; }` the bound `<Self as X>::U` now lives on the type, rather than the trait. This is feature gated on `feature(generic_associated_types)` for now until more testing can be done. The also enabled type-generic associated types since we no longer need "implies bounds".
2020-06-20Consider fewer predicates for projection candidatesMatthew Jasper-1/+104
We now require that projection candidates are applicable with the idenitity substs of the trait, rather than allowing predicates that are only applicable for certain substs.
2020-06-15make all uses of ty::Error or ConstKind::Error delay a span bugmark-1/+1
2020-06-11Remove associated opaque typesMatthew Jasper-2/+0
They're unused now.
2020-05-20make `to_predicate` take a `tcx` argumentNiko Matsakis-1/+1
2020-05-12Remove ty::UnnormalizedProjectionJack Huey-2/+0
2020-05-07Reintegrate chalk using chalk-solveJack Huey-2/+5
2020-05-02fix rustdoc warningsTshepang Lekhonkhobe-1/+1
2020-04-28Move a few queries to using an arena.Camille GILLOT-1/+1
2020-04-28Use the query system to allocate.Camille GILLOT-2/+2
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-5/+5
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-10/+10
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-9/+9
2020-04-14Auto merge of #70643 - Rustin-Liu:rustin-patch-rename, r=eddybbors-4/+4
Rename AssocKind::Method to AssocKind::Fn Part of https://github.com/rust-lang/rust/issues/60163. https://github.com/rust-lang/rust/issues/60163#issuecomment-607284413
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-4/+4
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-13Use `CRATE_HIR_ID` instead of `DUMMY_HIR_ID` when appropriate.marmeladema-1/+1
Those usage ends up forwarded to a `ObligationClause` which uses `CRATE_HIR_ID` for dummy value as seen in `ObligationClause::dummy`.
2020-03-30Use query instead of `impl_is_default` fnJonas Schievink-0/+11
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-3/+3
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-3/+3
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+1
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-2/+1
2020-03-14Make downstream crates compile.Camille GILLOT-1/+1
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-1/+1
2020-03-02Remove chalk integrationCAD97-5/+2
2020-02-19Construct `AssociatedItems` from an iterator instead of a `Vec`Dylan MacKenzie-2/+1
2020-02-19Make lookup of associated item by name O(log n)Dylan MacKenzie-4/+4
2020-02-16Other crates.Camille GILLOT-1/+1
2020-02-12Auto merge of #68679 - matthewjasper:needs-type-op, r=varkorbors-1/+5
Improve `ty.needs_drop` * Handle cycles in `needs_drop` correctly * Normalize types when computing `needs_drop` * Move queries from rustc to rustc_ty * Avoid query in simple cases reopens #65918
2020-02-08Make `associated_items` query return a sliceJonas Schievink-6/+4
2020-02-06Rollup merge of #68837 - jonas-schievink:assoc-item-lookup-2, r=estebankDylan DPC-0/+9
Make associated item collection a query Before this change, every time associated items were iterated over (which rustc does *a lot* – this can probably be further optimized), there would be N+1 queries to fetch all assoc. items. Now there's just one after they've been computed once.
2020-02-05Make associated item lookup a queryJonas Schievink-0/+9
2020-02-02Remove unnecessary features in rustc_tyMatthew Jasper-1/+5
2020-02-02Use more accurate failed predicate spansEsteban Küber-1/+1
2020-01-27don't clone types that are copy, round two.Matthias Krüger-1/+1
2020-01-20Add `ConstnessAnd` that implements `ToPredicate`Dylan MacKenzie-1/+2
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-4/+4
2020-01-13Move to new crate rustc_ty.Camille GILLOT-0/+369