Skip to content

Commit 05c0791

Browse files
committed
consistent handling of missing sysroot spans
1 parent f39205b commit 05c0791

25 files changed

+49
-62
lines changed

src/test/ui/async-await/issues/issue-62009-1.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// edition:2018
2-
// ignore-x86
3-
// ^ due to stderr output differences
2+
// ignore-x86 FIXME: missing sysroot spans (#53081)
43

54
async fn print_dur() {}
65

src/test/ui/async-await/issues/issue-62009-1.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0728]: `await` is only allowed inside `async` functions and blocks
2-
--> $DIR/issue-62009-1.rs:8:5
2+
--> $DIR/issue-62009-1.rs:7:5
33
|
44
LL | fn main() {
55
| ---- this is not `async`
66
LL | async { let (); }.await;
77
| ^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
88

99
error[E0728]: `await` is only allowed inside `async` functions and blocks
10-
--> $DIR/issue-62009-1.rs:10:5
10+
--> $DIR/issue-62009-1.rs:9:5
1111
|
1212
LL | fn main() {
1313
| ---- this is not `async`
@@ -19,19 +19,19 @@ LL | | }.await;
1919
| |___________^ only allowed inside `async` functions and blocks
2020

2121
error[E0728]: `await` is only allowed inside `async` functions and blocks
22-
--> $DIR/issue-62009-1.rs:14:5
22+
--> $DIR/issue-62009-1.rs:13:5
2323
|
2424
LL | fn main() {
2525
| ---- this is not `async`
2626
...
2727
LL | (|_| 2333).await;
2828
| ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks
2929

30-
error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]: std::future::Future` is not satisfied
31-
--> $DIR/issue-62009-1.rs:14:5
30+
error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:13:5: 13:15]: std::future::Future` is not satisfied
31+
--> $DIR/issue-62009-1.rs:13:5
3232
|
3333
LL | (|_| 2333).await;
34-
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]`
34+
| ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:13:5: 13:15]`
3535
|
3636
::: $SRC_DIR/libstd/future.rs:LL:COL
3737
|

src/test/ui/closures/closure-move-sync.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
use std::thread;
43
use std::sync::mpsc::channel;
54

src/test/ui/closures/closure-move-sync.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
2-
--> $DIR/closure-move-sync.rs:8:13
2+
--> $DIR/closure-move-sync.rs:7:13
33
|
44
LL | let t = thread::spawn(|| {
55
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
@@ -11,10 +11,10 @@ LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
1111
|
1212
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
1313
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>`
14-
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:8:27: 11:6 recv:&std::sync::mpsc::Receiver<()>]`
14+
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:7:27: 10:6 recv:&std::sync::mpsc::Receiver<()>]`
1515

1616
error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
17-
--> $DIR/closure-move-sync.rs:20:5
17+
--> $DIR/closure-move-sync.rs:19:5
1818
|
1919
LL | thread::spawn(|| tx.send(()).unwrap());
2020
| ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
@@ -26,7 +26,7 @@ LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
2626
|
2727
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<()>`
2828
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Sender<()>`
29-
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:20:19: 20:42 tx:&std::sync::mpsc::Sender<()>]`
29+
= note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:19:19: 19:42 tx:&std::sync::mpsc::Sender<()>]`
3030

3131
error: aborting due to 2 previous errors
3232

src/test/ui/consts/const-size_of-cycle.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-musl
2-
// ignore-x86
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
// error-pattern: cycle detected
43

54
struct Foo {

src/test/ui/consts/const-size_of-cycle.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0391]: cycle detected when const-evaluating + checking `Foo::bytes::{{constant}}#0`
2-
--> $DIR/const-size_of-cycle.rs:6:17
2+
--> $DIR/const-size_of-cycle.rs:5:17
33
|
44
LL | bytes: [u8; std::mem::size_of::<Foo>()]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: ...which requires const-evaluating + checking `Foo::bytes::{{constant}}#0`...
8-
--> $DIR/const-size_of-cycle.rs:6:17
8+
--> $DIR/const-size_of-cycle.rs:5:17
99
|
1010
LL | bytes: [u8; std::mem::size_of::<Foo>()]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | pub fn size_of<T>() -> usize;
2323
= note: ...which requires normalizing `ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All, def_id: None }, value: [u8; _] }`...
2424
= note: ...which again requires const-evaluating + checking `Foo::bytes::{{constant}}#0`, completing the cycle
2525
note: cycle used when processing `Foo`
26-
--> $DIR/const-size_of-cycle.rs:5:1
26+
--> $DIR/const-size_of-cycle.rs:4:1
2727
|
2828
LL | struct Foo {
2929
| ^^^^^^^^^^

src/test/ui/impl-trait/impl-generic-mismatch.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-musl
2-
// ignore-x86
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32

43
use std::fmt::Debug;
54

src/test/ui/impl-trait/impl-generic-mismatch.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0643]: method `foo` has incompatible signature for trait
2-
--> $DIR/impl-generic-mismatch.rs:11:12
2+
--> $DIR/impl-generic-mismatch.rs:10:12
33
|
44
LL | fn foo(&self, _: &impl Debug);
55
| ---------- declaration in trait here
@@ -13,7 +13,7 @@ LL | fn foo(&self, _: &impl Debug) { }
1313
| -- ^^^^^^^^^^
1414

