-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Nightly shows confusing diagnostics mentioning ZeroablePrimitive without apparent reason #161882
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityWG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)The Rustc Trait System Refactor Initiative (-Znext-solver)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
Activity
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-mediumMedium priorityMedium priorityWG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)The Rustc Trait System Refactor Initiative (-Znext-solver)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
I tried to convince the compiler to accept my use of
?operator via basicallytrait MaybeFallible where MyError: From<Self>, which I now suspect is impossible. Trying the new trait solver, I got weird errors aboutZeroablePrimitivewhich I have never mentioned in the code nor did I mentionNonZeroanywhere. This may be related to the new solver, so cc #160895 but I'm not sure.Code
I tried this code:
I expected to see this happen: no mentions of unrelated traits such as
ZeroablePrimitive; any errors are only related to what I wrote.Instead, this happened:
Version it worked on
It most recently worked on: 1.98.0
Version with regression
rustc --version --verbose:These are the versions currently on playground.
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged