Some unstable changes to where opaque types get defined#124080
Some unstable changes to where opaque types get defined#124080bors merged 4 commits intorust-lang:masterfrom
Conversation
| @@ -5,7 +5,7 @@ | |||
| type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + std::fmt::Debug; | |||
|
|
|||
| fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> { | |||
There was a problem hiding this comment.
This is kind of a shame bc I think it just works in the new solver lol
There was a problem hiding this comment.
is that because of the new solver's handling of things that prove themselves?
compiler/rustc_trait_selection/src/traits/select/confirmation.rs
Outdated
Show resolved
Hide resolved
compiler-errors
left a comment
There was a problem hiding this comment.
Curious about if this actually only affects unstable code. I don't think, for example, that we enforce as much as you think we do in candidate assembly, but I may be missing something.
compiler/rustc_trait_selection/src/traits/select/confirmation.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_trait_selection/src/traits/select/confirmation.rs
Outdated
Show resolved
Hide resolved
|
☔ The latest upstream changes (presumably #124822) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@rustbot author |
yea, after the first two ended up being enforced in candidate assembly, I just stopped looking and assumed the rest were, too 🙃 |
…ue types. We already handle this case this way on the coherence side, and it matches the new solver's behaviour. While there is some breakage around type-alias-impl-trait (see new "type annotations needed" in tests/ui/type-alias-impl-trait/issue-84660-unsoundness.rs), no stable code breaks, and no new stable code is accepted.
No stable code is affected, as this requires the `trait_upcasting` feature gate.
de10ccd to
4387eea
Compare
|
@bors r+ |
…ompiler-errors Some unstable changes to where opaque types get defined None of these can be reached from stable afaict. r? `@compiler-errors` cc rust-lang#116652
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#124080 (Some unstable changes to where opaque types get defined) - rust-lang#125271 (use posix_memalign on almost all Unix targets) - rust-lang#125433 (A small diagnostic improvement for dropping_copy_types) - rust-lang#125498 (Stop using the avx512er and avx512pf x86 target features) - rust-lang#125510 (remove proof tree formatting, make em shallow) - rust-lang#125513 (Don't eagerly monomorphize drop for types that are impossible to instantiate) - rust-lang#125514 (Structurally resolve before `builtin_index` in EUV) - rust-lang#125515 ( bootstrap: support target specific config overrides ) - rust-lang#125527 (Add manual Sync impl for ReentrantLockGuard) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#121377 (Stabilize `LazyCell` and `LazyLock`) - rust-lang#122986 (Fix c_char on AIX) - rust-lang#123803 (Fix `VecDeque::shrink_to` UB when `handle_alloc_error` unwinds.) - rust-lang#124080 (Some unstable changes to where opaque types get defined) - rust-lang#124667 (Stabilize `div_duration`) - rust-lang#125472 (tidy: validate LLVM component names in tests) - rust-lang#125523 (Exit the process a short time after entering our ctrl-c handler) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124080 - oli-obk:define_opaque_types10, r=compiler-errors Some unstable changes to where opaque types get defined None of these can be reached from stable afaict. r? ``@compiler-errors`` cc rust-lang#116652
None of these can be reached from stable afaict.
r? @compiler-errors
cc #116652