E0277 causes syntax error when adding several bounds at the same time via several errors #106881
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Here we have several errors trying to add bounds to
impl<T> UncheckedCopy for T {}
.This would work when adding only a single bound, but here we end up adding several bounds, separated by
:
which causes syntax error, the "fully fixed" code ends up beingimpl<T: std::marker::Copy: std::ops::Deref: std::ops::AddAssign<&'static str>: std::fmt::Display> UncheckedCopy for T {}
Can we make rust clever enough to separate these by
+
?The text was updated successfully, but these errors were encountered: