diff --git a/tests/crashes/114880.rs b/tests/crashes/114880.rs new file mode 100644 index 0000000000000..c05f7ed4ff646 --- /dev/null +++ b/tests/crashes/114880.rs @@ -0,0 +1,7 @@ +//@ known-bug: #114880 +//@ proc-macro: aux114880.rs +//@ ignore-backends: gcc + +aux114880::expand!(); + +fn main() {} diff --git a/tests/crashes/119940.rs b/tests/crashes/119940.rs new file mode 100644 index 0000000000000..af259b023c942 --- /dev/null +++ b/tests/crashes/119940.rs @@ -0,0 +1,27 @@ +//@ known-bug: #119940 +//@ compile-flags: -Zvalidate-mir + +#![feature(custom_mir, core_intrinsics)] +extern crate core; +use core::intrinsics::mir::*; + +pub enum E { + V0 { fld0: &'static u64 }, +} + +#[custom_mir(dialect = "runtime", phase = "initial")] +pub fn fn0() { + mir! { + let e: E; + let n: u64; + { + n = 0; + place!(Field::<&u64>(Variant(e, 0), 0)) = &n; + Return() + } + + } +} +pub fn main() { + fn0(); +} diff --git a/tests/crashes/126418.rs b/tests/crashes/126418.rs new file mode 100644 index 0000000000000..0f71a74f7ebfb --- /dev/null +++ b/tests/crashes/126418.rs @@ -0,0 +1,6 @@ +//@ known-bug: #126418 +//@ compile-flags: --crate-type=lib +//@ only-x86_64 +//@ ignore-backends: gcc +#![feature(abi_x86_interrupt)] +pub extern "x86-interrupt" fn f(_: ()) {} diff --git a/tests/crashes/138274.rs b/tests/crashes/138274.rs new file mode 100644 index 0000000000000..d657b27e46f3e --- /dev/null +++ b/tests/crashes/138274.rs @@ -0,0 +1,18 @@ +//@ known-bug: #138274 +//@ edition: 2021 +//@ compile-flags: --crate-type=lib +trait Trait {} + +fn foo() -> Box { + todo!() +} + +fn fetch() { + async { + let fut = async { + let _x = foo(); + async {}.await; + }; + let _: Box = Box::new(fut); + }; +} diff --git a/tests/crashes/138660.rs b/tests/crashes/138660.rs new file mode 100644 index 0000000000000..90eb8026f072f --- /dev/null +++ b/tests/crashes/138660.rs @@ -0,0 +1,7 @@ +//@ known-bug: #138660 +enum A { + V1(isize) = 1..=10, + V0 = 1..=10, +} +const B: &'static [A] = &[A::V0, A::V1(111)]; +fn main() {} diff --git a/tests/crashes/auxiliary/aux114880.rs b/tests/crashes/auxiliary/aux114880.rs new file mode 100644 index 0000000000000..244396fdd9ef5 --- /dev/null +++ b/tests/crashes/auxiliary/aux114880.rs @@ -0,0 +1,13 @@ +#![feature(proc_macro_expand)] +#![crate_type = "proc-macro"] + +extern crate proc_macro; +use std::str::FromStr; + +use proc_macro::TokenStream; + +#[proc_macro] +pub fn expand(_: TokenStream) -> TokenStream { + dbg!(TokenStream::from_str("include!(\"./doesnt_exist\")").unwrap().expand_expr()) + .unwrap_or_default() +}