Allow using bool instead of Option<()> in diagnostics#108402
Allow using bool instead of Option<()> in diagnostics#108402bors merged 1 commit intorust-lang:masterfrom
bool instead of Option<()> in diagnostics#108402Conversation
|
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
|
Some changes occured in cc @BoxyUwU
|
|
Hm... I actually quite like |
|
What do you think about reducing this PR to just allowing |
|
I was mildly annoyed by pub enum ShowAnnotation { Show, Hide } |
I think this is probably a good step to take. I don't have particularly strong feelings about this change. I liked the symmetry between |
This comment was marked as resolved.
This comment was marked as resolved.
4f020a1 to
ef434f0
Compare
bool instead of Option<()> in diagnosticsbool instead of Option<()> in diagnostics
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (f63ccaf): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Disallow the unit type for#[help],#[note]etc, instead usingboolto express optional annotations without a span which I believe is more intuitive.Test output ordering has changed in a few places, where a field was of type()and the annotation has been moved to the struct itself. If any of these changes are an issue, this can be restricted to allowing specifically(), and notOption<()>Actual changes here: https://github.com/rust-lang/rust/pull/108402/files#diff-815b1d8debfc564112bd51093791d7c3f2ee288a37a8f5c0e89c11d1f609b4c0Allows using
boolin derive diagnostics to indicate an optional subdiagnostic without a span, where previouslyOption<()>had to be used@rustbot label +A-diagnostics