Skip to content

Commit 3a58563

Browse files
committed
Disable some flags on issue-71363 test
These flags make UI test fail on some env. See #97682 for more details.
1 parent 43874a2 commit 3a58563

File tree

2 files changed

+30
-20
lines changed

2 files changed

+30
-20
lines changed

src/test/ui/span/issue-71363.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z ui-testing=no
2-
// only-x86_64-unknown-linux-gnu
3-
//---^ Limiting target as the above unstable flags don't play well on some environment.
1+
// ignore-test
2+
// FIXME(#97682):
3+
// The `-Z simulate-remapped-rust-src-base=/rustc/xyz -Z ui-testing=no` flags
4+
// don't work well and make UI test fail on some env.
5+
// Once it starts to work fine, we could re-enable them here.
46

57
struct MyError;
68
impl std::error::Error for MyError {}

src/test/ui/span/issue-71363.stderr

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
error[E0277]: `MyError` doesn't implement `std::fmt::Display`
2-
--> $DIR/issue-71363.rs:6:6
3-
|
4-
6 | impl std::error::Error for MyError {}
5-
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter
6-
|
7-
= help: the trait `std::fmt::Display` is not implemented for `MyError`
8-
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
2+
--> $DIR/issue-71363.rs:7:6
3+
|
4+
LL | impl std::error::Error for MyError {}
5+
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter
6+
|
7+
= help: the trait `std::fmt::Display` is not implemented for `MyError`
8+
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
99
note: required by a bound in `std::error::Error`
10+
--> $SRC_DIR/std/src/error.rs:LL:COL
11+
|
12+
LL | pub trait Error: Debug + Display {
13+
| ^^^^^^^ required by this bound in `std::error::Error`
1014

1115
error[E0277]: `MyError` doesn't implement `Debug`
12-
--> $DIR/issue-71363.rs:6:6
13-
|
14-
6 | impl std::error::Error for MyError {}
15-
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted using `{:?}`
16-
|
17-
= help: the trait `Debug` is not implemented for `MyError`
18-
= note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
16+
--> $DIR/issue-71363.rs:7:6
17+
|
18+
LL | impl std::error::Error for MyError {}
19+
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted using `{:?}`
20+
|
21+
= help: the trait `Debug` is not implemented for `MyError`
22+
= note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
1923
note: required by a bound in `std::error::Error`
24+
--> $SRC_DIR/std/src/error.rs:LL:COL
25+
|
26+
LL | pub trait Error: Debug + Display {
27+
| ^^^^^ required by this bound in `std::error::Error`
2028
help: consider annotating `MyError` with `#[derive(Debug)]`
21-
|
22-
5 | #[derive(Debug)]
23-
|
29+
|
30+
LL | #[derive(Debug)]
31+
|
2432

2533
error: aborting due to 2 previous errors
2634

0 commit comments

Comments
 (0)