about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-16 00:18:13 +0000
committerbors <bors@rust-lang.org>2020-10-16 00:18:13 +0000
commitb6e2dc6cdece6b498b876bc7e9377ff7d63d93e7 (patch)
treeb0cade8eff84561b5f9a195b67829b7af2c866c0 /src/tools
parentdd7fc54ebdca419ad9d3ab1e9f5ed14e770768ea (diff)
parente688b4d51cc9b41b18b240f5f6358daa8179e8fa (diff)
downloadrust-b6e2dc6cdece6b498b876bc7e9377ff7d63d93e7.tar.gz
rust-b6e2dc6cdece6b498b876bc7e9377ff7d63d93e7.zip
Auto merge of #78001 - Dylan-DPC:rollup-zq3kxth, r=Dylan-DPC
Rollup of 14 pull requests

Successful merges:

 - #75023 (ensure arguments are included in count mismatch span)
 - #75265 (Add `str::{Split,RSplit,SplitN,RSplitN,SplitTerminator,RSplitTerminator,SplitInclusive}::as_str` methods)
 - #75675 (mangling: mangle impl params w/ v0 scheme)
 - #76084 (Refactor io/buffered.rs into submodules)
 - #76119 (Stabilize move_ref_pattern)
 - #77493 (ICEs should always print the top of the query stack)
 - #77619 (Use futex-based thread-parker for Wasm32.)
 - #77646 (For backtrace, use StaticMutex instead of a raw sys Mutex.)
 - #77648 (Static mutex is static)
 - #77657 (Cleanup cloudabi mutexes and condvars)
 - #77672 (Simplify doc-cfg rendering based on the current context)
 - #77780 (rustc_parse: fix spans on cast and range exprs with attrs)
 - #77935 (BTreeMap: make PartialCmp/PartialEq explicit and tested)
 - #77980 (Fix intra doc link for needs_drop)

Failed merges:

r? `@ghost`
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/clippy/src/driver.rs6
-rw-r--r--src/tools/clippy/tests/ui/custom_ice_message.stderr2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs
index 377f6d22446..805828eece1 100644
--- a/src/tools/clippy/src/driver.rs
+++ b/src/tools/clippy/src/driver.rs
@@ -277,9 +277,9 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     // If backtraces are enabled, also print the query stack
     let backtrace = env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0");
 
-    if backtrace {
-        TyCtxt::try_print_query_stack(&handler);
-    }
+    let num_frames = if backtrace { None } else { Some(2) };
+
+    TyCtxt::try_print_query_stack(&handler, num_frames);
 }
 
 fn toolchain_path(home: Option<String>, toolchain: Option<String>) -> Option<PathBuf> {
diff --git a/src/tools/clippy/tests/ui/custom_ice_message.stderr b/src/tools/clippy/tests/ui/custom_ice_message.stderr
index a9a65a38c10..a1b8e2ee162 100644
--- a/src/tools/clippy/tests/ui/custom_ice_message.stderr
+++ b/src/tools/clippy/tests/ui/custom_ice_message.stderr
@@ -9,3 +9,5 @@ note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy
 
 note: Clippy version: foo
 
+query stack during panic:
+end of query stack