Skip to content

Commit

Permalink
Disable some flags on issue-71363 test
Browse files Browse the repository at this point in the history
These flags make UI test fail on some env.
See rust-lang#97682 for more details.
  • Loading branch information
JohnTitor committed Jun 6, 2022
1 parent 43874a2 commit 3a58563
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
8 changes: 5 additions & 3 deletions src/test/ui/span/issue-71363.rs
@@ -1,6 +1,8 @@
// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z ui-testing=no
// only-x86_64-unknown-linux-gnu
//---^ Limiting target as the above unstable flags don't play well on some environment.
// ignore-test
// FIXME(#97682):
// The `-Z simulate-remapped-rust-src-base=/rustc/xyz -Z ui-testing=no` flags
// don't work well and make UI test fail on some env.
// Once it starts to work fine, we could re-enable them here.

struct MyError;
impl std::error::Error for MyError {}
Expand Down
42 changes: 25 additions & 17 deletions src/test/ui/span/issue-71363.stderr
@@ -1,26 +1,34 @@
error[E0277]: `MyError` doesn't implement `std::fmt::Display`
--> $DIR/issue-71363.rs:6:6
|
6 | impl std::error::Error for MyError {}
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `MyError`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
--> $DIR/issue-71363.rs:7:6
|
LL | impl std::error::Error for MyError {}
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `MyError`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `std::error::Error`
--> $SRC_DIR/std/src/error.rs:LL:COL
|
LL | pub trait Error: Debug + Display {
| ^^^^^^^ required by this bound in `std::error::Error`

error[E0277]: `MyError` doesn't implement `Debug`
--> $DIR/issue-71363.rs:6:6
|
6 | impl std::error::Error for MyError {}
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted using `{:?}`
|
= help: the trait `Debug` is not implemented for `MyError`
= note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
--> $DIR/issue-71363.rs:7:6
|
LL | impl std::error::Error for MyError {}
| ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted using `{:?}`
|
= help: the trait `Debug` is not implemented for `MyError`
= note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
note: required by a bound in `std::error::Error`
--> $SRC_DIR/std/src/error.rs:LL:COL
|
LL | pub trait Error: Debug + Display {
| ^^^^^ required by this bound in `std::error::Error`
help: consider annotating `MyError` with `#[derive(Debug)]`
|
5 | #[derive(Debug)]
|
|
LL | #[derive(Debug)]
|

error: aborting due to 2 previous errors

Expand Down

0 comments on commit 3a58563

Please sign in to comment.