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
#[on_unimplemented]//~ ERROR the #[on_unimplemented] attribute on trait definition for BadAnnotation1 must have a value, eg `#[on_unimplemented = "foo"]`
30
-
traitBadAnnotation1{}
31
-
32
-
#[on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"]
33
-
//~^ ERROR the #[on_unimplemented] attribute on trait definition for BadAnnotation2<A, B> refers to non-existent type parameter C
34
-
traitBadAnnotation2<A,B>{}
35
-
36
-
fntrigger1<T:BadAnnotation1>(t:T){}
37
-
fntrigger2<A,B,T:BadAnnotation2<A,B>>(t:T){}
38
-
39
29
pubfnmain(){
40
30
let x = vec!(1u8,2,3,4);
41
31
let y:Option<Vec<u8>> = collect(x.iter());// this should give approximately the same error for x.iter().collect()
42
32
//~^ ERROR
43
33
//~^^ NOTE a collection of type `core::option::Option<collections::vec::Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
44
34
let x:String = foobar();//~ ERROR
45
35
//~^ NOTE test error `collections::string::String` with `u8` `_` `u32`
46
-
47
-
// The following two have errors in their annotations, so the regular error should be thrown
48
-
trigger1(1u8);//~ ERROR the trait `BadAnnotation1` is not implemented for the type `u8`
49
-
trigger2::<u8,u8,u8>(1u8);//~ ERROR the trait `BadAnnotation2<u8, u8>` is not implemented
0 commit comments