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 implementing a trait with more than one associated type, the compiler complains:
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.
#![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 #19058, which is caused by the same snippet of code.
The text was updated successfully, but these errors were encountered:
Closing as a dupe of #19058. Entirely my fault, I was not clear at all on IRC: I was suggesting filing another bug about this version (i.e. only commenting out one use of Viewport) but didn't describe things well, in any case that ICE is covered by #17359.
When implementing a trait with more than one associated type, the compiler complains:
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
This issue is linked with #19058, which is caused by the same snippet of code.
The text was updated successfully, but these errors were encountered: