-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICEs should always print the top of the query stack #77493
ICEs should always print the top of the query stack #77493
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@@ -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: | |||
we're just showing a limited slice of the query stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it shouldn't say this if all parts of the query stack have been printed. Even when the maximum length is limited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjorn3 so I guess I should normalize it right?
and also when I run the test, it fails, and it deletes the const-pat-ice.stderr file
do you think that we should remove it?
That test does not exist anymore (well, it doesn't ICE anymore). So you should be able to just remove all changes you did around it. You likely need to rebase over this repository's master branch. I'm not sure what your setup is, but if you invoke |
thanks, ok I will use this approach |
f3c495f
to
f3a3c81
Compare
if num_frames != None { | ||
eprintln!("we're just showing a limited slice of the query stack"); | ||
} else { | ||
eprintln!("end of query stack"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what bjorn3 is suggesting is
if num_frames != None { | |
eprintln!("we're just showing a limited slice of the query stack"); | |
} else { | |
eprintln!("end of query stack"); | |
} | |
if num_frames == None || num_frames >= Some(i) { | |
eprintln!("end of query stack"); | |
} else { | |
eprintln!("we're just showing a limited slice of the query stack"); | |
} |
but you'll also have to pull out let mut i = 0;
so that we have access to i
here.
This will make sure end of query stack
is printed if there are less than num_frames
frames to print.
After doing all your changes, please use |
Memo: this PR is related to #70953 |
if num_frames != None { | ||
eprintln!("we're just showing a limited slice of the query stack"); | ||
} else { | ||
if num_frames == None || num_frames >= Some(i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output did not change... Not sure what's wrong. If num_frames
is Some(2)
and i
is 0
, this should return true (according to the playground at least: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=57ab1b6049e331f483455f1ce170e183)
…ack message when RUST_BACKTRACE=0
guys anyone has any ideas about it? I thought a lot but I could not find the reason for this issue |
The failing test is a clippy lint, did you run |
668aaeb
to
46cc889
Compare
@oli-obk I guess now everything is ok |
@bors r+ great! |
📌 Commit 46cc889 has been approved by |
…_the_top_of_the_query_stack, r=oli-obk ICEs should always print the top of the query stack see rust-lang#76920
…_the_top_of_the_query_stack, r=oli-obk ICEs should always print the top of the query stack see rust-lang#76920
Rollup of 14 pull requests Successful merges: - rust-lang#75023 (ensure arguments are included in count mismatch span) - rust-lang#75265 (Add `str::{Split,RSplit,SplitN,RSplitN,SplitTerminator,RSplitTerminator,SplitInclusive}::as_str` methods) - rust-lang#75675 (mangling: mangle impl params w/ v0 scheme) - rust-lang#76084 (Refactor io/buffered.rs into submodules) - rust-lang#76119 (Stabilize move_ref_pattern) - rust-lang#77493 (ICEs should always print the top of the query stack) - rust-lang#77619 (Use futex-based thread-parker for Wasm32.) - rust-lang#77646 (For backtrace, use StaticMutex instead of a raw sys Mutex.) - rust-lang#77648 (Static mutex is static) - rust-lang#77657 (Cleanup cloudabi mutexes and condvars) - rust-lang#77672 (Simplify doc-cfg rendering based on the current context) - rust-lang#77780 (rustc_parse: fix spans on cast and range exprs with attrs) - rust-lang#77935 (BTreeMap: make PartialCmp/PartialEq explicit and tested) - rust-lang#77980 (Fix intra doc link for needs_drop) Failed merges: r? `@ghost`
…_the_top_of_the_query_stack, r=oli-obk ICEs should always print the top of the query stack see rust-lang#76920
see #76920