mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 01:40:02 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
10
tests/crashes/140693.rs
Normal 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
10
tests/crashes/146210.rs
Normal 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
4
tests/crashes/146353.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
//@ known-bug: #146353
|
||||
const BIG_CHAIN: u8 = ();
|
||||
trait NeverSend = !Send;
|
||||
fn main() {}
|
||||
10
tests/crashes/149015.rs
Normal file
10
tests/crashes/149015.rs
Normal 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
9
tests/crashes/152204.rs
Normal 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
10
tests/crashes/153368.rs
Normal 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
6
tests/crashes/154367.rs
Normal 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
7
tests/crashes/155482.rs
Normal 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
13
tests/crashes/155497.rs
Normal 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
3
tests/crashes/157197.rs
Normal 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
12
tests/crashes/158243.rs
Normal 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
16
tests/crashes/158773.rs
Normal 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
14
tests/crashes/158797.rs
Normal 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
4
tests/crashes/160329.rs
Normal 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
2
tests/crashes/160490.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
//@ known-bug: #160490
|
||||
fn f(...: u8) {}
|
||||
@@ -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};
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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::{
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user