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
jackh726
be76bdf905
Remove ToPredicate impls that use Binder::dummy
2021-09-15 20:54:50 -04:00
Ellen
406d2ab95d
rename mir -> thir around abstract consts
2021-09-09 01:32:03 +01:00
Gary Guo
97214eecc5
Add query own_existential_vtable_entries
2021-09-05 18:13:32 +01:00
Gary Guo
871eb6233e
Stop allocating vtable entries for non-object-safe methods
2021-09-05 18:13:32 +01:00
Deadbeef
f3d96e9391
fmt
2021-08-27 08:09:00 +00:00
Deadbeef
80e1ee5aee
Add ty::BoundConstness
2021-08-27 06:49:18 +00:00
lcnr
f3996f6a88
review
2021-08-26 11:14:31 +02:00
lcnr
ab9108b70f
update TypeFlags
to deal with missing ct substs
2021-08-26 11:00:30 +02:00
Charles Lew
c22dfab215
Add assertion to ensure the query doesn't get called before type infererence is done.
2021-08-20 02:37:00 +08:00
Charles Lew
6b1c52ff25
Fold vtable_trait_upcasting_coercion_new_vptr_slot
logic into obligation processing.
2021-08-18 13:00:27 +08:00
Charles Lew
63ed625313
Implement pointer casting.
2021-08-03 01:09:37 +08:00