about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
AgeCommit message (Collapse)AuthorLines
2022-03-23use NonHirLiteral instead of ScalarLiteral, move pattern related code to ↵b-naber-12/+17
pat_is_poly in IsThirPolymorphic
2022-03-23move ExprKind::Repeat arm to expr_is_polyb-naber-10/+10
2022-03-23use ParamConst in ExprKind::ConstParamb-naber-2/+6
2022-03-23remove thir::Visitor::visit_constb-naber-8/+18
2022-03-23change thir to lazily create constantsb-naber-8/+60
2022-03-22better errors when a Copy impl is not coherentMichael Goulet-2/+2
2022-03-22erase region in ParamEnvAnd and make ConstUnifyCtxt privateb-naber-8/+4
2022-03-22dont canonicalize in try_unify_abstract_consts and erase regions insteadb-naber-21/+12
2022-03-22impl_header -> impl_subjectSantiago Pastorino-1/+1
2022-03-22fix previous failures and address reviewb-naber-99/+126
2022-03-21try to evaluate in try_unifyb-naber-29/+59
2022-03-21Tidy upDeadbeef-4/+8
2022-03-21Rename `~const Drop` to `~const Destruct`Deadbeef-34/+70
2022-03-20Filter OnceNote in diagnostic infra.Camille GILLOT-73/+56
2022-03-20Extract ImplSubject informationSantiago Pastorino-37/+38
2022-03-18Minor documentation type fixes h/t @pierwillSantiago Pastorino-2/+2
2022-03-18Extract obligations_satisfiable fnSantiago Pastorino-42/+44
2022-03-18Fix inherent impls on negative coherenceSantiago Pastorino-43/+67
2022-03-18Fix incorrect auto trait displayed in rustdocGuillaume Gomez-2/+2
2022-03-18Rollup merge of #95039 - spastorino:overlap-super-predicates, r=nikomatsakisMatthias Krüger-32/+58
Make negative coherence work when there's impl negative on super predicates r? `@nikomatsakis`
2022-03-17Rollup merge of #94960 - codehorseman:master, r=oli-obkDylan DPC-7/+7
Fix many spelling mistakes Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-17Update compiler/rustc_trait_selection/src/traits/coherence.rsNiko Matsakis-1/+0
2022-03-17Use let else hereSantiago Pastorino-26/+26
2022-03-17Add more commmentsSantiago Pastorino-0/+2
2022-03-17This test now worksSantiago Pastorino-0/+1
2022-03-17Extract obligation resolution to functionSantiago Pastorino-30/+46
2022-03-17Make negative coherence work when there's impl negative on super predicatesSantiago Pastorino-8/+16
2022-03-16rustc_error: make ErrorReported impossible to constructmark-77/+92
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-7/+7
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-15Rollup merge of #94947 - Dylan-DPC:fix/typos, r=oli-obkMatthias Krüger-1/+1
fix typos Rework of #94603 which got closed as I was trying to unmerge and repush. This is a subset of changes from the original pr as I sed'd whatever typos I remembered from the original PR thanks to `@cuishuang` for the original PR
2022-03-15Auto merge of #92285 - compiler-errors:dyn-proj-bounds, r=nikomatsakisbors-15/+13
check ~Projection~ all supertrait bounds when confirming dyn candidate I'm pretty sure Projection is the only other PredicateKind that we care about enforcing here. Fixes #80800
2022-03-15fix typosDylan DPC-1/+1
2022-03-14check all dyn obligations, actuallyMichael Goulet-17/+13
2022-03-14check Projection supertrait bounds when confirming dyn candidateMichael Goulet-1/+3
2022-03-14Rollup merge of #93977 - compiler-errors:sized-generic-metadata, r=wesleywiserMatthias Krüger-5/+30
Type params and assoc types have unit metadata if they are sized Extend the logic in `Pointee` projection to ensure that we can satisfy `<T as Pointee>::Metadata = ()` if `T: Sized`. cc: `@SimonSapin` and #93959
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-16/+16
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-03-10Rollup merge of #94440 - compiler-errors:issue-94282, r=lcnrMatthias Krüger-25/+63
Better error for normalization errors from parent crates that use `#![feature(generic_const_exprs)]` This PR implements a somewhat rudimentary heuristic to suggest using `#![feature(generic_const_exprs)]` in a child crate when a function from a foreign crate (that may have used `#![feature(generic_const_exprs)]`) fails to normalize during codegen. cc: #79018 cc: #94287
2022-03-10Rollup merge of #94746 - notriddle:notriddle/method-rustc-on-unimplemented, ↵Matthias Krüger-1/+5
r=davidtwco diagnostics: use rustc_on_unimplemented to recommend `[].iter()` To make this work, the `#[rustc_on_unimplemented]` data needs to be used to report method resolution errors, which is most of what this commit does. Fixes #94581
2022-03-09suggest enabling generic_const_exprs feature if const is unevaluatableMichael Goulet-25/+64
2022-03-09diagnostics: use rustc_on_unimplemented to recommend `[].iter()`Michael Howell-1/+5
To make this work, the `#[rustc_on_unimplemented]` data needs to be used to report method resolution errors, which is most of what this commit does. Fixes #94581
2022-03-09normalization change and rebaseb-naber-1/+1
2022-03-09treat all mir::Constant values as ConstantKind::Valb-naber-1/+16
2022-03-08Rollup merge of #94689 - compiler-errors:on-unimplemented-substs, r=petrochenkovDylan DPC-34/+40
Use impl substs in `#[rustc_on_unimplemented]` We were using the trait-ref substs instead of impl substs in `rustc_on_unimplemented`, even when computing the `rustc_on_unimplemented` attached to an impl block. Let's not do that. This PR also untangles impl and trait def-ids in the logic in `on_unimplemented` a bit. Fixes #94675
2022-03-07Try to normalize associated types before processing obligationsJack Huey-10/+97
2022-03-06allow referencing impl substs from rustc_on_unimplementedMichael Goulet-23/+27
2022-03-06use impl substs in on_unimplementedMichael Goulet-11/+13
2022-03-07remove unnecessary `..` patternsTakayuki Maeda-1/+1
2022-03-03opaque types may also be sizedMichael Goulet-4/+12
2022-03-03type parameters have unit metadata if they are sizedMichael Goulet-5/+22
2022-03-03Rollup merge of #94057 - lcnr:simplify_type-uwu, r=nikomatsakisMatthias Krüger-13/+21
improve comments for `simplify_type` Should now correctly describe what's going on. Experimented with checking the invariant for projections but that ended up requiring fairly involved changes. I assume that it is not possible to get unsoundness here, at least for now and I can pretty much guarantee that it's impossible to trigger it by accident. r? `````@nikomatsakis````` cc #92721