Auto merge of #87615 - JohnTitor:rollup-t5jpmrg, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #87052 (Optimize fmt::PadAdapter::wrap)
 - #87522 (Fix assert in diy_float)
 - #87553 (Fix typo in rustc_driver::version)
 - #87554 (2229: Discr should be read when PatKind is Range)
 - #87564 (min_type_alias_impl_trait is going to be removed in 1.56)
 - #87574 (Update the examples in `String` and `VecDeque::retain`)
 - #87583 (Refactor compression cache in v0 symbol mangler)
 - #87585 (Add missing links for core::char types)
 - #87594 (fs File get_path procfs usage for netbsd same as linux.)
 - #87602 ([backtraces]: look for the `begin` symbol only after seeing `end`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2021-07-30 09:43:32 +00:00
commit 1195bea5a7
14 changed files with 143 additions and 70 deletions

View file

@ -0,0 +1,14 @@
// run-pass
// edition:2021
pub fn foo() {
let ref_x_ck = 123;
let _y = || match ref_x_ck {
2_000_000..=3_999_999 => { println!("A")}
_ => { println!("B")}
};
}
fn main() {
foo();
}

View file

@ -0,0 +1,49 @@
// Regression test for #87481: short backtrace formatting cut off the entire stack trace.
// Codegen-units is specified here so that we can replicate a typical rustc invocation which
// is not normally limited to 1 CGU. This is important so that the `__rust_begin_short_backtrace`
// and `__rust_end_short_backtrace` symbols are not marked internal to the CGU and thus will be
// named in the symbol table.
// compile-flags: -O -Ccodegen-units=8
// run-fail
// check-run-results
// exec-env:RUST_BACKTRACE=1
// We need to normalize out frame 5 because without debug info, dbghelp.dll doesn't know where CGU
// internal functions like `main` start or end and so it will return whatever symbol happens
// to be located near the address.
// normalize-stderr-test: "5: .*" -> "5: some Rust fn"
// Backtraces are pretty broken in general on i686-pc-windows-msvc (#62897).
// only-x86_64-pc-windows-msvc
fn main() {
a();
}
// Make these no_mangle so dbghelp.dll can figure out the symbol names.
#[no_mangle]
#[inline(never)]
fn a() {
b();
}
#[no_mangle]
#[inline(never)]
fn b() {
c();
}
#[no_mangle]
#[inline(never)]
fn c() {
d();
}
#[no_mangle]
#[inline(never)]
fn d() {
panic!("d was called");
}

View file

@ -0,0 +1,9 @@
thread 'main' panicked at 'd was called', $DIR/panic-short-backtrace-windows-x86_64.rs:48:5
stack backtrace:
0: std::panicking::begin_panic
1: d
2: c
3: b
4: a
5: some Rust fn
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.