feat: Diagnose trait errors 🎉#22186
Conversation
2faaf56 to
0785743
Compare
This comment has been minimized.
This comment has been minimized.
5939ef1 to
73dce3f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
73dce3f to
f150647
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f150647 to
c2ac503
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c2ac503 to
b84e9b1
Compare
This comment has been minimized.
This comment has been minimized.
b84e9b1 to
b113b75
Compare
This comment has been minimized.
This comment has been minimized.
In rustc it is not, but we're unlikely to add something non-`Copy` to it in the near future, and it simplifies the code. This was basically adding a derive then `cargo clippy --fix` and `cargo fmt`.
I.e. type does not implement trait. There are a lot of other solver errors to be emitted, and the error is pretty simple currently, but this is a huge step!
b113b75 to
26ae4ac
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
There was a problem hiding this comment.
Really exciting, huge progress 🎉
I'm quite sure the implementation is done right, but I delegate the merge at your disposal as you might want second eyes for this or this might cause some false positives so might be a little bit overwhelming to be merged just before the stable release 😅
| } | ||
| "#, | ||
| expect![[r#" | ||
| 46..49 'Foo': Foo<N> |
There was a problem hiding this comment.
I don't think this should be a severe regression/blocker but just out of curiosity, do you happen to know what makes this change?
There was a problem hiding this comment.
Hmm, no. Weird 😕
|
The diagnostic is experimental, so false positives are ~fine. |
I.e. type does not implement trait.
There are a lot of other solver errors to be emitted, and the error is pretty simple currently, but this is a huge step!
Watch this wonderful video:
trait.errors.mp4