-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #97504 - JohnTitor:cleanup-deps, r=davidtwco
Ensure source file present when calculating max line number Resubmission of #89268, fixes #71363 The behavior difference of `simulate-remapped-rust-src-base` is not something we should take into account here, so limiting targets to run the test makes sense, I think. r? `@davidtwco,` and `@estebank,` you might be interested in this change
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// 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. | ||
|
||
struct MyError; | ||
impl std::error::Error for MyError {} | ||
//~^ ERROR: `MyError` doesn't implement `std::fmt::Display` | ||
//~| ERROR: `MyError` doesn't implement `Debug` | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 | ||
note: required by a 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` | ||
note: required by a bound in `std::error::Error` | ||
help: consider annotating `MyError` with `#[derive(Debug)]` | ||
| | ||
5 | #[derive(Debug)] | ||
| | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |