mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rollup merge of #132543 - cyrgani:master, r=compiler-errors
add and update some crashtests Adds tests for #126268 and #132126, updates it for #131050.
This commit is contained in:
commit
ecbd8d1550
18
tests/crashes/126268.rs
Normal file
18
tests/crashes/126268.rs
Normal file
@ -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> {}
|
@ -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 {}
|
||||
|
||||
fn create_complex_future() -> impl Future<Output = impl ReturnsSend> {
|
||||
async { &|| async { invalid_future().await } }
|
||||
}
|
||||
|
||||
async fn post_user_filter() -> impl Filter {
|
||||
AndThen(&(), || async { create_user().await })
|
||||
fn coerce_impl_trait() -> impl Future<Output = impl Send> {
|
||||
create_complex_future()
|
||||
}
|
||||
|
||||
async fn get_app() -> impl Send {
|
||||
post_user_filter().await
|
||||
}
|
||||
trait ReturnsSend {}
|
||||
|
||||
trait Filter {}
|
||||
|
||||
struct AndThen<T, F>(T, F);
|
||||
|
||||
impl<T, F, R> Filter for AndThen<T, F>
|
||||
impl<F, R> ReturnsSend for F
|
||||
where
|
||||
F: Fn() -> R,
|
||||
R: Send,
|
||||
|
2
tests/crashes/132126.rs
Normal file
2
tests/crashes/132126.rs
Normal file
@ -0,0 +1,2 @@
|
||||
//@ known-bug: #132126
|
||||
trait UnsafeCopy where Self: use<Self> {}
|
Loading…
Reference in New Issue
Block a user