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
Tait must be constrained if in sig #113169
base: master
Are you sure you want to change the base?
Tait must be constrained if in sig #113169
Conversation
|
@@ -1,5 +1,4 @@ | |||
#![feature(type_alias_impl_trait)] | |||
// check-pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only test for which there was no workaround after this change.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #113370) made this pull request unmergeable. Please resolve the merge conflicts. |
b6612f4
to
62d2ddd
Compare
This comment has been minimized.
This comment has been minimized.
62d2ddd
to
64f3f5b
Compare
// check-pass | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR "reopens" #61863
the test doesn't really add too much new test coverage compared with other tests we already have.
☔ The latest upstream changes (presumably #117076) made this pull request unmergeable. Please resolve the merge conflicts. |
64f3f5b
to
fd06ad3
Compare
This comment has been minimized.
This comment has been minimized.
fd06ad3
to
d9b265f
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #117172) made this pull request unmergeable. Please resolve the merge conflicts. |
f0a4804
to
1d5ea10
Compare
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
@rustbot ready |
I need to take another look at this, but blocking until it's been approved from the T-lang side. @rustbot blocked |
☔ The latest upstream changes (presumably #117278) made this pull request unmergeable. Please resolve the merge conflicts. |
Nominating for lang team discussion. The explanation is entirely in the main post of this PR. The question we want T-lang to answer is: Is it ok from your side that we disallow type Tait = impl Sized;
fn foo(x: Tait) -> Tait { x } // not allowed, because not defining in defining scope
fn bar() -> Tait { } but allow the same code if the |
@oli-obk what's the status of this? it was blocked as it was nominated but then unnominated for a different pr, so i'm assuming that it is either superseded or blocked by it |
r? @compiler-errors
kind of reverts #62423, but that PR only removed cycles in cases that we want to forbid now anyway.
see https://rust-lang.zulipchat.com/#narrow/stream/315482-t-compiler.2Fetc.2Fopaque-types/topic/lcnr.20oli.20meeting/near/370712246 for related discussion and motivating example
a TAIT showing up in a signature doesn't just mean it can register a hidden type, but that it must.
This is the design the types team decided upon for the following reasons