forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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 rust-lang#97789 - ferrocene:pa-fix-issue-71363-test, …
…r=cjgillot Fix rust-lang#71363's test by adding `-Z translate-remapped-path-to-local-path=no` The test relies on `library/std/src/error.rs` not corresponding to a local path, but remapping might still find the related local file of a remapped path. To fix the test, this PR adds a new `-Z` flag to disable finding the corresponding local path of a remapped path.
- Loading branch information
Showing
5 changed files
with
22 additions
and
8 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
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 |
---|---|---|
@@ -1,10 +1,19 @@ | ||
// 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. | ||
// compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z translate-remapped-path-to-local-path=no -Z ui-testing=no | ||
|
||
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 test relies on library/std/src/error.rs *not* being included in the error message, so that | ||
// we can test whether a file not included in the error message affects it (more specifically | ||
// whether the line number of the excluded file affects the indentation of the other line numbers). | ||
// | ||
// To test this we're simulating a remap of the rust src base (so that library/std/src/error.rs | ||
// does not point to a local file) *and* we're disabling the code to try mapping a remapped path to | ||
// a local file (which would defeat the purpose of the former flag). | ||
// | ||
// Note that this comment is at the bottom of the file intentionally, as we need the line number of | ||
// the impl to be lower than 10. |
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