Unsafe kept in help text#156791
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing |
|
|
|
Hey, I think Jana might be a bit busy because of Rustweek thing, do you mind if I take a look? |
| pub fn suggestions( | ||
| &self, | ||
| style: AttrSuggestionStyle, | ||
| wrap_with_unsafe: bool, |
There was a problem hiding this comment.
I'd prefer to pass the Safety in here, instead of a bool
|
Reminder, once the PR becomes ready for a review, use |
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
@rustbot ready |
|
First time contributing to rustc after Jana's excellent workshop. Would related changes like suggesting: go in this PR or a new one? |
Sounds like a something for a new PR |
There was a problem hiding this comment.
Looks good to me, @JonathanBrouwer how you feel about it?
Rollup merge of #156791 - obi1kenobi:unsafe-kept-in-help-text, r=JonathanBrouwer,Kivooeo Unsafe kept in help text Currently when encountering a malformed attribute, the compiler will suggest removing unsafe in the well-formed template even when unsafe is required. This PR preserves whatever unsafe (or lack) exists in the user's code. r? @jdonszelmann
|
@rust-timer build c5fccf7 |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (c5fccf7): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.1%, secondary -1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%, secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 514.377s -> 517.8s (0.67%) |
|
Perf is noise |
Currently when encountering a malformed attribute, the compiler will suggest removing unsafe in the well-formed template even when unsafe is required. This PR preserves whatever unsafe (or lack) exists in the user's code.
r? @jdonszelmann