Skip to content
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

add and update some crashtests #132543

Merged
merged 1 commit into from
Nov 3, 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
18 changes: 18 additions & 0 deletions tests/crashes/126268.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//@ known-bug: #126268
#![feature(min_specialization)]

trait Trait {}

impl<T> Trait for T {}

trait Data {
type Elem;
}

struct DatasetIter<'a, R: Data> {
data: &'a R::Elem,
}

pub struct ArrayBase {}

impl<'a> Trait for DatasetIter<'a, ArrayBase> {}
20 changes: 8 additions & 12 deletions tests/crashes/131050.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
//@ known-bug: #131050
//@ compile-flags: --edition=2021

fn query_as<D>() {}
use std::future::Future;

async fn create_user() {
query_as();
}
fn invalid_future() -> impl Future {}

async fn post_user_filter() -> impl Filter {
AndThen(&(), || async { create_user().await })
fn create_complex_future() -> impl Future<Output = impl ReturnsSend> {
async { &|| async { invalid_future().await } }
}

async fn get_app() -> impl Send {
post_user_filter().await
fn coerce_impl_trait() -> impl Future<Output = impl Send> {
create_complex_future()
}

trait Filter {}

struct AndThen<T, F>(T, F);
trait ReturnsSend {}

impl<T, F, R> Filter for AndThen<T, F>
impl<F, R> ReturnsSend for F
where
F: Fn() -> R,
R: Send,
Expand Down
2 changes: 2 additions & 0 deletions tests/crashes/132126.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//@ known-bug: #132126
trait UnsafeCopy where Self: use<Self> {}
Loading