File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1+ // FIXME: missing sysroot spans (#53081)
2+ // ignore-i586-unknown-linux-gnu
3+ // ignore-i586-unknown-linux-musl
4+ // ignore-i686-unknown-linux-musl
5+
16fn test ( t : & dyn Iterator < Item =& u64 > ) -> u64 {
27 t. min ( ) . unwrap ( ) //~ ERROR the `min` method cannot be invoked on a trait object
38}
Original file line number Diff line number Diff line change 11error: the `min` method cannot be invoked on a trait object
2- --> $DIR/imm-ref-trait-object.rs:2 :8
2+ --> $DIR/imm-ref-trait-object.rs:7 :8
33 |
44LL | t.min().unwrap()
55 | ^^^
Original file line number Diff line number Diff line change 1+ // FIXME: missing sysroot spans (#53081)
2+ // ignore-i586-unknown-linux-gnu
3+ // ignore-i586-unknown-linux-musl
4+ // ignore-i686-unknown-linux-musl
5+
16#![ feature( trait_alias) ]
27
38trait EqAlias = Eq ;
Original file line number Diff line number Diff line change 11error[E0038]: the trait `std::cmp::Eq` cannot be made into an object
2- --> $DIR/trait-alias-object-fail.rs:7 :13
2+ --> $DIR/trait-alias-object-fail.rs:12 :13
33 |
44LL | let _: &dyn EqAlias = &123;
55 | ^^^^^^^^^^^ the trait `std::cmp::Eq` cannot be made into an object
@@ -10,7 +10,7 @@ LL | pub trait Eq: PartialEq<Self> {
1010 | --------------- the trait cannot be made into an object because it uses `Self` as a type parameter in this
1111
1212error[E0191]: the value of the associated type `Item` (from trait `std::iter::Iterator`) must be specified
13- --> $DIR/trait-alias-object-fail.rs:9 :17
13+ --> $DIR/trait-alias-object-fail.rs:14 :17
1414 |
1515LL | let _: &dyn IteratorAlias = &vec![123].into_iter();
1616 | ^^^^^^^^^^^^^ help: specify the associated type: `IteratorAlias<Item = Type>`
You can’t perform that action at this time.
0 commit comments