-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustc fails to see that trait bound is satisfied #92292
Copy link
Copy link
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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