Negative trait impl gives wrong error message #70849
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
F-negative_impls
#![feature(negative_impls)]
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code:
produces:
which reads as: any
&mut T where T: ?Sized implements Clone
, which isn't realy true. It realy implements!Clone
.Perhaps the error message should add a
!
in front of the impl to make it more obvious, like this:The text was updated successfully, but these errors were encountered: