add several older crashtests
This commit is contained in:
parent
acfd264f4d
commit
053597f464
5 changed files with 72 additions and 0 deletions
7
tests/crashes/114880.rs
Normal file
7
tests/crashes/114880.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
//@ known-bug: #114880
|
||||
//@ proc-macro: aux114880.rs
|
||||
//@ ignore-backends: gcc
|
||||
|
||||
aux114880::expand!();
|
||||
|
||||
fn main() {}
|
||||
27
tests/crashes/119940.rs
Normal file
27
tests/crashes/119940.rs
Normal file
|
|
@ -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();
|
||||
}
|
||||
18
tests/crashes/138274.rs
Normal file
18
tests/crashes/138274.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
//@ known-bug: #138274
|
||||
//@ edition: 2021
|
||||
//@ compile-flags: --crate-type=lib
|
||||
trait Trait {}
|
||||
|
||||
fn foo() -> Box<dyn Trait> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn fetch() {
|
||||
async {
|
||||
let fut = async {
|
||||
let _x = foo();
|
||||
async {}.await;
|
||||
};
|
||||
let _: Box<dyn Send> = Box::new(fut);
|
||||
};
|
||||
}
|
||||
7
tests/crashes/138660.rs
Normal file
7
tests/crashes/138660.rs
Normal file
|
|
@ -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() {}
|
||||
13
tests/crashes/auxiliary/aux114880.rs
Normal file
13
tests/crashes/auxiliary/aux114880.rs
Normal file
|
|
@ -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()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue