Skip to content

rustc_attr_ir: fix up lang_items imports - #160782

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
mejrs:attr_imports
Aug 9, 2026
Merged

rustc_attr_ir: fix up lang_items imports#160782
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
mejrs:attr_imports

Conversation

@mejrs

@mejrs mejrs commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

View all comments

Cleanup after splitting attributes from rustc_hir.

It's a big one and maybe annoying to merge without conflicts but I figured it's best to just get it done and over with. If it turns out to be too big to merge at once it should be possible to split it up tho :>

r? @JonathanBrouwer

@rustbot

rustbot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

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.

Some changes occurred in match lowering

cc @Nadrieril

Some changes occurred in match checking

cc @Nadrieril

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @vakaras

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to constck

cc @fee1-dead

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

HIR ty lowering was modified

cc @fmease

changes to the core type system

cc @lcnr

Some changes occurred in compiler/rustc_ast_lowering/src/format.rs

cc @m-ou-se

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustdoc-json Area: Rustdoc JSON backend PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 8, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Comment thread compiler/rustc_attr_parsing/src/session_diagnostics.rs Outdated
Comment thread compiler/rustc_hir/src/lib.rs Outdated
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2026
@rustbot

rustbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 9, 2026
@rustbot

rustbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

Some changes occurred in coverage instrumentation.

cc @Zalathar

rustc-dev-guide is developed in its own repository. If possible, consider making this change to rust-lang/rustc-dev-guide instead.

cc @BoxyUwU, @tshepang

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Aug 9, 2026
Comment thread compiler/rustc_attr_parsing/Cargo.toml
@mejrs

mejrs commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

I think we should not attempt to merge this in a rollup :) But we best do it today (in the weekend) to minimize disruption.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 9, 2026
// removing it.
// This was added in <https://github.com/rust-lang/rust/pull/123302>.
if tcx.is_lang_item(trait_def_id, rustc_hir::LangItem::Sized) {
if tcx.is_lang_item(trait_def_id, rustc_hir::attrs::lang::LangItem::Sized) {

@JonathanBrouwer JonathanBrouwer Aug 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: this can just use the import

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this is the only thing I find I'd lean towards not fixing it as to not restart PR ci

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I'm leaning towards splitting up this PR because there is some stuff that I'd still like to have some time to think about, such as having the rustc_hir::attrs re-export, and keeping this PR open for longer than a few days is impossible because it will conflict with absolutely everything.

One change that is quite a large part of the diff of this PR that I'm happy to merge is importing LangItem everywhere, instead of calling it hir::LangItem, maybe we can start with this?

View changes since this review

@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 Aug 9, 2026
@rust-log-analyzer

This comment has been minimized.

@mejrs

mejrs commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

One change that is quite a large part of the diff of this PR that I'm happy to merge is importing LangItem everywhere, instead of calling it hir::LangItem, maybe we can start with this?

Sure, let's start there :)

@mejrs mejrs changed the title rustc_attr_ir: fix up imports rustc_attr_ir: fix up lang_items imports Aug 9, 2026
@mejrs

mejrs commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

This is only the lang_items related imports. It looks like some unrelated things also got formatted 🤔

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 9, 2026
@rust-log-analyzer

This comment has been minimized.


// Check for newlines in the chunk
let newlines_test = lsx_vseqi_b::<{b'\n' as i32}>(chunk);
let newlines_test = lsx_vseqi_b::<{ b'\n' as i32 }>(chunk);

@JonathanBrouwer JonathanBrouwer Aug 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmmm this PR contains quite a few formatting changes like this, I think all of them are improvements so it's fine to keep them but wonder what causes it

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had to use cargo fmt to format clippy, but I'm pretty sure I always was in the clippy root when I did 🤔

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me with green ci

View changes since this review

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors r+ rollup=iffy p=1 note=likely to conflict

@rust-bors

rust-bors Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 196dd2a 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 Aug 9, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 9, 2026
rustc_attr_ir: fix up `lang_items` imports

Cleanup after splitting attributes from rustc_hir.

It's a big one and maybe annoying to merge without conflicts but I figured it's best to just get it done and over with. If it turns out to be too big to merge at once it should be possible to split it up tho :>

r? @JonathanBrouwer
rust-bors Bot pushed a commit that referenced this pull request Aug 9, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #160782 (rustc_attr_ir: fix up `lang_items` imports)
 - #159746 (stabilize `c_variadic_naked_functions`)
 - #160141 (Refactor tidy detection of stability attribute)
 - #160744 (make more diagnostic structs pub(crate))
 - #160778 (Add regression test for cycle error on guaranteed unsized self type)
 - #160779 (arm64ec: `f128` is supported since LLVM 23)
 - #160781 (Add regression test for save temps ICE on incremental recompile)
 - #160792 (User facing .expect now follows “expect as precondition" style)
 - #160796 (Change .expect message to follow precondition style)
@rust-bors
rust-bors Bot merged commit 92114e1 into rust-lang:main Aug 9, 2026
13 checks passed
rust-timer added a commit that referenced this pull request Aug 9, 2026
Rollup merge of #160782 - mejrs:attr_imports, r=JonathanBrouwer

rustc_attr_ir: fix up `lang_items` imports

Cleanup after splitting attributes from rustc_hir.

It's a big one and maybe annoying to merge without conflicts but I figured it's best to just get it done and over with. If it turns out to be too big to merge at once it should be possible to split it up tho :>

r? @JonathanBrouwer
@rustbot rustbot added this to the 1.99.0 milestone Aug 9, 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. A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants