Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #113105

Merged
merged 19 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7269972
Add trustzone and virtualization target features for aarch32.
qwandor Jun 2, 2023
001b081
alloc: Allow comparing `Box`s over different allocators
gootorov Jun 14, 2023
a56c829
merge target spec and --print=cfg for compiletest target info
pietroalbini Jun 9, 2023
04f658f
avoid dynamic linking on targets that do not support dynamic linking
pietroalbini Jun 9, 2023
767c4b9
add support for needs-dynamic-linking
pietroalbini May 17, 2023
c462291
Make `UnwindAction::Continue` explicit in MIR dump
nbdd0121 Jun 23, 2023
19ce326
Bless tests
nbdd0121 Jun 23, 2023
ef05533
Simplify some conditions
WaffleLapkin Jun 27, 2023
09f0548
Add passing & failing test for bultin dyn trait generation
Jun 27, 2023
cef812b
Provide more context for `rustc +nightly -Zunstable-options` on stable
jieyouxu Jun 22, 2023
6f3f878
Normalize types when applying uninhabited predicate.
cjgillot Jun 27, 2023
1880e83
Rollup merge of #112207 - qwandor:virt_feature, r=davidtwco
matthiaskrgr Jun 27, 2023
353dd71
Rollup merge of #112454 - ferrocene:pa-compiletest-dynamic-linking, r…
matthiaskrgr Jun 27, 2023
448d2a8
Rollup merge of #112628 - gootorov:box_alloc_partialeq, r=joshtriplett
matthiaskrgr Jun 27, 2023
b6144cd
Rollup merge of #112692 - jieyouxu:better-err-msg-for-unstable-option…
matthiaskrgr Jun 27, 2023
9ec676d
Rollup merge of #112972 - nbdd0121:mir, r=davidtwco
matthiaskrgr Jun 27, 2023
db11b77
Rollup merge of #113020 - AnthonyKalaitzis:add-tests-impl-via-obj-unl…
matthiaskrgr Jun 27, 2023
d505582
Rollup merge of #113084 - WaffleLapkin:less_map_or, r=Nilstrieb
matthiaskrgr Jun 27, 2023
4b1d068
Rollup merge of #113103 - cjgillot:normalize-inhabited, r=compiler-er…
matthiaskrgr Jun 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,12 @@ impl<'a> AstValidator<'a> {
fn maybe_lint_missing_abi(&mut self, span: Span, id: NodeId) {
// FIXME(davidtwco): This is a hack to detect macros which produce spans of the
// call site which do not have a macro backtrace. See #61963.
let is_macro_callsite = self
if self
.session
.source_map()
.span_to_snippet(span)
.map(|snippet| snippet.starts_with("#["))
.unwrap_or(true);
if !is_macro_callsite {
.is_ok_and(|snippet| !snippet.starts_with("#["))
{
self.lint_buffer.buffer_lint_with_diagnostic(
MISSING_ABI,
id,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/src/pretty_clif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ pub(crate) fn write_ir_file(
let res = std::fs::File::create(clif_file_name).and_then(|mut file| write(&mut file));
if let Err(err) = res {
// Using early_warn as no Session is available here
rustc_session::early_warn(
let handler = rustc_session::EarlyErrorHandler::new(
rustc_session::config::ErrorOutputType::default(),
format!("error writing ir file: {}", err),
);
handler.early_warn(format!("error writing ir file: {}", err));
}
}

Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_codegen_ssa/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
// #[target_feature].
("thumb-mode", Some(sym::arm_target_feature)),
("thumb2", Some(sym::arm_target_feature)),
("trustzone", Some(sym::arm_target_feature)),
("v5te", Some(sym::arm_target_feature)),
("v6", Some(sym::arm_target_feature)),
("v6k", Some(sym::arm_target_feature)),
Expand All @@ -53,6 +54,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
("vfp2", Some(sym::arm_target_feature)),
("vfp3", Some(sym::arm_target_feature)),
("vfp4", Some(sym::arm_target_feature)),
("virtualization", Some(sym::arm_target_feature)),
// tidy-alphabetical-end
];

Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_driver_impl/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::fmt;
use std::fs;
use std::io;

use rustc_session::EarlyErrorHandler;

fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
if let Some(path) = arg.strip_prefix('@') {
let file = match fs::read_to_string(path) {
Expand All @@ -21,15 +23,12 @@ fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
/// **Note:** This function doesn't interpret argument 0 in any special way.
/// If this function is intended to be used with command line arguments,
/// `argv[0]` must be removed prior to calling it manually.
pub fn arg_expand_all(at_args: &[String]) -> Vec<String> {
pub fn arg_expand_all(handler: &EarlyErrorHandler, at_args: &[String]) -> Vec<String> {
let mut args = Vec::new();
for arg in at_args {
match arg_expand(arg.clone()) {
Ok(arg) => args.extend(arg),
Err(err) => rustc_session::early_error(
rustc_session::config::ErrorOutputType::default(),
format!("Failed to load argument file: {err}"),
),
Err(err) => handler.early_error(format!("Failed to load argument file: {err}")),
}
}
args
Expand Down
Loading