Michael Goulet
b3b23aada9
Don't document impossible to call default trait items on impls
2022-08-07 23:44:05 +00:00
Michael Goulet
f5af266b6d
Address nits
2022-08-04 13:59:25 +00:00
Michael Goulet
fe894756f8
Add traits::fully_solve_obligation
that acts like traits::fully_normalize
...
It spawns up a trait engine, registers the single obligation, then fully
solves it
2022-08-04 13:50:56 +00:00
Michael Goulet
3e48434cc7
Use ObligationCtxt in impossible_predicates
2022-08-04 13:42:13 +00:00
Michael Goulet
37d412cff7
Remove FulfillmentContext param from fully_normalize
2022-08-04 13:42:13 +00:00
Matthias Krüger
0de7f756f0
Rollup merge of #99746 - compiler-errors:more-trait-engine, r=jackh726
...
Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot`
Not sure if this change is worthwhile, but couldn't hurt re: chalkification
r? types
2022-08-03 22:29:27 +02:00
Michael Goulet
58f107ab56
Use TraitEngine in more places that don't specifically need FulfillmentCtxt::new_in_snapshot
2022-07-26 04:55:06 +00:00
Michael Goulet
10b69ab0d2
Remove non-descriptive boolean from search_for_structural_match_violation
2022-07-25 03:39:23 +00:00
Michael Goulet
c1f54c30bb
Get rid of redundant NonStructuralMatchTyKind
2022-07-25 03:39:22 +00:00
lcnr
608625dae9
move considering_regions
to the infcx
2022-07-21 13:08:56 +02:00
lcnr
5bd8c960f5
provide generic_param_scope
for region errors
2022-07-15 16:53:20 +02:00
lcnr
4b56fd9341
try to avoid FnCtxt
during wf
2022-07-15 16:53:18 +02:00
kadmin
20fb8aba8f
Fix overlapping impls
2022-07-14 09:01:17 +00:00
kadmin
e612e2603c
Move abstract const to rustc_middle::ty
2022-07-12 02:21:31 +00:00
Alan Egerton
4f0a64736b
Update TypeVisitor paths
2022-07-06 06:41:53 +01:00
lcnr
24799e3720
remove an unused DefId
2022-07-04 14:35:19 +02:00
Jack Huey
d716245aa6
Remove RegionckMode in favor of calling new skip_region_resolution
2022-06-13 01:15:04 -04:00
Michael Goulet
34e05812e0
Fix TyKind lint, make consts no longer fn, etc
2022-05-28 11:38:22 -07:00
Michael Goulet
a056a953f0
Initial fixes on top of type interner commit
2022-05-28 11:38:22 -07:00
b-naber
e2e425e8d2
give correct error message on structural match violation
2022-05-24 13:01:34 +02:00
Camille GILLOT
69e5b2fde0
Do not report overflow error.
2022-05-07 18:18:03 +02:00
Camille GILLOT
6b348257a1
Cleanup opaque type storage after checking impossible predicates.
2022-05-07 10:25:57 +02:00
Camille GILLOT
8492460fa4
Also check TraitRef with impossible predicates.
2022-05-07 10:24:45 +02:00
Yuri Astrakhan
5160f8f843
Spellchecking compiler comments
...
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30 15:14:15 -04:00
Dylan DPC
1fcb8fc3e0
Rollup merge of #95179 - b-naber:eval-in-try-unify, r=lcnr
...
Try to evaluate in try unify and postpone resolution of constants that contain inference variables
We want code like that in [`ui/const-generics/generic_const_exprs/eval-try-unify.rs`](https://github.com/rust-lang/rust/compare/master...b-naber:eval-in-try-unify?expand=1#diff-8027038201cf07a6c96abf3cbf0b0f4fdd8a64ce6292435f01c8ed995b87fe9b ) to compile. To do that we need to try to evaluate constants in `try_unify_abstract_consts`, this requires us to be more careful about what constants we try to resolve, specifically we cannot try to resolve constants that still contain inference variables.
r? `@lcnr`
2022-03-25 01:34:30 +01:00
b-naber
8ff1edbe5e
fix previous failures and address review
2022-03-22 11:35:59 +01:00
Dylan DPC
270a41c33e
Rollup merge of #94960 - codehorseman:master, r=oli-obk
...
Fix many spelling mistakes
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-17 22:55:05 +01:00
mark
bb8d4307eb
rustc_error: make ErrorReported impossible to construct
...
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-16 10:35:24 -05:00
codehorseman
01dbfb3eb2
resolve the conflict in compiler/rustc_session/src/parse.rs
...
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-16 20:12:30 +08:00
mark
e489a94dee
rename ErrorReported -> ErrorGuaranteed
2022-03-02 09:45:25 -06:00
est31
dab5c44800
rustc_trait_selection: adopt let else in more places
2022-02-19 01:20:43 +01:00
Matthias Krüger
6749f32c33
Rollup merge of #90277 - pierwill:fix-70258-inference-terms, r=jackh726
...
Improve terminology around "after typeck"
Closes #70258 .
2022-01-31 06:58:26 +01:00
Ellen
71bbb603f4
initial revert
2022-01-15 01:16:55 +00:00
Sylvan Bowdler
dd5717a6d6
Remove in_band_lifetimes
from rustc_trait_selection
2021-12-15 21:52:30 +00:00
Deadbeef
84b1d859c8
Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk"
...
This reverts commit ff2439b7b9
, reversing
changes made to 2a9e0831d6
.
2021-12-12 12:34:46 +08:00
Santiago Pastorino
85b723c4e6
Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"
...
This reverts commit 18bb8c61a9
, reversing
changes made to d9baa36190
.
2021-12-03 10:11:21 -03:00
Oli Scherer
a9a79f657c
Completely remove ConstnessAnd
2021-11-29 21:19:49 +08:00
Oli Scherer
a848c4ba3f
Avoid storing the ImplPolarity and Constness next to a TraitRef and use TraitPredicate instead
2021-11-29 21:19:49 +08:00
Oli Scherer
721ffd14c3
Add constness to ParamEnv
...
This now causes a lot of queries to be executed twice, as reveal_all forces NotConst
2021-11-29 21:19:46 +08:00
Jacob Pratt
7b103e7dd2
Use derive_default_enum
in the compiler
2021-11-22 20:17:53 -05:00
Nilstrieb
24acf86029
Fix span for non-satisfied trivial trait bounds
...
The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
Now they only reference the obligation itself (`String: Copy`)
Address #90869
2021-11-14 11:38:52 +01:00
Deadbeef
f1126f1272
Make select_* methods return Vec for TraitEngine
2021-11-08 23:35:23 +08:00
pierwill
521b1ee974
Improve terminology around "after typeck"
2021-11-06 20:59:38 -05:00
Charles Lew
8841204cc6
Erase regions within vtable_trait_first_method_offset
.
2021-11-04 00:53:54 +08:00
Santiago Pastorino
6975afd141
Add polarity to TraitPredicate
2021-10-20 12:10:41 -03:00
Jubilee
05b4cd6789
Rollup merge of #89413 - matthewjasper:spec-marker-fix, r=nikomatsakis
...
Correctly handle supertraits for min_specialization
Supertraits of specialization markers could circumvent checks for
min_specialization. Elaborating predicates prevents this.
r? ````@nikomatsakis````
2021-10-04 21:12:35 -07:00
Hirochika Matsumoto
3818981ca1
Practice diagnostic message convention
2021-10-03 16:16:28 +09:00
Matthew Jasper
c8f86cad2d
Elaborate predicates in min_specialization checks
...
Supertraits of specialization markers could circumvent checks for
min_specialization. Elaborating predicates prevents this.
2021-09-30 21:42:09 +01:00
Jubilee
ee2e97c416
Rollup merge of #89001 - jackh726:binder-cleanup, r=nikomatsakis
...
Be explicit about using Binder::dummy
This is somewhat of a late followup to the binder refactor PR. It removes `ToPredicate` and `ToPolyTraitImpls` that hide the use of `Binder::dummy`. While this does make code a bit more verbose, it allows us be more careful about where we create binders.
Another alternative here might be to add a new trait `ToBinder` or something with a `dummy()` fn. Which could still allow grepping but allows doing something like `trait_ref.dummy()` (but I also wonder if longer-term, it would be better to be even more explicit with a `bind_with_vars(ty::List::empty())` *but* that's not clear yet.
r? ``@nikomatsakis``
2021-09-24 11:40:11 -07:00
Mark Rousskov
078e3fd4ba
Add another case of fallback to () avoid breakage
...
This adds src/test/ui/never_type/fallback-closure-ret.rs as a test case which
showcases the failure mode fixed by this commit.
2021-09-17 15:34:47 -04:00