-
Notifications
You must be signed in to change notification settings - Fork 861
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
format safety keywords on static items #6204
format safety keywords on static items #6204
Conversation
This includes both `ast::StaticItem` and `ast::StaticForeignItem`. `safety` was added to both `ast::StaticItem` and `ast::SaticForeignItem` in rust-lang/rust#124482.
|
||
#![feature(unsafe_extern_blocks)] | ||
|
||
safe static TEST1: i32; |
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'm not sure that formatting the safety
here is necessary per this comment https://github.com/rust-lang/rust/pull/124482/files#r1608953719. For now it parses, so I don't think there's an issue, though I'm happy to revert the changes to StaticParts
if we don't think this is necessary.
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.
Let's keep it, since it doesn't hurt.
|
||
#![feature(unsafe_extern_blocks)] | ||
|
||
safe static TEST1: i32; |
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.
Let's keep it, since it doesn't hurt.
probably warrants an addition in the release notes too |
@calebcartwright I'll update the CHANGELOG PR #6004 in just a bit to include this Edit: The CHANGELOG PR was updated! |
@@ -1989,11 +1994,13 @@ fn rewrite_static( | |||
static_parts: &StaticParts<'_>, | |||
offset: Indent, | |||
) -> Option<String> { | |||
println!("rewriting static"); |
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.
You left in a debug print, it seems.
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 am surprised that this did not make any of the tests fail...?
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 am surprised that this did not make any of the tests fail...?
same (#6210 (comment))
we'll do a postmortem of sorts to review and hopefully identify some preventative measures to prevent a recurrence
This includes both
ast::StaticItem
andast::StaticForeignItem
.safety
was added to bothast::StaticItem
andast::SaticForeignItem
in rust-lang/rust#124482.