Skip to content
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

Cannot tell apart panic!() and assert!(false, "") in macro_backtrace() #82157

Open
Aurel300 opened this issue Feb 15, 2021 · 4 comments
Open
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way.

Comments

@Aurel300
Copy link

The two expressions:

panic!(); // A
assert!(false, "msg"); // B

Used to result in distinct macro_backtrace(). After updating to nightly-2021-02-14 (and I guess since #80851), the backtrace for both is identical, both listing the calls ["std::panic::panic_2015", "std::panic"].

IIUC, the latter should contain an additional core::assert or std::assert item in the backtrace.

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (5fa22fe6f 2021-02-14)
binary: rustc
commit-hash: 5fa22fe6f821ac3801d05f624b123dda25fde32c
commit-date: 2021-02-14
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 11.0.1
@jyn514
Copy link
Member

jyn514 commented Feb 16, 2021

@Aurel300 what do you mean by macro_backtrace? I can't find it in the docs for the standard library.

@jyn514
Copy link
Member

jyn514 commented Feb 16, 2021

@Aurel300
Copy link
Author

@jyn514 Yep, sorry, I should have linked to it. Yes, it is the Span::macro_backtrace you linked.

@jyn514 jyn514 added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) requires-nightly This issue requires a nightly compiler in some way. labels Feb 16, 2021
@jyn514
Copy link
Member

jyn514 commented Feb 16, 2021

cc @m-ou-se

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way.
Projects
None yet
Development

No branches or pull requests

2 participants