Skip to content

more crash tests #132710

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

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions tests/crashes/132127.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ known-bug: #132127
#![feature(dyn_star)]

trait Trait {}

fn main() {
let x: dyn* Trait + Send = 1usize;
x as dyn* Trait;
}
3 changes: 3 additions & 0 deletions tests/crashes/132142.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//@ known-bug: #132142

async extern "C-cmse-nonsecure-entry" fn fun(...) {}
15 changes: 15 additions & 0 deletions tests/crashes/132320.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//@ known-bug: #132320
//@ compile-flags: -Znext-solver=globally

trait Foo {
type Item;
fn foo(&mut self);
}

impl Foo for () {
type Item = Option<()>;

fn foo(&mut self) {
let _ = Self::Item::None;
}
}
28 changes: 28 additions & 0 deletions tests/crashes/132330.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//@ known-bug: #132330
//@compile-flags: -Znext-solver=globally

trait Service {
type S;
}

trait Framing {
type F;
}

impl Framing for () {
type F = ();
}

trait HttpService<F: Framing>: Service<S = F::F> {}

type BoxService = Box<dyn HttpService<(), S = ()>>;

fn build_server<F: FnOnce() -> BoxService>(_: F) {}

fn make_server<F: Framing>() -> Box<dyn HttpService<F, S = F::F>> {
unimplemented!()
}

fn main() {
build_server(|| make_server())
}
13 changes: 13 additions & 0 deletions tests/crashes/132335.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//@ known-bug: #132335
//@ compile-flags: -Znext-solver=globally --crate-type lib --edition=2018
use core::future::Future;
use core::pin::Pin;

pub trait Unit {}
impl Unit for () {}

pub fn get_all_files_in_dir() -> Pin<Box<dyn Future<Output = impl Unit>>> {
Box::pin(async {
get_all_files_in_dir().await;
})
}
8 changes: 8 additions & 0 deletions tests/crashes/132391.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//@ known-bug: #123291

trait MyTrait {
#[repr(align)]
fn myfun();
}

pub fn main() {}
9 changes: 9 additions & 0 deletions tests/crashes/132430.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ known-bug: #132430

//@compile-flags: --edition=2018 --crate-type=lib
#![feature(cmse_nonsecure_entry)]
struct Test;

impl Test {
pub async unsafe extern "C-cmse-nonsecure-entry" fn test(val: &str) {}
}
9 changes: 9 additions & 0 deletions tests/crashes/132530.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ known-bug: #132530

#![feature(non_lifetime_binders)]

trait Trait<'a, A> {
type Assoc<'a> = i32;
}

fn a() -> impl for<T> Trait<Assoc = impl Trait<T>> {}
Loading