From 3a58563c23846290693f06aeaa51406d9ecd600e Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 5 Jun 2022 11:16:11 +0900 Subject: [PATCH] Disable some flags on `issue-71363` test These flags make UI test fail on some env. See #97682 for more details. --- src/test/ui/span/issue-71363.rs | 8 +++--- src/test/ui/span/issue-71363.stderr | 42 +++++++++++++++++------------ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/test/ui/span/issue-71363.rs b/src/test/ui/span/issue-71363.rs index 3e85559caf923..369c8d34c5032 100644 --- a/src/test/ui/span/issue-71363.rs +++ b/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 {} diff --git a/src/test/ui/span/issue-71363.stderr b/src/test/ui/span/issue-71363.stderr index d54f21752b89a..b1eea9c5a006a 100644 --- a/src/test/ui/span/issue-71363.stderr +++ b/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