Skip to content

Commit 6b46c99

Browse files
committed
Auto merge of #113105 - matthiaskrgr:rollup-rci0uym, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #112207 (Add trustzone and virtualization target features for aarch32.) - #112454 (Make compiletest aware of targets without dynamic linking) - #112628 (Allow comparing `Box`es with different allocators) - #112692 (Provide more context for `rustc +nightly -Zunstable-options` on stable) - #112972 (Make `UnwindAction::Continue` explicit in MIR dump) - #113020 (Add tests impl via obj unless denied) - #113084 (Simplify some conditions) - #113103 (Normalize types when applying uninhabited predicate.) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 5ea6668 + 4b1d068 commit 6b46c99

File tree

212 files changed

+1045
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+1045
-940
lines changed

compiler/rustc_ast_passes/src/ast_validation.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -623,13 +623,12 @@ impl<'a> AstValidator<'a> {
623623
fn maybe_lint_missing_abi(&mut self, span: Span, id: NodeId) {
624624
// FIXME(davidtwco): This is a hack to detect macros which produce spans of the
625625
// call site which do not have a macro backtrace. See #61963.
626-
let is_macro_callsite = self
626+
if self
627627
.session
628628
.source_map()
629629
.span_to_snippet(span)
630-
.map(|snippet| snippet.starts_with("#["))
631-
.unwrap_or(true);
632-
if !is_macro_callsite {
630+
.is_ok_and(|snippet| !snippet.starts_with("#["))
631+
{
633632
self.lint_buffer.buffer_lint_with_diagnostic(
634633
MISSING_ABI,
635634
id,

compiler/rustc_codegen_cranelift/src/pretty_clif.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ pub(crate) fn write_ir_file(
225225
let res = std::fs::File::create(clif_file_name).and_then(|mut file| write(&mut file));
226226
if let Err(err) = res {
227227
// Using early_warn as no Session is available here
228-
rustc_session::early_warn(
228+
let handler = rustc_session::EarlyErrorHandler::new(
229229
rustc_session::config::ErrorOutputType::default(),
230-
format!("error writing ir file: {}", err),
231230
);
231+
handler.early_warn(format!("error writing ir file: {}", err));
232232
}
233233
}
234234

compiler/rustc_codegen_ssa/src/target_features.rs

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
4444
// #[target_feature].
4545
("thumb-mode", Some(sym::arm_target_feature)),
4646
("thumb2", Some(sym::arm_target_feature)),
47+
("trustzone", Some(sym::arm_target_feature)),
4748
("v5te", Some(sym::arm_target_feature)),
4849
("v6", Some(sym::arm_target_feature)),
4950
("v6k", Some(sym::arm_target_feature)),
@@ -53,6 +54,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
5354
("vfp2", Some(sym::arm_target_feature)),
5455
("vfp3", Some(sym::arm_target_feature)),
5556
("vfp4", Some(sym::arm_target_feature)),
57+
("virtualization", Some(sym::arm_target_feature)),
5658
// tidy-alphabetical-end
5759
];
5860

compiler/rustc_driver_impl/src/args.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use std::fmt;
33
use std::fs;
44
use std::io;
55

6+
use rustc_session::EarlyErrorHandler;
7+
68
fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
79
if let Some(path) = arg.strip_prefix('@') {
810
let file = match fs::read_to_string(path) {
@@ -21,15 +23,12 @@ fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
2123
/// **Note:** This function doesn't interpret argument 0 in any special way.
2224
/// If this function is intended to be used with command line arguments,
2325
/// `argv[0]` must be removed prior to calling it manually.
24-
pub fn arg_expand_all(at_args: &[String]) -> Vec<String> {
26+
pub fn arg_expand_all(handler: &EarlyErrorHandler, at_args: &[String]) -> Vec<String> {
2527
let mut args = Vec::new();
2628
for arg in at_args {
2729
match arg_expand(arg.clone()) {
2830
Ok(arg) => args.extend(arg),
29-
Err(err) => rustc_session::early_error(
30-
rustc_session::config::ErrorOutputType::default(),
31-
format!("Failed to load argument file: {err}"),
32-
),
31+
Err(err) => handler.early_error(format!("Failed to load argument file: {err}")),
3332
}
3433
}
3534
args

0 commit comments

Comments
 (0)