File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Expand file tree Collapse file tree 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
22// normalize-stderr-test "alloc[0-9]+" -> "ALLOC_ID"
33
44#![ feature( const_swap) ]
Original file line number Diff line number Diff line change 11error[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
33 |
44 = note: unable to copy parts of a pointer from memory at ALLOC_ID
55 |
66 = help: this code performed an operation that depends on the underlying bytes representing a pointer
77 = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
88note: 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
1010note: 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
1212note: 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
1414note: 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
1616note: inside `X`
1717 --> $DIR/missing_span_in_backtrace.rs:17:9
1818 |
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
22
33struct MyError ;
44impl 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`
77 = help: the trait `std::fmt::Display` is not implemented for `MyError`
88 = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
99note: 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
1111 |
1212 = note: required by this bound in `std::error::Error`
1313
@@ -20,7 +20,7 @@ error[E0277]: `MyError` doesn't implement `Debug`
2020 = help: the trait `Debug` is not implemented for `MyError`
2121 = note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError`
2222note: 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
2424 |
2525 = note: required by this bound in `std::error::Error`
2626help: consider annotating `MyError` with `#[derive(Debug)]`
Original file line number Diff line number Diff line change @@ -3542,6 +3542,8 @@ impl<'test> TestCx<'test> {
35423542 option_env ! ( "CFG_VIRTUAL_RUST_SOURCE_BASE_DIR" ) . map ( PathBuf :: from) ,
35433543 // Virtual `/rustc/$sha` coming from download-rustc:
35443544 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 ( ) ) ,
35453547 ] ;
35463548 for base_dir in source_bases {
35473549 if let Some ( base_dir) = base_dir {
You can’t perform that action at this time.
0 commit comments