Skip to content

Deduplicate InstrumentFnAttr - #162097

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
mejrs:instrumentfnattr
Sep 1, 2026
Merged

Deduplicate InstrumentFnAttr#162097
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
mejrs:instrumentfnattr

Conversation

@mejrs

@mejrs mejrs commented Aug 31, 2026

Copy link
Copy Markdown
Member

cc @pmur

Instead of having a Default variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".

@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Aug 31, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Aug 31, 2026
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

r? @dingxiangfei2009

rustbot has assigned @dingxiangfei2009.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 18 candidates

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@bors r+ rollup
Thanks, less duplicated code makes me happy!

View changes since this review

@rust-bors

rust-bors Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8717cba 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…Brouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
rust-bors Bot pushed a commit that referenced this pull request Sep 1, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #137720 (support `#[target_feature(enable = ...)]` on `#[naked]` functions)
 - #160534 (stabilize smart pointer map functions)
 - #160551 (mir_build: Clearly distinguish or/refutable/irrefutable patterns during match lowering)
 - #160989 (Make sin, cos, exp, exp2, log, log2, log10 generic)
 - #161861 (mir_build: Clarify parts of if-condition lowering)
 - #161929 (explicitly track inherent const generic args kind)
 - #162040 (bootstrap: stage0 to cbae9b4)
 - #162063 (Switch dist-aarch64-linux to EC2 and update dist-x86_64-linux)
 - #161353 (Add test for parallel compiler reproducible build)
 - #161937 (A series of Polonius Alpha refactors)
 - #162051 (`rustc_feature` cleanups)
 - #162055 (remove `_{style}` recovery for diagnostic structs)
 - #162075 (Move track_caller on closures gating to attribute parsing)
 - #162079 (std: implement `File::fsync` for Hermit)
 - #162097 (Deduplicate `InstrumentFnAttr`)
 - #162115 (fix typo in feature documentation)
rust-bors Bot pushed a commit that referenced this pull request Sep 1, 2026
Rollup merge of #162097 - mejrs:instrumentfnattr, r=JonathanBrouwer

Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
@rust-bors
rust-bors Bot merged commit bcaa514 into rust-lang:main Sep 1, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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