-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Regression from stable to beta with HRTB supertraits #91899
Comments
What the.... |
Okay so reverting #88312 fully also errors. Stable 1.55.0 fails. Checking 0599f34 (a couple commits before #88312) now, but I'm assuming it's going to error. So, this was actually a bug in 1.56.0 - prior to that, this didn't compile, rightfully. My guess is because of treating unnormalized function args & output as WF, we saw I'm going to go ahead and make a PR to add a test that closes this issue. This was a bug in 1.56.0, not a regression since. |
Good to know, thanks! (And good that this was just a one-version regression; less chance of there being in-the-wild breakage) |
🤔🤔 I should figure out an excuse to make yoke a dependency of rustc, it seems really good at finding typesystem corner cases and maybe we should just have it be a test 😁 |
Isn't it failing on the wrong line? I would have expected it to fail on the impl<T> ZeroCopyFrom<[T]> for &'static [T] because |
Haha yeah, it's a thorn in my side 😛
So, it's interesting. The check is pub trait ZeroCopyFrom {}
impl<T> ZeroCopyFrom for &'static T {} |
In my experience WFness of |
…crum Add another regression test for unnormalized fn args with Self Closes rust-lang#91899
Thanks! |
Note: The regression is valid/"allowed" (there's a hole in the typesystem being patched), I'm just filing this issue now so we can make sure that this regression is tracked in case it got "fixed" by accident. Feel free to close if it's a known quantity; I'm just worried that this got "accidentally" fixed in some other change.
My crate is being fixed to not face this problem, but in general there's a chance other crates are falling afoul of this as well; we should perhaps assess the impact and start off with it being a future incompatibility warning if necessary.
Code
I tried this code:
(playpen)
I expected to see this happen: It compiles, like it does on stable, or at least throws a future incompatibility warning.
Instead, this happened: It errors:
Version it worked on
It most recently worked on: Rust 1.56.0
Version with regression
The text was updated successfully, but these errors were encountered: