Skip to content

Allow to use Diagnostic directly in SharedContext::emit_lint#156002

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
GuillaumeGomez:diagnostic-instead-of-closure
May 1, 2026
Merged

Allow to use Diagnostic directly in SharedContext::emit_lint#156002
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
GuillaumeGomez:diagnostic-instead-of-closure

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 30, 2026

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred to diagnostic attributes.

cc @mejrs

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 30, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 30, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 30, 2026
… r=<try>

Allow to use `Diagnostic` directly in `SharedContext::emit_lint`
Comment thread compiler/rustc_attr_parsing/src/target_checking.rs
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 30, 2026
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me if perf is not negative

View changes since this review

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 30, 2026

☀️ Try build successful (CI)
Build commit: 8877e4f (8877e4f2e94ab82536c27e35dec342f51f88eb28, parent: f53b654a8882fd5fc036c4ca7a4ff41ce32497a6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8877e4f): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking 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 count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 2.0%, secondary 3.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [0.9%, 3.4%] 4
Regressions ❌
(secondary)
3.1% [2.8%, 3.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [0.9%, 3.4%] 4

Cycles

Results (secondary -3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.7% [-3.7%, -3.7%] 1
All ❌✅ (primary) - - 0

Binary size

Results (secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 487.787s -> 493.362s (1.14%)
Artifact size: 390.97 MiB -> 390.96 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 30, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 30, 2026

📌 Commit f51cf63 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 30, 2026
rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
Rollup of 19 pull requests

Successful merges:

 - #155237 (Disentangle AST crates and error crates)
 - #155249 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup)
 - #155853 (Use `_mcount` as the mcount symbol name on RISC-V Linux GNU targets)
 - #155919 (simplify `ast_fragments!`)
 - #155939 (Add feature gate for view_types experiment)
 - #155954 (rustdoc: preserve parent doc cfg for `macro_export` macros)
 - #155974 (add `c_variadic_experimental_arch` feature)
 - #155991 (Catch unwinds from the global ctxt callback to complete queries profiling data in more cases)
 - #156003 (Pass Session to optimize_and_codegen_fat_lto)
 - #153566 (Add suggestion for E0401 on inner const items)
 - #154610 (Suggest public re-exports when a private module makes an import path inaccessible)
 - #155523 (Reorganize `tests/ui/issues/` - 02)
 - #155821 (c-variadic: document `Clone` and `Drop` instances and require `VaArgSafe: Copy`)
 - #155980 (Move `feature*` methods from `parse` mod to `errors` mod.)
 - #155987 (Make lifting infallible)
 - #155988 (tests/run-make/print-cfg: add Android target_env case)
 - #156000 (Fix ICE when using -Zinstrument-mcount and -Clinker-flavor=lld)
 - #156002 (Allow to use `Diagnostic` directly in `SharedContext::emit_lint`)
 - #156015 (rustc-dev-guide subtree update)
@rust-bors rust-bors Bot merged commit a89e69e into rust-lang:main May 1, 2026
12 checks passed
rust-timer added a commit that referenced this pull request May 1, 2026
Rollup merge of #156002 - GuillaumeGomez:diagnostic-instead-of-closure, r=JonathanBrouwer

Allow to use `Diagnostic` directly in `SharedContext::emit_lint`

Part of #153099.

r? @JonathanBrouwer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants