-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Change column!() / line!() return type from usize to u32. #19284 #21769
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nick29581 (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. 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 CONTRIBUTING.md for more information. |
@@ -15,7 +15,8 @@ macro_rules! panic { | |||
panic!("explicit panic") | |||
); | |||
($msg:expr) => ({ | |||
static _MSG_FILE_LINE: (&'static str, &'static str, usize) = ($msg, file!(), line!()); | |||
static _MSG_FILE_LINE: (&'static str, &'static str, usize) = |
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.
Can you change this to expect a u32
rather than casting to usize
?
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.
#19284 has more details on that approach. Not much luck, so hoping someone familiar with this type of issue can shed some guidance.
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.
Could you use #[cfg(stage0)]
and #[cfg(not(stage0))]
to provide usize and u32 versions and thus avoid the errors?
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.
Ah. I'll give this a shot. Thanks
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.
Well.. still hitting the stage0 assertion in LLVM when using #[cfg(stage0)]
. I've added more details (backtrace of the stage0) in #19284. I'm afraid I need help from someone more familiar with the compiler.
Hi, sorry, I was on vacation last week. I saw a notification email, but there are more commits now - is this ready to go now or are there still issues you need help with? |
@nick29581 I believe it's good to go. @vojtechkral helped get past the LLVM assertions, so now the changes handle both stage0 and stage1+. Once the As a followup, |
Please see discussion in #19284 .
Please see discussion in #19284 .