1515
error[E0643]: method `bar` has incompatible signature for trait
16-
--> $DIR/impl-generic-mismatch.rs:20:23
16+
--> $DIR/impl-generic-mismatch.rs:19:23
1717
|
1818
LL | fn bar<U: Debug>(&self, _: &U);
1919
| - declaration in trait here
@@ -27,7 +27,7 @@ LL | fn bar<U: Debug>(&self, _: &U) { }
2727
| ^^^^^^^^^^ ^
2828

2929
error[E0643]: method `hash` has incompatible signature for trait
30-
--> $DIR/impl-generic-mismatch.rs:31:33
30+
--> $DIR/impl-generic-mismatch.rs:30:33
3131
|
3232
LL | fn hash(&self, hasher: &mut impl Hasher) {}
3333
| ^^^^^^^^^^^ expected generic parameter, found `impl Trait`

src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
// aux-build:two_macros.rs
43

54
macro_rules! define_vec {

src/test/ui/imports/extern-prelude-extern-crate-restricted-shadowing.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: macro-expanded `extern crate` items cannot shadow names passed with `--extern`
2-
--> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:21:9
2+
--> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:20:9
33
|
44
LL | extern crate std as core;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,13 +8,13 @@ LL | define_other_core!();
88
| --------------------- in this macro invocation
99

1010
error[E0659]: `Vec` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
11-
--> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:15:9
11+
--> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:14:9
1212
|
1313
LL | Vec::panic!();
1414
| ^^^ ambiguous name
1515
|
1616
note: `Vec` could refer to the crate imported here
17-
--> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:7:9
17+
--> $DIR/extern-prelude-extern-crate-restricted-shadowing.rs:6:9
1818
|
1919
LL | extern crate std as Vec;
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
use std::ops::Deref;
43
trait Trait {}
54

src/test/ui/in-band-lifetimes/mismatched_trait_impl-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: `impl` item signature doesn't match `trait` item signature
2-
--> $DIR/mismatched_trait_impl-2.rs:10:5
2+
--> $DIR/mismatched_trait_impl-2.rs:9:5
33
|
44
LL | fn deref(&self) -> &dyn Trait {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found fn(&Struct) -> &dyn Trait

src/test/ui/interior-mutability/interior-mutability.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
use std::cell::Cell;
43
use std::panic::catch_unwind;
54
fn main() {

src/test/ui/interior-mutability/interior-mutability.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the type `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
2-
--> $DIR/interior-mutability.rs:7:5
2+
--> $DIR/interior-mutability.rs:6:5
33
|
44
LL | catch_unwind(|| { x.set(23); });
55
| ^^^^^^^^^^^^ `std::cell::UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
@@ -12,7 +12,7 @@ LL | pub fn catch_unwind<F: FnOnce() -> R + UnwindSafe, R>(f: F) -> Result<R> {
1212
= help: within `std::cell::Cell<i32>`, the trait `std::panic::RefUnwindSafe` is not implemented for `std::cell::UnsafeCell<i32>`
1313
= note: required because it appears within the type `std::cell::Cell<i32>`
1414
= note: required because of the requirements on the impl of `std::panic::UnwindSafe` for `&std::cell::Cell<i32>`
15-
= note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:7:18: 7:35 x:&std::cell::Cell<i32>]`
15+
= note: required because it appears within the type `[closure@$DIR/interior-mutability.rs:6:18: 6:35 x:&std::cell::Cell<i32>]`
1616

1717
error: aborting due to previous error
1818

src/test/ui/issues/issue-21160.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
struct Bar;
43

54
impl Bar {

src/test/ui/issues/issue-21160.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Bar: std::hash::Hash` is not satisfied
2-
--> $DIR/issue-21160.rs:10:12
2+
--> $DIR/issue-21160.rs:9:12
33
|
44
LL | struct Foo(Bar);
55
| ^^^ the trait `std::hash::Hash` is not implemented for `Bar`

src/test/ui/issues/issue-27033.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
fn main() {
43
match Some(1) {
54
None @ _ => {} //~ ERROR match bindings cannot shadow unit variants

src/test/ui/issues/issue-27033.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0530]: match bindings cannot shadow unit variants
2-
--> $DIR/issue-27033.rs:5:9
2+
--> $DIR/issue-27033.rs:4:9
33
|
44
LL | None @ _ => {}
55
| ^^^^ cannot be named the same as a unit variant
@@ -10,7 +10,7 @@ LL | pub use crate::option::Option::{self, Some, None};
1010
| ---- the unit variant `None` is defined here
1111

1212
error[E0530]: match bindings cannot shadow constants
13-
--> $DIR/issue-27033.rs:9:9
13+
--> $DIR/issue-27033.rs:8:9
1414
|
1515
LL | const C: u8 = 1;
1616
| ---------------- the constant `C` is defined here

src/test/ui/no-send-res-ports.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
use std::thread;
43
use std::rc::Rc;
54

src/test/ui/no-send-res-ports.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely
2-
--> $DIR/no-send-res-ports.rs:27:5
2+
--> $DIR/no-send-res-ports.rs:26:5
33
|
44
LL | thread::spawn(move|| {
55
| ^^^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely
@@ -9,10 +9,10 @@ LL | thread::spawn(move|| {
99
LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
1010
| ---- required by this bound in `std::thread::spawn`
1111
|
12-
= help: within `[closure@$DIR/no-send-res-ports.rs:27:19: 31:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
12+
= help: within `[closure@$DIR/no-send-res-ports.rs:26:19: 30:6 x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`
1313
= note: required because it appears within the type `Port<()>`
1414
= note: required because it appears within the type `main::Foo`
15-
= note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:27:19: 31:6 x:main::Foo]`
15+
= note: required because it appears within the type `[closure@$DIR/no-send-res-ports.rs:26:19: 30:6 x:main::Foo]`
1616

1717
error: aborting due to previous error
1818

src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// compile-flags: --test
2-
// ignore-x86
3-
// ^ due to stderr output differences
2+
// ignore-x86 FIXME: missing sysroot spans (#53081)
43

54
use std::num::ParseFloatError;
65

src/test/ui/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `main` has invalid return type `std::result::Result<f32, std::num::ParseFloatError>`
2-
--> $DIR/termination-trait-test-wrong-type.rs:8:1
2+
--> $DIR/termination-trait-test-wrong-type.rs:7:1
33
|
44
LL | / fn can_parse_zero_as_f32() -> Result<f32, ParseFloatError> {
55
LL | | "0".parse()

src/test/ui/traits/trait-suggest-where-clause.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-x86
2-
// ^ due to stderr output differences
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
use std::mem;
43

54
struct Misc<T:?Sized>(T);

src/test/ui/traits/trait-suggest-where-clause.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the size for values of type `U` cannot be known at compilation time
2-
--> $DIR/trait-suggest-where-clause.rs:9:20
2+
--> $DIR/trait-suggest-where-clause.rs:8:20
33
|
44
LL | fn check<T: Iterator, U: ?Sized>() {
55
| -- help: consider further restricting this bound: `U: std::marker::Sized +`
@@ -16,7 +16,7 @@ LL | pub const fn size_of<T>() -> usize {
1616
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1717

1818
error[E0277]: the size for values of type `U` cannot be known at compilation time
19-
--> $DIR/trait-suggest-where-clause.rs:12:5
19+
--> $DIR/trait-suggest-where-clause.rs:11:5
2020
|
2121
LL | fn check<T: Iterator, U: ?Sized>() {
2222
| -- help: consider further restricting this bound: `U: std::marker::Sized +`
@@ -34,31 +34,31 @@ LL | pub const fn size_of<T>() -> usize {
3434
= note: required because it appears within the type `Misc<U>`
3535

3636
error[E0277]: the trait bound `u64: std::convert::From<T>` is not satisfied
37-
--> $DIR/trait-suggest-where-clause.rs:17:5
37+
--> $DIR/trait-suggest-where-clause.rs:16:5
3838
|
3939
LL | <u64 as From<T>>::from;
4040
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `u64`
4141
|
4242
= note: required by `std::convert::From::from`
4343

4444
error[E0277]: the trait bound `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
45-
--> $DIR/trait-suggest-where-clause.rs:20:5
45+
--> $DIR/trait-suggest-where-clause.rs:19:5
4646
|
4747
LL | <u64 as From<<T as Iterator>::Item>>::from;
4848
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented for `u64`
4949
|
5050
= note: required by `std::convert::From::from`
5151

5252
error[E0277]: the trait bound `Misc<_>: std::convert::From<T>` is not satisfied
53-
--> $DIR/trait-suggest-where-clause.rs:25:5
53+
--> $DIR/trait-suggest-where-clause.rs:24:5
5454
|
5555
LL | <Misc<_> as From<T>>::from;
5656
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<T>` is not implemented for `Misc<_>`
5757
|
5858
= note: required by `std::convert::From::from`
5959

6060
error[E0277]: the size for values of type `[T]` cannot be known at compilation time
61-
--> $DIR/trait-suggest-where-clause.rs:30:20
61+
--> $DIR/trait-suggest-where-clause.rs:29:20
6262
|
6363
LL | mem::size_of::<[T]>();
6464
| ^^^ doesn't have a size known at compile-time
@@ -72,7 +72,7 @@ LL | pub const fn size_of<T>() -> usize {
7272
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
7373

7474
error[E0277]: the size for values of type `[&U]` cannot be known at compilation time
75-
--> $DIR/trait-suggest-where-clause.rs:33:5
75+
--> $DIR/trait-suggest-where-clause.rs:32:5
7676
|
7777
LL | mem::size_of::<[&U]>();
7878
| ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time

src/test/ui/type_length_limit.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// ignore-musl
2-
// ignore-x86
1+
// ignore-x86 FIXME: missing sysroot spans (#53081)
32
// error-pattern: reached the type-length limit while instantiating
43

54
// Test that the type length limit can be changed.

0 commit comments

Comments
 (0)