move bug and span_bug macros to rustc_span - #161873
Conversation
|
Some changes occurred to the CTFE machinery 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
Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri HIR ty lowering was modified cc @fmease |
|
|
|
Neat. :) |
This comment has been minimized.
This comment has been minimized.
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
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
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
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
This comment has been minimized.
This comment has been minimized.
2b61a0e to
aed9a77
Compare
|
cc @Muscraft |
|
cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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. |
|
@bors r=tiif |
|
This pull request was unapproved. |
|
@bors r=tiif |
…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)
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
PR rust-lang#161873 moved these macros from `rustc_middle` to `rustc_span`. In doing so it made some undesirable changes. - The internal `emit_producing_nothing` became public. - The macros now have different behaviour to function-based ICEs like `dcx.bug(..)` or `dcx.struct_bug(..).emit()`. This commit reverts those changes. This brings back `Box<dyn Any>` output in a few tests because the panic payload is `ExplicitBug` (which std doesn't know about) rather than `String`. That might be worth fixing again in the future, but if so, it should be done in a way that works with all aborts, not just those done via the macros.
PR rust-lang#161873 moved these macros from `rustc_middle` to `rustc_span`. In doing so it made some undesirable changes. - The internal `emit_producing_nothing` became public. - The macros now have different behaviour to function-based ICEs like `dcx.bug(..)` or `dcx.struct_bug(..).emit()`. This commit reverts those changes. This brings back `Box<dyn Any>` output in a few tests because the panic payload is `ExplicitBug` (which std doesn't know about) rather than `String`. That might be worth fixing again in the future, but if so, it should be done in a way that works with all aborts, not just those done via the macros.
…uwer Rollup of 7 pull requests Successful merges: - rust-lang/rust#161873 (move bug and span_bug macros to rustc_span) - rust-lang/rust#162584 (Use File::*lock*() in rustc_data_structures::flock when possible) - rust-lang/rust#162704 (Parser: Uninterpolate when checking for const closures, try bikeshed blocks & in relevant diagnostic code) - rust-lang/rust#162787 (Fix suggestions for names captured by formatting macros) - rust-lang/rust#159562 (Windows: cache the stdio write mode for the duration of a lock session) - rust-lang/rust#162813 (Pre lint port cleanups) - rust-lang/rust#162822 (PassWrapper: adapt for removal of EABIVersion arg in LLVM 24)
PR rust-lang#161873 moved these macros from `rustc_middle` to `rustc_span`. In doing so it made some undesirable changes. - The internal `emit_producing_nothing` became public. - It gave the macros different behaviour to function-based ICEs like `dcx.bug(..)` or `dcx.struct_bug(..).emit()`. - `ExplicitBug` is not used, so `report_ice` prints an extraneous, unintended "the compiler unexpectedly panicked" message. - It broke the interaction between `span_bug!` and `-Ztrack-diagnostics`. This commit adjusts things to avoid the undesirable changes. It required moving `ExplicitBug` to `rustc_span`. Setting `diag.emitted_at` fixed the `-Ztrack-diagnostics` problem, seen in the change from `callback.rs` to `validate.rs` in `track7.stderr`. `Box<dyn Any>` output now occurs again in a few tests because the panic payload is `ExplicitBug` (which std doesn't know about) rather than `String`. That might be worth addressing in the future but it would require a different/additional mechanism and is beyond the scope of this PR.
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