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
When compiling this snippet of code, the compiler churns out the most nonsensical error:
error: the trait `Device` is not implemented for the type `TestDevice`
...
note: the trait `Device` must be implemented because it is required by `Device`
This problem is fairly recent; the code used to compile several weeks ago on Rust master.
The problem does not occur when the trait Device has only one associated type. Note that the error occurs on the same line as the trait implementation.
Also on the Playpen
Note: Changing the Rust version to 0.12.0 on the Playpen causes a successful compilation.
#![feature(associated_types)]// using one associated type compiles fine// using two causes an error// a trait using associated typespubtraitDevice{typeProgram;// error: ###comment this next line out ###typeViewport;}// a struct which implemented the traitpubstructTestDevice(u32);implDeviceforTestDevice{typeProgram = u32;// error: ###comment this next line out ###typeViewport = i64;}fnmain(){}
This issue is linked with #19059 , which is caused by the same snippet of code.
The text was updated successfully, but these errors were encountered:
When compiling this snippet of code, the compiler churns out the most nonsensical error:
This problem is fairly recent; the code used to compile several weeks ago on Rust master.
The problem does not occur when the trait
Device
has only one associated type. Note that the error occurs on the same line as the trait implementation.Also on the Playpen
Note: Changing the Rust version to 0.12.0 on the Playpen causes a successful compilation.
This issue is linked with #19059 , which is caused by the same snippet of code.
The text was updated successfully, but these errors were encountered: