Auto merge of #162510 - Zalathar:rollup-0hi6WtW, r=Zalathar

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#162482 (Make `run-make` testsuite work with other codegen backend than LLVM)
 - rust-lang/rust#161587 (Avoid invalid suggestion in case of macro expansion without inferrable generic type)
 - rust-lang/rust#162363 (Use correct `dir_path` when parsing module from path)
 - rust-lang/rust#162408 (add crashtests [7/N])
 - rust-lang/rust#162502 (triagebot: Subscribe me to amdgpu changes)
 - rust-lang/rust#162505 (Revert "fuchsia: Add safestack as a supported sanitizer for x86_64 fuchsia")
This commit is contained in:
bors
2026-09-09 06:31:46 +00:00
106 changed files with 416 additions and 13 deletions

View File

@@ -1382,7 +1382,11 @@ impl InvocationCollectorNode for Box<ast::Item> {
// This lets `parse_external_mod` catch cycles if it's self-referential.
let file_path = match inline {
Inline::Yes => None,
Inline::No { .. } => mod_file_path_from_attr(ecx.sess, &node.attrs, &dir_path),
Inline::No { .. } => mod_file_path_from_attr(
ecx.sess,
&node.attrs,
&ecx.current_expansion.module.dir_path,
),
};
(file_path, dir_path, dir_ownership)
}

View File

@@ -9,9 +9,7 @@ pub(crate) fn target() -> Target {
base.features = "+cmpxchg16b,+lahfsahf,+popcnt,+sse3,+sse4.1,+sse4.2,+ssse3".into();
base.max_atomic_width = Some(128);
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers =
SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK | SanitizerSet::SAFESTACK;
base.default_sanitizers = SanitizerSet::SAFESTACK;
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK;
base.supports_xray = true;
Target {

View File

@@ -519,11 +519,13 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
};
let mut local_visitor = FindInferSourceVisitor::new(self, typeck_results, term, ty);
let mut body_from_expansion = false;
if let Some(body) =
self.tcx.hir_maybe_body_owned_by(self.tcx.typeck_root_def_id_local(body_def_id))
{
let expr = body.value;
local_visitor.visit_expr(expr);
body_from_expansion = body.value.span.from_expansion();
}
let Some(InferSource { span, kind }) = local_visitor.infer_source else {
@@ -566,6 +568,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
term,
&arg_data,
typeck_results,
body_from_expansion,
span,
);
@@ -705,6 +708,7 @@ impl<'tcx> InferSourceKind<'tcx> {
term: Term<'tcx>,
arg_data: &'local InferenceDiagnosticsData,
typeck_results: &TypeckResults<'tcx>,
body_from_expansion: bool,
span: Span,
) -> Option<SourceKindSubdiag<'local>>
where
@@ -799,7 +803,7 @@ impl<'tcx> InferSourceKind<'tcx> {
p.into_buffer()
};
let suggestion = if have_turbofish {
let suggestion = if have_turbofish || body_from_expansion {
None
} else if generic_args.len() == 1 && used_fallback {
match param.kind {

View File

@@ -203,6 +203,11 @@ impl TestCx<'_> {
// through a specific CI runner).
.env("LLVM_COMPONENTS", &self.config.llvm_components);
if let Some(codegen_backend) = &self.config.override_codegen_backend {
// In case it's a different codegen backend than LLVM.
cmd.env("RUSTC_CODEGEN_BACKEND", codegen_backend.as_str());
}
// The `run-make-cargo` and `build-std` suites need an in-tree `cargo`, `run-make` does not.
if matches!(self.config.suite, TestSuite::RunMakeCargo | TestSuite::BuildStd) {
cmd.env(

View File

@@ -76,6 +76,9 @@ pub fn rustc_path() -> String {
fn setup_common() -> Command {
let mut cmd = Command::new(rustc_path());
set_host_compiler_dylib_path(&mut cmd);
if let Ok(codegen_backend) = std::env::var("RUSTC_CODEGEN_BACKEND") {
cmd.arg(format!("-Zcodegen-backend={codegen_backend}"));
}
cmd
}

View File

@@ -177,15 +177,13 @@
//@ compile-flags: -C opt-level=2
#![crate_type = "lib"]
#![feature(no_core, lang_items, sanitize)]
#![feature(no_core, lang_items)]
#![crate_type = "lib"]
#![no_core]
extern crate minicore;
use minicore::*;
// We only do this because we can't disable default sanitizers via compile-flags.
#[sanitize(safestack = "off")]
#[no_mangle]
pub fn foo() {
// CHECK: foo{{:|()}}

10
tests/crashes/140693.rs Normal file
View File

@@ -0,0 +1,10 @@
//@ known-bug: #140693
#![crate_type = "sdylib"]
pub trait Trait {
type Type;
}
pub struct S;
#[export_stable]
pub extern "C" fn foo1(_x: <S as Trait>::Type) {}

10
tests/crashes/146210.rs Normal file
View File

@@ -0,0 +1,10 @@
//@ known-bug: #146210
//@ edition: 2024
//@ compile-flags: -Zvalidate-mir --crate-type lib
use core::pin::Pin;
fn bar<T>(non_send: T) -> Pin<Box<dyn Future<Output = ()> + Send>> {
Box::pin(async {
non_send;
})
}

4
tests/crashes/146353.rs Normal file
View File

@@ -0,0 +1,4 @@
//@ known-bug: #146353
const BIG_CHAIN: u8 = ();
trait NeverSend = !Send;
fn main() {}

10
tests/crashes/149015.rs Normal file
View File

@@ -0,0 +1,10 @@
//@ known-bug: #149015
trait Trait1 {
type Assoc;
}
trait Trait2 {}
impl Trait1 for <dyn Trait2 as Trait1>::Assoc {
type Assoc = ();
}

9
tests/crashes/152204.rs Normal file
View File

@@ -0,0 +1,9 @@
//@ known-bug: #152204
//@ compile-flags: -Copt-level=0
#![feature(portable_simd)]
fn main() {
if false {
let _ = core::simd::Simd::<u8, 256>::splat(0);
}
}

10
tests/crashes/153368.rs Normal file
View File

@@ -0,0 +1,10 @@
//@ known-bug: #153368
//@ compile-flags: -Znext-solver=globally
trait Foo: Bar<T> + Bar<u32> {}
trait Bar<T> {
fn bar(self) -> T;
}
fn test_infer_version(x: &dyn Foo) {
x.bar()
}

6
tests/crashes/154367.rs Normal file
View File

@@ -0,0 +1,6 @@
//@ known-bug: #154367
//@ compile-flags: -Copt-level=0
#![feature(unsafe_binders)]
fn main() { panic::<unsafe<'a> &'a ()>(); }
fn panic<T>() { panic!() }

7
tests/crashes/155482.rs Normal file
View File

@@ -0,0 +1,7 @@
//@ known-bug: #155482
trait TraitA < AsA = impl TraitB < {
#[derive(Hash)]
enum A;
struct A<A>;
}
>> ;

13
tests/crashes/155497.rs Normal file
View File

@@ -0,0 +1,13 @@
//@ known-bug: #155497
//@ compile-flags: -Wrust-2021-incompatible-closure-captures
struct Foo((u32, i128));
fn main() {
type T = impl async FnOnce() -> T;
let foo: T = Foo();
let x = move || {
let x = move || {
let Foo((a, b)) = foo;
};
};
}

3
tests/crashes/157197.rs Normal file
View File

@@ -0,0 +1,3 @@
//@ known-bug: #157197
static C: &'static usize = &(0 | E);
static E: usize = E;

12
tests/crashes/158243.rs Normal file
View File

@@ -0,0 +1,12 @@
//@ known-bug: #158243
macro_rules! id {
($x:expr) => { $x };
}
fn main() {
|id!(
(|| {
use std::ops::Add;
1.add(3);
})
)| {};
}

16
tests/crashes/158773.rs Normal file
View File

@@ -0,0 +1,16 @@
//@ known-bug: #158773
//@ needs-rustc-debug-assertions
//@ compile-flags: -Znext-solver=globally
trait HasLifetime {
type AtLifetime<'a>;
}
pub struct ExistentialLifetime<S: HasLifetime>(S::AtLifetime<'static>);
impl<S: HasLifetime> ExistentialLifetime<S> {
fn new() -> ExistentialLifetime<S> {
ExistentialLifetime(ExistentialLifetime(()))
}
}
fn main() {}

14
tests/crashes/158797.rs Normal file
View File

@@ -0,0 +1,14 @@
//@ known-bug: #158797
#![feature(coroutines)]
#![feature(const_async_blocks)]
#![feature(yield_expr)]
enum Foo {
Bar = (
#[coroutine]
|| yield,
2,
)
.1,
}
fn main() {}

4
tests/crashes/160329.rs Normal file
View File

@@ -0,0 +1,4 @@
//@ known-bug: #160329
#![feature(autodiff)]
#[core::autodiff::autodiff_forward(fd_inner, Dual)]
fn f(_x: struct S<B, T>) {}

2
tests/crashes/160490.rs Normal file
View File

@@ -0,0 +1,2 @@
//@ known-bug: #160490
fn f(...: u8) {}

View File

@@ -5,6 +5,7 @@
//@ needs-llvm-components: amdgpu
//@ needs-rust-lld
//@ ignore-backends: gcc
use run_make_support::targets::is_windows_gnu;
use run_make_support::{llvm_readobj, rustc};

View File

@@ -2,6 +2,8 @@
// guaranteed to be lock-free.
//@ only-linux
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_components_contain, llvm_readobj, rustc};

View File

@@ -2,6 +2,7 @@
// Make sure that reports the normal missing-CPU diagnostic instead of ICEing
//
//@ needs-llvm-components: avr
//@ ignore-backends: gcc
use run_make_support::rustc;

View File

@@ -1,5 +1,7 @@
//@ needs-llvm-components: avr
//@ needs-rust-lld
//@ ignore-backends: gcc
//! Regression test for #129301/llvm-project#106722 within `rustc`.
//!
//! Some LLVM-versions had wrong offsets in the local labels, causing the first

View File

@@ -37,6 +37,7 @@
// FIXME(#93754): increase the test coverage of this test.
//@ only-x86_64-unknown-linux-gnu
//@ ignore-cross-compile
//@ ignore-backends: gcc
use run_make_support::{bare_rustc, llvm_readobj};

View File

@@ -8,6 +8,8 @@
//@ ignore-sgx: (x86 machine code cannot be directly executed)
//@ ignore-pauthtest: (it requires non-trivial compilation of c sources, and only supports dynamic
// linking, ignore the test).
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{cc, extra_c_flags, run, rustc, static_lib_name};

View File

@@ -9,6 +9,8 @@
// - `bar()` which implements basic addition.
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{cc, cwd, dynamic_lib_name, is_windows_msvc, rfs, run, rustc};

View File

@@ -2,6 +2,8 @@
// contain specific helpful indications.
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::regex::Regex;
use run_make_support::rustc;

View File

@@ -2,6 +2,8 @@
//@ only-linux
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// FIXME: This test isn't comprehensive and isn't covering all possible combinations.

View File

@@ -1,5 +1,7 @@
//@ needs-target-std
//
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// Test that the suggestion to constrain a type parameter that is dropped in a const
// function with a `[const] Destruct` bound is only offered on nightly, since the bound
// requires an unstable feature.

View File

@@ -1,5 +1,7 @@
//@ needs-target-std
//
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// Test output of const super trait errors in both stable and nightly.
// We don't want to provide suggestions on stable that only make sense in nightly.

View File

@@ -1,5 +1,7 @@
//@ needs-target-std
//
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// When using the flag -C linker-plugin-lto, static libraries could lose their upstream object
// files during compilation. This bug was fixed in #53031, and this test compiles a staticlib
// dependent on upstream, checking that the upstream object file still exists after no LTO and

View File

@@ -1,5 +1,7 @@
//@ needs-target-std
//
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// This test checks that the object files we generate are actually
// LLVM bitcode files (as used by linker LTO plugins) when compiling with
// -Clinker-plugin-lto.

View File

@@ -3,6 +3,8 @@
//@ ignore-apple
//@ ignore-wasm (`object` doesn't handle wasm object files)
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// This test should be replaced with one in tests/debuginfo once we can easily
// tell via GDB or LLDB if debuginfo contains source code. Cheap tricks in LLDB

View File

@@ -10,6 +10,8 @@
//@ only-elf
// Reason: this feature only works when the output object format is ELF.
// This won't be the case on Windows/OSX - for example, OSX produces a Mach-O binary.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_readobj, rustc};

View File

@@ -7,6 +7,8 @@
//@ ignore-cross-compile
// Reason: the compiled binary is executed
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{build_native_static_lib, run, rustc};

View File

@@ -1,3 +1,6 @@
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_bcanalyzer, rustc};
fn main() {

View File

@@ -4,6 +4,8 @@
// and allowing users to build with lto=thin.
//@ only-x86_64-unknown-linux-gnu
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{dynamic_lib_name, llvm_objdump, rustc};

View File

@@ -7,6 +7,8 @@
//@ ignore-cross-compile
//@ ignore-windows
//Reason: pthread (POSIX threads) is not available on Windows
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{run, rustc};

View File

@@ -4,6 +4,8 @@
//!
//@ only-nightly
//@ needs-target-std
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{diff, rustc, similar};

View File

@@ -13,6 +13,7 @@
//@ ignore-cross-compile
// Reason: the compiled binary is executed
//@ needs-llvm-components: x86
//@ ignore-backends: gcc
use run_make_support::{bare_rustc, build_native_dynamic_lib, build_native_static_lib, run, rustc};

View File

@@ -10,6 +10,8 @@
// Reason: the usage of a large array in the test causes an out-of-memory
// error on 32 bit systems.
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{bin_name, llvm_objdump, run, rustc};

View File

@@ -5,6 +5,8 @@
//@ only-x86_64-unknown-linux-gnu
//@ needs-rust-lld
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{dynamic_lib_name, llvm_as, llvm_objdump, rustc};

View File

@@ -1,5 +1,7 @@
//@ only-linux
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::llvm::llvm_bin_dir;
use run_make_support::{

View File

@@ -10,6 +10,8 @@
//@ ignore-cross-compile
//@ needs-dynamic-linking
//@ only-nightly (requires unstable rustc flag)
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// This test trips a check in the MSVC linker for an outdated processor:
// "LNK1322: cannot avoid potential ARM hazard (Cortex-A53 MPCore processor bug #843419)"

View File

@@ -15,6 +15,8 @@
// Only checking on Unix platforms should suffice.
//FIXME(Oneirical): This could be adapted to work on Windows by checking how
// that output differs.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_objdump, regex, rust_lib_name, rustc, static_lib_name};

View File

@@ -6,6 +6,8 @@
// See https://github.com/rust-lang/rust/issues/63349
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::rustc;

View File

@@ -6,6 +6,8 @@
//@ only-x86_64-unknown-linux-gnu
// Reason: some of the inline assembly directives are architecture-specific.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::rustc;

View File

@@ -8,6 +8,8 @@
// See https://github.com/rust-lang/rust/issues/49914
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{rfs, rustc};

View File

@@ -5,6 +5,8 @@
// as this is not something rustc can fix by itself,
// we just skip the test on windows-gnu for now. Hence:
//@ ignore-windows-gnu
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{rfs, rustc};

View File

@@ -5,6 +5,8 @@
//@ ignore-cross-compile
// Reason: the compiled binary is executed
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{build_native_static_lib, run, rustc};

View File

@@ -6,6 +6,8 @@
// See https://github.com/rust-lang/rust/pull/17619
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{run, rust_lib_name, rustc, test_while_readonly};

View File

@@ -5,6 +5,8 @@
//@ ignore-cross-compile
// Reason: the compiled binary is executed
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name};

View File

@@ -4,6 +4,8 @@
// See https://github.com/rust-lang/rust/issues/10741
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::rustc;

View File

@@ -6,6 +6,8 @@
//@ only-linux
// Reason: this test is specific to linux, considering compilation is targeted
// towards linux architectures only.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{assert_count_is, llvm_components_contain, rfs, rustc};

View File

@@ -5,6 +5,7 @@
// error message is used.
// See https://github.com/rust-lang/rust/issues/10814
//@ needs-llvm-components: x86
//@ ignore-backends: gcc
use run_make_support::rustc;

View File

@@ -2,6 +2,8 @@
//@ ignore-wasm32
//@ ignore-wasm64
// ignore-tidy-linelength
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// Ensure that on stable we don't suggest restricting with an unsafe trait and we continue
// mentioning the rest of the obligation chain.

View File

@@ -5,6 +5,7 @@ use run_make_support::{rustc, serde_json};
// we should be trying to move these targets to dynamically link
// musl libc by default.
//@ needs-llvm-components: aarch64 arm powerpc x86
//@ ignore-backends: gcc
static LEGACY_STATIC_LINKING_TARGETS: &[&'static str] = &[
"aarch64-unknown-linux-musl",
"arm-unknown-linux-musleabi",

View File

@@ -2,6 +2,8 @@
//@ only-x86_64
//@ needs-target-std
//@ needs-crate-type: dylib
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::object::ObjectSymbol;
use run_make_support::object::read::{File, Object, Symbol};

View File

@@ -1,4 +1,7 @@
//@ needs-target-std
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// `no_builtins` is an attribute related to LLVM's optimizations. In order to ensure that it has an
// effect on link-time optimizations (LTO), it should be added to function declarations in a crate.
// This test uses the `llvm-filecheck` tool to determine that this attribute is successfully

View File

@@ -1,4 +1,6 @@
//@ only-x86_64-unknown-linux-gnu
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::fs;
use std::path::Path;

View File

@@ -1,4 +1,6 @@
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// The rlib produced by a no_builtins crate should be explicitly linked
// during compilation, and as a result be present in the linker arguments.

View File

@@ -6,6 +6,8 @@
//@ needs-profiler-runtime
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{
has_extension, has_prefix, invalid_utf8_contains, llvm_profdata, run, rustc, shallow_find_files,

View File

@@ -6,6 +6,8 @@
//@ ignore-cross-compile
// Reason: some cross-compiled targets don't support various crate types and fail to link.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::path::PathBuf;

View File

@@ -9,6 +9,8 @@
//@ needs-profiler-runtime
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::path::Path;

View File

@@ -4,6 +4,8 @@
//@ needs-profiler-runtime
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::path::Path;

View File

@@ -6,6 +6,8 @@
// Reason: this exercises LTO profiling
//@ ignore-cross-compile
// Reason: the compiled binary is executed
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{cwd, has_extension, has_prefix, run, rustc, shallow_find_files};

View File

@@ -1,5 +1,7 @@
//@ needs-target-std
//
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime.
// Since these show up as globals in the LLVM IR, the compiler generates dllimport-related
// __imp_ stubs for them. This can lead to linker errors because the instrumentation

View File

@@ -9,6 +9,8 @@
// Reason: llvm_profdata is used
//@ ignore-cross-compile
// Reason: the compiled binary is executed
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_filecheck, llvm_profdata, rfs, run, rustc};

View File

@@ -7,6 +7,8 @@
//@ needs-profiler-runtime
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{
cwd, has_extension, has_prefix, llvm_filecheck, llvm_profdata, rfs, run_with_args, rustc,

View File

@@ -9,6 +9,7 @@
//@ needs-llvm-components: arm x86 webassembly
// Note: without the needs-llvm-components it will fail on LLVM built without the required
// components listed above.
//@ ignore-backends: gcc
use std::collections::HashSet;
use std::iter::FromIterator;

View File

@@ -1,6 +1,10 @@
//! Check that unstable print requests are omitted from help if compiler is in stable channel.
//!
//! Issue: <https://github.com/rust-lang/rust/issues/138698>
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{diff, rustc, similar};
fn main() {

View File

@@ -1,6 +1,7 @@
//@ ignore-cross-compile
//@ needs-llvm-components: aarch64 x86
// FIXME(#132514): Is needs-llvm-components actually necessary for this test?
//@ ignore-backends: gcc
use run_make_support::{assert_contains_regex, rfs, rustc, target};

View File

@@ -5,6 +5,7 @@
//@ needs-llvm-components: aarch64 arm avr bpf csky hexagon loongarch m68k mips msp430 nvptx powerpc riscv sparc systemz webassembly x86
// FIXME(jieyouxu): there has to be a better way to do this, without the needs-llvm-components it
// will fail on LLVM built without all of the components listed above.
//@ ignore-backends: gcc
use run_make_support::bare_rustc;

View File

@@ -6,6 +6,7 @@
// will fail on LLVM built without all of the components listed above. If adding a new target that
// relies on a llvm component not listed above, it will need to be added to the required llvm
// components above.
//@ ignore-backends: gcc
use std::path::PathBuf;

View File

@@ -8,6 +8,8 @@
// See https://github.com/rust-lang/rust/issues/14500
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{cc, extra_c_flags, run, rustc, static_lib_name};

View File

@@ -7,6 +7,8 @@
//@ needs-target-std
//@ ignore-windows
// Reason: the remap path prefix is not printed in the dwarf dump.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{cwd, is_darwin, llvm_dwarfdump, rust_lib_name, rustc};

View File

@@ -1,6 +1,9 @@
//@ ignore-cross-compile
//@ ignore-wasm (`object` can't handle wasm object files)
//@ ignore-windows
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
// This test should be replaced with one in tests/debuginfo once GDB or LLDB support 128-bit enums.
use std::collections::HashMap;

View File

@@ -11,6 +11,9 @@
//@ ignore-windows-gnu
// GNU Linker for Windows is non-deterministic.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{bin_name, is_windows_msvc, rfs, rust_lib_name, rustc};
fn main() {

View File

@@ -21,6 +21,8 @@
// Tracking Issue: https://github.com/rust-lang/rust/issues/129080
//@ ignore-cross-compile (linker binary needs to run)
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{
bin_name, cwd, diff, is_darwin, is_windows, regex, rfs, run_in_tmpdir, rust_lib_name, rustc,

View File

@@ -10,6 +10,9 @@
// Finally, the test verifies that `-Ctarget-cpu=native` is rejected when using
// the second custom target.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::fs;
use run_make_support::*;

View File

@@ -1,5 +1,8 @@
// Tests `rustc --help` and similar invocations against snapshots and each other.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{bare_rustc, diff, similar};
fn main() {

View File

@@ -1,3 +1,6 @@
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{Diff, rustc, rustdoc};
fn compare_outputs(args: &[&str]) {

View File

@@ -5,6 +5,9 @@
//!
//! Please see https://github.com/rust-lang/rust/issues/144521.
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{rustc, rustdoc};
fn main() {

View File

@@ -7,6 +7,8 @@
//@ needs-sanitizer-support
//@ needs-sanitizer-address
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
//@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer

View File

@@ -6,6 +6,8 @@
//@ needs-sanitizer-support
//@ needs-sanitizer-address
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
//@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer

View File

@@ -10,6 +10,8 @@
//@ needs-sanitizer-support
//@ needs-sanitizer-address
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
//@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer

View File

@@ -5,6 +5,9 @@
// Note that this test does not check linking or binary execution.
// See https://github.com/rust-lang/rust/pull/21233
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_components_contain, rustc};
fn main() {

View File

@@ -55,6 +55,9 @@
// at all, and lumped windows-msvc and windows-gnu together at that.
//@ ignore-windows-gnu
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
#![deny(warnings)]
use std::collections::BTreeSet;

View File

@@ -4,6 +4,8 @@
//@ only-x86_64
//@ only-linux
//@ ignore-32bit
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::process::Command;

View File

@@ -2,6 +2,7 @@
// the last value is used both for the corresponding target modifier in the
// crate metadata and for the target CPU recorded in the LLVM IR.
//@ needs-llvm-components: nvptx
//@ ignore-backends: gcc
use run_make_support::*;

View File

@@ -5,6 +5,7 @@
// using them correctly, or fails with the right error message when using them improperly.
// See https://github.com/rust-lang/rust/pull/16156
//@ needs-llvm-components: x86
//@ ignore-backends: gcc
use run_make_support::{diff, rfs, rustc};

View File

@@ -5,6 +5,8 @@
// ignore-tidy-linelength
//@ needs-llvm-components: arm
//@ ignore-backends: gcc
// Note: without the needs-llvm-components it will fail on LLVM built without all of the components
// listed above. If any new targets are added, please double-check their respective llvm components
// are specified above.

View File

@@ -1,5 +1,7 @@
//@ needs-llvm-components: arm
//@ needs-rust-lld
//@ ignore-backends: gcc
use run_make_support::{
llvm_filecheck, llvm_objdump, path, rfs, run, rustc, rustc_minicore, source_root,
};

View File

@@ -7,6 +7,8 @@
//@ ignore-cross-compile
// Reason: the binary is executed
//@ needs-profiler-runtime
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{llvm_profdata, rfs, run, rustc};

View File

@@ -4,6 +4,8 @@
//@ ignore-windows llvm-readobj --all doesn't show local symbols on Windows
//@ needs-crate-type: proc-macro
//@ ignore-musl (FIXME: can't find `-lunwind`)
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{dynamic_lib_name, llvm_readobj, rustc};

View File

@@ -1,4 +1,6 @@
//@ ignore-cross-compile
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use run_make_support::{assert_contains, rfs, run, rustc};

View File

@@ -1,4 +1,7 @@
//@ needs-rust-lld
// FIXME: Once GCC backend is fixed, remove this `ignore-backends`.
//@ ignore-backends: gcc
use std::path::Path;
use run_make_support::{path, rfs, rustc, rustc_minicore, wasmparser};

View File

@@ -0,0 +1,36 @@
//@ edition: 2018
#![feature(proc_macro_quote)]
use proc_macro::{TokenStream, Ident, TokenTree, quote};
#[proc_macro_derive(Serialize, attributes(serde))]
pub fn serialize(input: TokenStream) -> TokenStream {
assert_eq!(
input.to_string(),
"pub struct Matrix { #[serde(serialize_with = \"f\")] matrix: (), }"
);
let TokenTree::Group(group) = input.into_iter().last().unwrap() else {
panic!("unexpected group");
};
let TokenTree::Group(group) = group.stream().into_iter().nth(1).unwrap() else {
panic!("expected group");
};
let TokenTree::Group(group) = group.stream().into_iter().nth(1).unwrap() else {
panic!("expected group");
};
let TokenTree::Literal(lit) = group.stream().into_iter().nth(2).unwrap() else {
panic!("expected literal");
};
let ident = Ident::new("f", lit.span());
quote! {
fn serialize() {
$ident();
}
}
.into()
}

Some files were not shown because too many files have changed in this diff Show More