match which {
GitRepo::Rustc => {
- let sha = self.rust_sha().unwrap_or(&self.version);
-
- match remap_scheme {
- RemapScheme::Compiler => {
- // For compiler sources, remap via `/rustc-dev/{sha}` to allow
- // distinguishing between compiler sources vs library sources, since
- // `rustc-dev` dist component places them under
- // `$sysroot/lib/rustlib/rustc-src/rust` as opposed to `rust-src`'s
- // `$sysroot/lib/rustlib/src/rust`.
- //
- // Keep this scheme in sync with `rustc_metadata::rmeta::decoder`'s
- // `try_to_translate_virtual_to_real`.
- Some(format!("/rustc-dev/{sha}"))
- }
- RemapScheme::NonCompiler => {
- // For non-compiler sources, use `/rustc/{sha}` remapping scheme.
- Some(format!("/rustc/{sha}"))
- }
- }
+ Some(format!("/usr/src/rustc-{}", &self.version))
}
- GitRepo::Llvm => Some(String::from("/rustc/llvm")),
+ GitRepo::Llvm => panic!("GitRepo::Llvm unsupported on Debian"),
}
}
// true automatically. If paths to std library hasn't been remapped, we use the
// above simulate-remapped-rust-src-base option to do it temporarily
-// CHECK: !DIFile(filename: "{{/rustc/.*/library/std/src/panic.rs}}"
+// CHECK: !DIFile(filename: "{{/usr/src/rustc-.*/library/std/src/panic.rs}}"
fn main() {
std::thread::spawn(|| {
println!("hello");
llvm_dwarfdump()
.input("libstd.rlib")
.run()
- .assert_stdout_contains("/rustc/")
+ .assert_stdout_contains_regex("/usr/src/rustc-[^/]+/")
.assert_stdout_not_contains(source_root().to_string_lossy());
}
//@ normalize-stderr: "note: compiler flags.*\n\n" -> ""
//@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
-//@ normalize-stderr: "thread.*panicked at compiler.*" -> ""
+//@ normalize-stderr: "thread.*panicked at /.*compiler.*" -> ""
//@ normalize-stderr: " +\d{1,}: .*\n" -> ""
//@ normalize-stderr: " + at .*\n" -> ""
//@ normalize-stderr: ".*note: Some details are omitted.*\n" -> ""
// Normalize the emitted location so this doesn't need
// updating everytime someone adds or removes a line.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
+//@ normalize-stderr: "/usr/src/rustc-[^/]+/" -> ""
struct A;
struct B;
//@ exec-env:RUST_BACKTRACE=0
//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ ignore-backends: gcc
#![feature(extern_types)]
//@ exec-env:RUST_BACKTRACE=0
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//
// Regression test for issue #70963
// The reported panic location should not be `<::core::macros::panic macros>`.
//@ normalize-stderr: "storage_live\[....\]" -> "storage_live[HASH]"
//@ normalize-stderr: "(delayed at [^:]+):\d+:\d+ - " -> "$1:LL:CC - "
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ rustc-env:RUST_BACKTRACE=0
#![feature(custom_mir, core_intrinsics)]
error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH]::multiple_storage)) (after pass CheckForceInline) at bb0[1]:
StorageLive(_1) which already has storage here
- --> $DIR/storage-live.rs:22:13
+ --> $DIR/storage-live.rs:23:13
|
LL | StorageLive(a);
| ^^^^^^^^^^^^^^
|
note: delayed at compiler/rustc_mir_transform/src/lint.rs:LL:CC - disabled backtrace
- --> $DIR/storage-live.rs:22:13
+ --> $DIR/storage-live.rs:23:13
|
LL | StorageLive(a);
| ^^^^^^^^^^^^^^
//@ normalize-stderr: "\n +at [^\n]+" -> ""
//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ needs-unwind
//@ ignore-emscripten "RuntimeError" junk in output
//@ ignore-msvc SEH doesn't do panic-during-cleanup the same way as everyone else
-thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:23:5:
+thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:24:5:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
-thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:17:9:
+thread 'main' ($TID) panicked at $DIR/panic-in-cleanup.rs:18:9:
BOOM
stack backtrace:
//@ normalize-stderr: "\n +at [^\n]+" -> ""
//@ normalize-stderr: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ needs-unwind
//@ ignore-emscripten "RuntimeError" junk in output
-thread 'main' ($TID) panicked at $DIR/panic-in-ffi.rs:22:5:
+thread 'main' ($TID) panicked at $DIR/panic-in-ffi.rs:23:5:
Test
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Noisy Drop
//@ ignore-backends: gcc
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ compile-flags: -Zon-broken-pipe=error
// Test what the error message looks like when `println!()` panics because of
.stdout(Stdio::piped())
.spawn()
.unwrap();
- let mut consumer =
- Command::new("head").arg("-n1").stdin(producer.stdout.take().unwrap()).spawn().unwrap();
+ let mut consumer = Command::new("head")
+ .arg("-n1")
+ .stdin(producer.stdout.take().unwrap())
+ .spawn()
+ .unwrap();
consumer.wait().unwrap();
producer.wait().unwrap();
}
//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
//@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ rustc-env:RUST_BACKTRACE=0
#[repr(packed)]
error[E0428]: the name `Dealigned` is defined multiple times
- --> $DIR/multiple_definitions_attribute_merging.rs:18:1
+ --> $DIR/multiple_definitions_attribute_merging.rs:19:1
|
LL | struct Dealigned<T>(u8, T);
| --------------------------- previous definition of the type `Dealigned` here
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Dealigned` redefined here
|
= error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:LL:CC: builtin derive created an unaligned reference
- --> $DIR/multiple_definitions_attribute_merging.rs:18:25
+ --> $DIR/multiple_definitions_attribute_merging.rs:19:25
|
LL | #[derive(PartialEq)]
| --------- in this derive macro expansion
Box<dyn Any>
query stack during panic:
-#0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:16:10: 16:19>::eq`
-#1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:16:10: 16:19>::eq`
+#0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:17:10: 17:19>::eq`
+#1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:17:10: 17:19>::eq`
... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
error: aborting due to 2 previous errors
//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> ""
//@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
//@ rustc-env:RUST_BACKTRACE=0
extern crate proc_macro_generate_packed;
error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:LL:CC: builtin derive created an unaligned reference
- --> $DIR/proc_macro_generated_packed.rs:19:25
+ --> $DIR/proc_macro_generated_packed.rs:20:25
|
LL | #[derive(PartialEq)]
| --------- in this derive macro expansion
Box<dyn Any>
query stack during panic:
-#0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:16:10: 16:19>::eq`
-#1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:16:10: 16:19>::eq`
+#0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:17:10: 17:19>::eq`
+#1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:17:10: 17:19>::eq`
... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
error: aborting due to 1 previous error
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
// The test becomes too flaky if we care about exact args. If `-Z ui-testing`
// from compiletest and `-Z track-diagnostics` from `// compile-flags` at the
// updating everytime someone adds or removes a line.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
fn main() {
let _moved @ _from = String::from("foo");
// updating everytime someone adds or removes a line.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
fn main() {
let _unimported = Blah { field: u8 };
// updating everytime someone adds or removes a line.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
pub onion {
//~^ ERROR missing `enum` for enum definition
// updating everytime someone adds or removes a line.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
}
//~^ ERROR unexpected closing delimiter: `}`
// updating everytime someone adds or removes a line.
//@ normalize-stderr: ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr: "/rustc(?:-dev)?/[a-z0-9.]+/" -> ""
+//@ normalize-stderr: "/usr/src/rustc-(?:[^/]*)?/" -> ""
pub trait Foo {
fn bar();