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
I stumbled upon strange behaviour of rustc (1.0.0-nightly 2015-01-06). It seems to treat [uint; 5] differently from [SomeStruct; 5].
the type [uint; 1] does not reference any types defined in this crate; only traits defined in the current crate can be implemented for arbitrary types [E0117]
Is this expected behaviour or a bug in the compiler?
Code 1 (does not compile):
use std::default::Default;typeAnArray = [uint;1];implDefaultforAnArray{fndefault() -> AnArray{[0;1]}}fnmain(){}
Code 2 (compiles):
use std::default::Default;structUnitStruct;typeAnArray = [UnitStruct;1];implDefaultforAnArray{fndefault() -> AnArray{[UnitStruct;1]}}fnmain(){}