-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc fails to see that trait bound is satisfied #92292
Comments
CC @fee1-dead, as the author of the relevant PR. |
Fixed by #92257, this one is more interesting than the test I added in that PR, as it is stable code (but uses |
I can confirm that this is fixed on the latest nightly. |
It's E-needs-test because someone should add an ui test for this issue |
I'm interested in working on this. Could you tell me where should the test be added? It seems to be somewhere inside |
I might go with |
@rustbot claim |
Add UI test for rust-lang#92292 Closes rust-lang#92292
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#91519 (ast: Avoid aborts on fatal errors thrown from mutable AST visitor) - rust-lang#92414 (Fix spacing of pretty printed const item without body) - rust-lang#92423 (Add UI test for rust-lang#92292) - rust-lang#92427 (Use `UnsafeCell::get_mut()` in `core::lazy::OnceCell::get_mut()`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Code
I tried this code:
I expected to see this happen:
It should compile successfully.
Instead, this happened:
The compiler doesn't realize that
Into<MyNonGenericType>
is implemented for allMyGenericType<T>
and reports an error.Interestingly enough, removing the
where Self: Into<MyNonGenericType>,
bound makes this compile again.cargo-bisect-rustc report
searched nightlies: from nightly-2021-12-01 to nightly-2021-12-25
regressed nightly: nightly-2021-12-14
searched commit range: 6bda5b3...8f117a7
regressed commit: 22f8bde
bisected with cargo-bisect-rustc v0.6.1
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
@rustbot modify labels: +regression-from-stable-to-nightly
The text was updated successfully, but these errors were encountered: