Skip to content

move bug and span_bug macros to rustc_span - #161873

Merged
rust-bors[bot] merged 7 commits into
rust-lang:mainfrom
mejrs:bug
Sep 16, 2026
Merged

rust-bors[bot] merged 7 commits into
rust-lang:mainfrom
mejrs:bug

Conversation

@mejrs

@mejrs mejrs commented Aug 27, 2026

Copy link
Copy Markdown
Member

View all comments

This allows them to be used without depending on rustc_middle.

This is done by using a rustc_interface callback so that, if the callback is set, a internal compiler error diagnostic is printed through that. After that the panic is initiated.

r? @jdonszelmann @bjorn3

@rustbot

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

changes to the core type system

cc @lcnr

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to constck

cc @fee1-dead

Some changes occurred in coverage instrumentation.

cc @Zalathar

changes to the core type system

cc @lcnr

Some changes occurred in compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs

cc @ZuseZ4

Some changes occurred in compiler/rustc_codegen_llvm/src/builder/autodiff.rs

cc @ZuseZ4

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in match lowering

cc @Nadrieril

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 to the CTFE / Miri interpreter

cc @rust-lang/miri

HIR ty lowering was modified

cc @fmease

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

rustbot commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

jdonszelmann is currently at their maximum review capacity.
They may take a while to respond.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Neat. :)

@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_span/src/macros.rs Outdated
@bjorn3 bjorn3 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 27, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 28, 2026
Mark `extern_item_impls` feature as incomplete

context: rust-lang#161873 (comment)

> If they are so unstable, maybe they should have a separate feature gate that's marked as `incomplete`. Or the entire `extern_item_impls` should be marked "incomplete".

I think it's just best to mark the entire thing as incomplete for now. Later, when the implementation matures we can consider removing the incompleteness or splitting the feature in unstable and incomplete parts.

r? @bjorn3 @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 28, 2026
Mark `extern_item_impls` feature as incomplete

context: rust-lang#161873 (comment)

> If they are so unstable, maybe they should have a separate feature gate that's marked as `incomplete`. Or the entire `extern_item_impls` should be marked "incomplete".

I think it's just best to mark the entire thing as incomplete for now. Later, when the implementation matures we can consider removing the incompleteness or splitting the feature in unstable and incomplete parts.

r? @bjorn3 @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 28, 2026
Mark `extern_item_impls` feature as incomplete

context: rust-lang#161873 (comment)

> If they are so unstable, maybe they should have a separate feature gate that's marked as `incomplete`. Or the entire `extern_item_impls` should be marked "incomplete".

I think it's just best to mark the entire thing as incomplete for now. Later, when the implementation matures we can consider removing the incompleteness or splitting the feature in unstable and incomplete parts.

r? @bjorn3 @RalfJung
rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
Rollup merge of #161891 - mejrs:eii_incomplete, r=RalfJung

Mark `extern_item_impls` feature as incomplete

context: #161873 (comment)

> If they are so unstable, maybe they should have a separate feature gate that's marked as `incomplete`. Or the entire `extern_item_impls` should be marked "incomplete".

I think it's just best to mark the entire thing as incomplete for now. Later, when the implementation matures we can consider removing the incompleteness or splitting the feature in unstable and incomplete parts.

r? @bjorn3 @RalfJung
@rust-bors

This comment has been minimized.

@mejrs
mejrs force-pushed the bug branch 2 times, most recently from 2b61a0e to aed9a77 Compare August 28, 2026 22:31
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

rustc_errors::annotate_snippet_emitter_writer was changed

cc @Muscraft

@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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

This comment has been minimized.

@mejrs mejrs changed the title use eii for bug! macro move bug and span_bug macros to rustc_span Aug 28, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@tiif

tiif commented Sep 15, 2026

Copy link
Copy Markdown
Member

oh r=me after the CI is green.

Thanks for dealing with so many rebasing!

@tiif tiif 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 Sep 15, 2026
@mejrs

mejrs commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

Thanks!. Now to try and merge it...

@rustbot

rustbot commented Sep 15, 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.

@mejrs

mejrs commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

@bors r=tiif

@rust-bors

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 86052b2 has been approved by tiif

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 Sep 15, 2026
@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 15, 2026
@rust-bors

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

⚠️ A new commit 65ae042ecc466e238cc338d5432095aefdbfe3a9 was pushed.

This pull request was unapproved.

@mejrs

mejrs commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

@bors r=tiif

@rust-bors

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 575aae6 has been approved by tiif

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 Sep 15, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 16, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #161873 (move bug and span_bug macros to rustc_span)
 - #162584 (Use File::*lock*() in rustc_data_structures::flock when possible)
 - #162704 (Parser: Uninterpolate when checking for const closures, try bikeshed blocks & in relevant diagnostic code)
 - #162787 (Fix suggestions for names captured by formatting macros)
 - #159562 (Windows: cache the stdio write mode for the duration of a lock session)
 - #162813 (Pre lint port cleanups)
 - #162822 (PassWrapper: adapt for removal of EABIVersion arg in LLVM 24)
@rust-bors
rust-bors Bot merged commit a6a5468 into rust-lang:main Sep 16, 2026
13 checks passed
rust-bors Bot pushed a commit that referenced this pull request Sep 16, 2026
Rollup merge of #161873 - mejrs:bug, r=tiif

move bug and span_bug macros to rustc_span

This allows them to be used without depending on rustc_middle.

This is done by using a rustc_interface callback so that, if the callback is set, a internal compiler error diagnostic is printed through that. After that the panic is initiated.

r? @jdonszelmann @bjorn3
@rustbot rustbot added this to the 1.100.0 milestone Sep 16, 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. F-autodiff `#![feature(autodiff)]` 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.

9 participants