about summary refs log tree commit diff
path: root/src/librustc_middle/traits
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-2060/+0
2020-08-18Provide better spans for the match arm without tail expressionWonwoo Choi-0/+1
2020-08-14Rework `rustc_serialize`Matthew Jasper-12/+12
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-07fix clippy::iter_next_slice: use .get(0) instead of .iter().next()Matthias Krüger-1/+1
2020-08-02Use Lift derive proc-macro in librustc_traits.Camille GILLOT-238/+20
2020-08-02Move IntercrateAmbiguityCause to librustc_trait_selection.Camille GILLOT-41/+0
2020-08-02Introduce an abstraction for EvaluationCache and SelectionCache.Camille GILLOT-50/+8
2020-07-22Use `ty::Instance::resolve` to identify `'static` bound sourceEsteban Küber-2/+22
2020-07-22Increase accuracy of lifetime bound on trait object impl suggestionEsteban Küber-0/+3
2020-07-19do not try fetching the ancestors of errored trait implsBastian Kauschke-1/+3
2020-07-14Suggest boxing or borrowing unsized fieldsEsteban Küber-1/+4
2020-07-14Suggest borrowing unsized argument typesEsteban Küber-2/+2
2020-06-24Update ChalkJack Huey-0/+2
2020-06-21Auto merge of #72936 - jackh726:chalk-more, r=nikomatsakisbors-52/+45
Upgrade Chalk Things done in this PR: - Upgrade Chalk to `0.11.0` - Added compare-mode=chalk - Bump rustc-hash in `librustc_data_structures` to `1.1.0` to match Chalk - Removed `RustDefId` since the builtin type support is there - Add a few more `FIXME(chalk)`s for problem spots I hit when running all tests with chalk - Added some more implementation code for some newer builtin Chalk types (e.g. `FnDef`, `Array`) - Lower `RegionOutlives` and `ObjectSafe` predicates - Lower `Dyn` without the region - Handle `Int`/`Float` `CanonicalVarKind`s - Uncomment some Chalk tests that actually work now - Remove the revisions in `src/test/ui/coherence/coherence-subtyping.rs` since they aren't doing anything different r? @nikomatsakis
2020-06-20int -> i32Bastian Kauschke-13/+15
2020-06-19Change InternedAdtDef to &'tcx AdtDefJack Huey-2/+2
2020-06-19Lower constsJack Huey-1/+2
2020-06-19Remove RustDefIdJack Huey-17/+3
2020-06-19Use builtin types for Never, Array, and FnDefJack Huey-3/+1
2020-06-19Update chalkJack Huey-26/+41
2020-06-19Update chalkJack Huey-6/+1
2020-06-19Add compare-mode=chalk and add a little bit more implementations and fixmesJack Huey-3/+1
2020-06-18Rollup merge of #70551 - mark-i-m:ty-err-2, r=varkorManish Goregaokar-1/+1
Make all uses of ty::Error delay a span bug r? @eddyb A second attempt at https://github.com/rust-lang/rust/pull/70245 resolves https://github.com/rust-lang/rust/issues/70866
2020-06-16Auto merge of #72962 - lcnr:ObligationCause-lrc, r=ecstatic-morsebors-10/+47
store `ObligationCause` on the heap Stores `ObligationCause` on the heap using an `Rc`. This PR trades off some transient memory allocations to reduce the size of–and thus the number of instructions required to memcpy–a few widely used data structures in trait solving.
2020-06-15make all uses of ty::Error or ConstKind::Error delay a span bugmark-1/+1
2020-06-11Remove associated opaque typesMatthew Jasper-15/+2
They're unused now.
2020-06-07use enum to represent ObligationCause::dummy without allocatingBastian Kauschke-10/+9
2020-06-07store `ObligationCause` on the heapBastian Kauschke-10/+48
2020-06-05Rename traits::ImplSourceImpl to ImplSourceUserDefined.Ana-Maria Mihalache-18/+20
2020-06-05Rename traits::Vtable to ImplSource.Ana-Maria Mihalache-132/+131
2020-05-21Auto merge of #70705 - lcnr:generic_discriminant, r=nikomatsakisbors-14/+38
Use `T`'s discriminant type in `mem::Discriminant<T>` instead of `u64`. fixes #70509 Adds the lang-item `discriminant_kind`. Updates the function signature of `intrinsics::discriminant_value`. Adds the *probably permanently unstable* trait `DiscriminantKind`. `mem::Discriminant` should now be smaller in some cases. r? @ghost
2020-05-19auto impl`DiscriminantKind` for every typeBastian Kauschke-0/+20
2020-05-19update select docsBastian Kauschke-14/+18
2020-05-18HIR passes for asm!Amanieu d'Antras-0/+3
2020-05-12Remove ty::UnnormalizedProjectionJack Huey-2/+0
2020-05-09Rollup merge of #71555 - cjgillot:nameless, r=matthewjasperRalf Jung-6/+6
Remove ast::{Ident, Name} reexports. The reexport of `Symbol` into `Name` confused me.
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-6/+6
2020-05-07Reintegrate chalk using chalk-solveJack Huey-0/+375
2020-05-02Point at associated types when they have a default typeEsteban Küber-0/+4
Associated types with a default type in a trait can't be relied upon to remain of that default type when in use, so literals of that type can't be used in the trait's items. Point at the associated type and state that information. Reduce verbosity for associated consts of the wrong type.
2020-05-01Remove leftover chalk typesJack Huey-511/+2
2020-04-18Do not emit note for projected derived obligationsEsteban Küber-1/+7
2020-04-18Remove `AssocTypeBound` and propagate bound `Span`sEsteban Küber-10/+0
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-2/+2
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-03-30Use query instead of `impl_is_default` fnJonas Schievink-19/+1
2020-03-30spec. graph: track defining and finalizing implsJonas Schievink-5/+75
2020-03-30Simplify `NodeItem`Jonas Schievink-11/+7
The generic parameter is unused, and so is `map`
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-0/+2371