Santiago Pastorino
ac0b6af37b
Permit negative impls coherence to take advantage of implied bounds
2022-08-23 08:55:43 -03:00
Michael Goulet
ba7272959d
Use separate infcx to solve obligations during negative coherence
2022-08-20 04:49:24 +00:00
lcnr
1cede2c126
is_knowable
use Result
instead of Option
2022-08-17 10:17:54 +02:00
Matthias Krüger
a1fdea2b78
Rollup merge of #100514 - compiler-errors:issue-100191, r=spastorino
...
Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls
Fixes #100191
r? ``@spastorino``
2022-08-15 20:11:36 +02:00
Dylan DPC
92344e369b
Rollup merge of #99861 - lcnr:orphan-check-cg, r=jackh726
...
orphan check: rationalize our handling of constants
cc `@rust-lang/types` `@rust-lang/project-const-generics` on whether you agree with this reasoning.
r? types
2022-08-14 17:09:13 +05:30
Michael Goulet
c436930f91
Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls
2022-08-13 22:11:42 +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
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
lcnr
2634309eb3
update comment
2022-07-29 09:44:20 +02:00
Michael Goulet
16f49800db
Document check_region_obligations_and_report_errors, simplify a call to resolve_regions
2022-07-29 06:17:17 +00:00
lcnr
c9b21b0ea2
orphan check: remove const generics fixme
2022-07-28 17:35: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
b7cf9f72f6
Restore Opaque behavior to coherence check
2022-07-25 23:38:41 +00:00
lcnr
84c3fcd2a0
rewrite the orphan check to use a type visitor
2022-07-21 11:51:09 +02:00
lcnr
7d0a18239e
orphan check: opaque types are an error
2022-07-21 10:53:54 +02:00
rhysd
d5aed20f47
Remove duplicate notes from error on inter-crate ambiguous impl of traits ( fix #99092 )
2022-07-10 16:39:12 +09:00
Alan Egerton
4f0a64736b
Update TypeVisitor paths
2022-07-06 06:41:53 +01:00
lcnr
a0d2d9f315
implied bounds byebye nested hir ids
2022-07-04 14:35:20 +02:00
lcnr
24799e3720
remove an unused DefId
2022-07-04 14:35:19 +02:00
lcnr
4dbf9ba0ab
outside of borrowck, do not provide an implicit_region_bound
...
see comment added to the field in `VerifyBoundCx`.
2022-06-27 15:48:54 +02:00
Jack Huey
d716245aa6
Remove RegionckMode in favor of calling new skip_region_resolution
2022-06-13 01:15:04 -04:00
lcnr
a76277c6c4
add a deep fast_reject routine
2022-05-25 07:40:38 +02:00
bors
c067287049
Auto merge of #97024 - lcnr:simplify_type-sus, r=<try>
...
`simplify_type` improvements and cursed docs
the existing `TreatParams` enum pretty much mixes everything up. Not sure why this looked right to me in #94057
This also includes two changes which impact perf:
- `ty::Projection` with inference vars shouldn't be treated as a rigid type, even if fully normalized
- `ty::Placeholder` only unifies with itself, so actually return `Some` for them
r? `@nikomatsakis`
2022-05-19 13:08:51 +00:00
lcnr
db19e2bd01
fix simplify_type
2022-05-18 09:00:30 +02:00
Dylan DPC
04f903859a
Rollup merge of #95979 - lcnr:coherence-docs, r=compiler-errors
...
update coherence docs, fix generator + opaque type ICE
the world is confusing, this makes it slightly less so
2022-05-18 08:41:14 +02:00
Jack Huey
0247faed29
Add bound_impl_trait_ref
2022-05-13 18:27:40 -04:00
Jack Huey
c92248ab9f
Add bound_type_of
2022-05-13 18:27:18 -04:00
Jack Huey
319575ae8c
Introduce EarlyBinder
2022-05-10 22:47:18 -04:00
lcnr
58781edc54
update coherence docs, fix opaque type + generator ice
2022-05-10 09:09:06 +02:00
Elliot Roberts
7907385999
fix most compiler/ doctests
2022-05-02 17:40:30 -07: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
Santiago Pastorino
42e986f77b
Implement impl_subject_and_oblig instead of repeating the impls
2022-03-24 18:41:30 -03:00
Santiago Pastorino
d96faef913
Where bounds are checked on inherent impls
2022-03-24 17:47:10 -03:00
Santiago Pastorino
f4bd1e14bd
Normalize both trait and inherent
2022-03-24 14:17:54 -03:00
Santiago Pastorino
22b311bd82
Extract impl_subject_and_oglibations fn and make equate receive subjects
2022-03-24 12:44:06 -03:00
Santiago Pastorino
64df2ee1eb
impl_header -> impl_subject
2022-03-22 10:35:17 -03:00
Santiago Pastorino
0cd03c917c
Extract ImplSubject information
2022-03-20 00:12:18 -03:00
Santiago Pastorino
91b52148eb
Minor documentation type fixes h/t @pierwill
2022-03-18 14:13:06 -03:00
Santiago Pastorino
f3ebafac91
Extract obligations_satisfiable fn
2022-03-18 14:11:04 -03:00
Santiago Pastorino
89fdb62331
Fix inherent impls on negative coherence
2022-03-18 14:11:04 -03:00
Niko Matsakis
89a00cc8ae
Update compiler/rustc_trait_selection/src/traits/coherence.rs
2022-03-17 16:51:30 -04:00
Santiago Pastorino
ba8b4a4f82
Use let else here
2022-03-17 14:55:16 -03:00
Santiago Pastorino
9c076f3f90
Add more commments
2022-03-17 14:38:30 -03:00
Santiago Pastorino
91846fe12a
This test now works
2022-03-17 14:38:27 -03:00
Santiago Pastorino
61a05ef8d6
Extract obligation resolution to function
2022-03-17 12:15:17 -03:00
Santiago Pastorino
64dfd3b234
Make negative coherence work when there's impl negative on super predicates
2022-03-17 12:15:11 -03:00
Nicholas Nethercote
ca5525d564
Improve AdtDef
interning.
...
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-11 13:31:24 +11:00
Matthias Krüger
fec7a79088
Rollup merge of #94057 - lcnr:simplify_type-uwu, r=nikomatsakis
...
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
2022-03-03 20:01:44 +01:00
bors
9323028156
Auto merge of #94144 - est31:let_else_trait_selection, r=cjgillot
...
rustc_trait_selection: adopt let else in more places
Continuation of #89933 , #91018 , #91481 , #93046 , #93590 , #94011 .
I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles rustc_trait_selection.
2022-02-27 07:02:46 +00:00