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
This was the smallest I could make it. Commenting out the lines for either T0 or T1 or making T0 and T1 the same type allows compilation to finish successfully.
#![feature(associated_types)]
trait Tup {
type T0;
type T1;
}
impl Tup for int {
type T0 = f32;
type T1 = ();
}
fn main() {
}
Error:
a.rs:6:1: 9:2 error: the trait `Tup` is not implemented for the type `int`
a.rs:6 impl Tup for int {
a.rs:7 type T0 = f32;
a.rs:8 type T1 = ();
a.rs:9 }
a.rs:6:1: 9:2 note: the trait `Tup` must be implemented because it is required by `Tup`
a.rs:6 impl Tup for int {
a.rs:7 type T0 = f32;
a.rs:8 type T1 = ();
a.rs:9 }
error: aborting due to previous error
What I don't understand is: why in the world is it even complaining about Tup implementations when no one is using Tup? Is this some sort of weird interaction with trait object types?
This was the smallest I could make it. Commenting out the lines for either
T0
orT1
or makingT0
andT1
the same type allows compilation to finish successfully.Error:
What I don't understand is: why in the world is it even complaining about
Tup
implementations when no one is usingTup
? Is this some sort of weird interaction with trait object types?(rustc at commit a2f303a, Linux)
The text was updated successfully, but these errors were encountered: