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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 6 additions & 6 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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
| ^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)