Oli Scherer
c7b6ebdf7c
It's not about types or consts, but the lack of regions
2022-10-04 14:10:44 +00:00
bors
7a8636c843
Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, r=oli-obk
...
Require `#[const_trait]` on `Trait` for `impl const Trait`
r? `@oli-obk`
2022-09-22 04:22:24 +00:00
lcnr
647052fc04
remove the Subst
trait, always use EarlyBinder
2022-09-19 11:37:27 +02:00
Deadbeef
77b0c47b82
Normalize param_env for trait assoc consts in typeck
2022-09-16 11:48:43 +08:00
lcnr
c63020a7c3
rename codegen_fulfill_obligation
2022-09-09 13:36:27 +02:00
Gabriel Bustamante
8e82200277
Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1
2022-09-01 12:54:50 -05:00
bors
983f4daddf
Auto merge of #100705 - compiler-errors:issue-100620, r=oli-obk
...
Avoid reporting overflow in `is_impossible_method`
Fixes #100620
We're evaluating a new predicate in a different param-env than it was checked during typeck, so be more careful about handling overflow errors. Instead of using `FulfillmentCtxt`, using `InferCtxt::evaluate_obligation` by itself will give us back the overflow error, so we can throw it away properly.
This may give us more false-positives, but it doesn't regress the `<HashMap as Iterator>::rev` example that originally motivated adding `is_impossible_method` in the first place.
2022-08-26 06:05:06 +00:00
Matthias Krüger
0fcabec620
Rollup merge of #100888 - spastorino:coherence-negative-impls-implied-bounds, r=lcnr
...
Coherence negative impls implied bounds
Fixes #93875
This PR is rebased on top of #100789 and it would need to include that one which is already r+ed.
r? ``@nikomatsakis``
cc ``@lcnr`` (which I've talked about 3222f420d9
, I guess after you finish your reordering of modules and work with OutlivesEnvironmentEnv this commit can just be reverted).
2022-08-24 18:20:11 +02:00
Santiago Pastorino
5ff45dc89e
Move InferCtxtExt to rustc_trait_selection
2022-08-23 08:55:43 -03:00
yukang
f466a7563d
remove hack fix since we don't have no overflow diagnostic
2022-08-22 22:22:15 +08:00
Michael Goulet
c005e760f5
Rework point-at-arg
2022-08-21 02:34:52 +00:00
Michael Goulet
c4a5b14211
Avoid overflow in is_impossible_method
2022-08-18 01:12:46 +00:00
Dylan DPC
d910e5376b
Rollup merge of #100221 - compiler-errors:impossible-trait-items, r=lcnr,notriddle,camelid
...
Don't document impossible to call default trait items on impls
Closes #100176
This only skips documenting _default_ trait items on impls, not ones that are written inside the impl block. This is a conservative approach, since I think we should document all items written in an impl block (I guess unless hidden or whatever), but the existence of this new query I added makes this easy to extend to other rustdoc cases.
2022-08-09 17:34:54 +05:30
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