-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix FP in unnecessary_safety_comment
#10106
Conversation
r? @Alexendoo (rustbot has picked a reviewer for you, use r? to override) |
Thanks, there seems to be other uses of |
Thank you for quick review:) However some suggestions can be improved. macro_rules! with_safety_comment {
($t:ty) => {
// Safety: unnecessary
impl T for $t {}
};
}
with_safety_comment!(i32);
@Alexendoo Is there a way to check if a given span is in a macro definition? |
The |
I replaced all |
Oh hm, didn't realise the file was also used for Poking around a bit, I think the issue is actually in Node::Block(Block {
rules: BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided),
..
}) then return |
Ah I get it. sorry for bothering you, I really appreciate your help.
it is indeed the root problem. |
Thanks! Sorry for the delay, I didn't realise that you updated the code to cover already 😅 @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
1 similar comment
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fix #10084
changelog: FP: [
unnecessary_safety_comment
]: No longer lints code inside macros#10106