Skip to content

Commit b9c125a

Browse files
committed
Deal with spans showing std lib
Address rust-lang#53081
1 parent 865216b commit b9c125a

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

src/test/ui/suggestions/imm-ref-trait-object.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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
fn test(t: &dyn Iterator<Item=&u64>) -> u64 {
27
t.min().unwrap() //~ ERROR the `min` method cannot be invoked on a trait object
38
}

src/test/ui/suggestions/imm-ref-trait-object.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: 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
|
44
LL | t.min().unwrap()
55
| ^^^

src/test/ui/traits/trait-alias/trait-alias-object-fail.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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

38
trait EqAlias = Eq;

src/test/ui/traits/trait-alias/trait-alias-object-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[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
|
44
LL | 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

1212
error[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
|
1515
LL | let _: &dyn IteratorAlias = &vec![123].into_iter();
1616
| ^^^^^^^^^^^^^ help: specify the associated type: `IteratorAlias<Item = Type>`

0 commit comments

Comments
 (0)