File tree 5 files changed +11
-9
lines changed
5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
- // compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
1
+ // compile-flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
2
2
// normalize-stderr-test "alloc[0-9]+" -> "ALLOC_ID"
3
3
4
4
#![ feature( const_swap) ]
Original file line number Diff line number Diff line change 1
1
error[E0080]: evaluation of constant value failed
2
- --> /rustc/xyz/library/ core/src/ptr/mod.rs:1135:9
2
+ --> $SRC_DIR/ core/src/ptr/mod.rs:LL:COL
3
3
|
4
4
= note: unable to copy parts of a pointer from memory at ALLOC_ID
5
5
|
6
6
= help: this code performed an operation that depends on the underlying bytes representing a pointer
7
7
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
8
8
note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
9
- --> /rustc/xyz/library/ core/src/ptr/mod.rs:1135:9
9
+ --> $SRC_DIR/ core/src/ptr/mod.rs:LL:COL
10
10
note: inside `mem::swap_simple::<MaybeUninit<MaybeUninit<u8>>>`
11
- --> /rustc/xyz/library/ core/src/mem/mod.rs:773:17
11
+ --> $SRC_DIR/ core/src/mem/mod.rs:LL:COL
12
12
note: inside `ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
13
- --> /rustc/xyz/library/ core/src/ptr/mod.rs:944:9
13
+ --> $SRC_DIR/ core/src/ptr/mod.rs:LL:COL
14
14
note: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
15
- --> /rustc/xyz/library/ core/src/ptr/mod.rs:925:14
15
+ --> $SRC_DIR/ core/src/ptr/mod.rs:LL:COL
16
16
note: inside `X`
17
17
--> $DIR/missing_span_in_backtrace.rs:17:9
18
18
|
Original file line number Diff line number Diff line change 1
- // compile-flags: -Z simulate-remapped-rust-src-base=/rustc/xyz -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
1
+ // compile-flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ui-testing=no
2
2
3
3
struct MyError ;
4
4
impl std:: error:: Error for MyError { }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ error[E0277]: `MyError` doesn't implement `std::fmt::Display`
7
7
= help: the trait `std::fmt::Display` is not implemented for `MyError`
8
8
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
9
9
note: required by a bound in `std::error::Error`
10
- --> /rustc/xyz/library/ core/src/error.rs:31:26
10
+ --> $SRC_DIR/ core/src/error.rs:LL:COL
11
11
|
12
12
= note: required by this bound in `std::error::Error`
13
13
@@ -20,7 +20,7 @@ error[E0277]: `MyError` doesn't implement `Debug`
20
20
= help: the trait `Debug` is not implemented for `MyError`
21
21
= note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
22
22
note: required by a bound in `std::error::Error`
23
- --> /rustc/xyz/library/ core/src/error.rs:31:18
23
+ --> $SRC_DIR/ core/src/error.rs:LL:COL
24
24
|
25
25
= note: required by this bound in `std::error::Error`
26
26
help: consider annotating `MyError` with `#[derive(Debug)]`
Original file line number Diff line number Diff line change @@ -3542,6 +3542,8 @@ impl<'test> TestCx<'test> {
3542
3542
option_env ! ( "CFG_VIRTUAL_RUST_SOURCE_BASE_DIR" ) . map ( PathBuf :: from) ,
3543
3543
// Virtual `/rustc/$sha` coming from download-rustc:
3544
3544
std:: env:: var_os ( "FAKE_DOWNLOAD_RUSTC_PREFIX" ) . map ( PathBuf :: from) ,
3545
+ // Tests using -Zsimulate-remapped-rust-src-base should use this fake path
3546
+ Some ( "/rustc/FAKE_PREFIX" . into ( ) ) ,
3545
3547
] ;
3546
3548
for base_dir in source_bases {
3547
3549
if let Some ( base_dir) = base_dir {
You can’t perform that action at this time.
0 commit comments