You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: expected one of `:`, `==`, or `=`, found `;`
--> src/lib.rs:3:36
|
3 | struct Foo<T> where T: MyTrait, (T);
| ^ expected one of `:`, `==`, or `=`
Can I just say this is one of the reasons I love the Rust project? Instead of getting some blunt "you're doing it wrong" you take the time to understand why I'm doing it wrong, and how to fix it for everyone. :)
I tried this code:
I expected to see this happen: It compiles and requires T to implement MyTrait
Instead, this happened: It doesn't compile
Meta
rustc --version --verbose
:"Backtrace" (compiler error)
Playground Link
The text was updated successfully, but these errors were encountered: