rebase with master
This commit is contained in:
parent
15663a432d
commit
2124e9b50e
@ -1214,7 +1214,9 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
|
|||||||
// If backtraces are enabled, also print the query stack
|
// If backtraces are enabled, also print the query stack
|
||||||
let backtrace = env::var_os("RUST_BACKTRACE").map(|x| &x != "0").unwrap_or(false);
|
let backtrace = env::var_os("RUST_BACKTRACE").map(|x| &x != "0").unwrap_or(false);
|
||||||
|
|
||||||
TyCtxt::try_print_query_stack(&handler, Some(2), Some(backtrace));
|
let num_frames = if backtrace { None } else { Some(2) };
|
||||||
|
|
||||||
|
TyCtxt::try_print_query_stack(&handler, num_frames);
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -124,11 +124,15 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
pub fn try_print_query_stack(
|
pub fn try_print_query_stack(
|
||||||
handler: &Handler,
|
handler: &Handler,
|
||||||
num_frames: Option<usize>,
|
num_frames: Option<usize>,
|
||||||
backtrace: Option<bool>,
|
backtrace: Option<bool>,
|
||||||
) {
|
) {
|
||||||
|
=======
|
||||||
|
pub fn try_print_query_stack(handler: &Handler, num_frames: Option<usize>) {
|
||||||
|
>>>>>>> 15827338aa231fd408561bf5db8d8eea85d1a51a
|
||||||
eprintln!("query stack during panic:");
|
eprintln!("query stack during panic:");
|
||||||
|
|
||||||
// Be careful reyling on global state here: this code is called from
|
// Be careful reyling on global state here: this code is called from
|
||||||
@ -142,7 +146,11 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
|
|
||||||
while let Some(query) = current_query {
|
while let Some(query) = current_query {
|
||||||
|
<<<<<<< HEAD
|
||||||
if backtrace.unwrap() == false && i == num_frames.unwrap() {
|
if backtrace.unwrap() == false && i == num_frames.unwrap() {
|
||||||
|
=======
|
||||||
|
if num_frames == Some(i) {
|
||||||
|
>>>>>>> 15827338aa231fd408561bf5db8d8eea85d1a51a
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let query_info =
|
let query_info =
|
||||||
|
@ -277,7 +277,9 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
|
|||||||
// If backtraces are enabled, also print the query stack
|
// If backtraces are enabled, also print the query stack
|
||||||
let backtrace = env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0");
|
let backtrace = env::var_os("RUST_BACKTRACE").map_or(false, |x| &x != "0");
|
||||||
|
|
||||||
TyCtxt::try_print_query_stack(&handler, Some(2), Some(backtrace));
|
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> {
|
fn toolchain_path(home: Option<String>, toolchain: Option<String>) -> Option<PathBuf> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user