Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some unstable changes to where opaque types get defined #124080

Merged
merged 4 commits into from
May 26, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 17, 2024

None of these can be reached from stable afaict.

r? @compiler-errors

cc #116652

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 17, 2024
@@ -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> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of a shame bc I think it just works in the new solver lol

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that because of the new solver's handling of things that prove themselves?

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bors
Copy link
Contributor

bors commented May 7, 2024

☔ The latest upstream changes (presumably #124822) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 22, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented May 23, 2024

I don't think, for example, that we enforce as much as you think we do in candidate assembly

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.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 24, 2024
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 25, 2024

📌 Commit 4387eea has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request May 25, 2024
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request May 25, 2024
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request May 25, 2024
…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
@bors bors merged commit 1e84163 into rust-lang:master May 26, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 26, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 26, 2024
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
@traviscross traviscross added the A-impl-trait Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch. label May 28, 2024
@oli-obk oli-obk deleted the define_opaque_types10 branch June 7, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-impl-trait Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants