Skip to content

Commit 28d58f6

Browse files
Bless tests
1 parent ec79720 commit 28d58f6

26 files changed

+40
-7
lines changed

tests/ui/async-await/in-trait/async-associated-types.rs

+2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ use std::fmt::Debug;
99
trait MyTrait<'a, 'b, T> where Self: 'a, T: Debug + Sized + 'b {
1010
type MyAssoc;
1111

12+
#[allow(async_fn_in_trait)]
1213
async fn foo(&'a self, key: &'b T) -> Self::MyAssoc;
1314
}
1415

1516
impl<'a, 'b, T: Debug + Sized + 'b, U: 'a> MyTrait<'a, 'b, T> for U {
1617
type MyAssoc = (&'a U, &'b T);
1718

19+
#[allow(async_fn_in_trait)]
1820
async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
1921
(self, key)
2022
}

tests/ui/async-await/in-trait/async-default-fn-overridden.rs

+2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
use std::future::Future;
77

88
trait AsyncTrait {
9+
#[allow(async_fn_in_trait)]
910
async fn default_impl() {
1011
assert!(false);
1112
}
1213

14+
#[allow(async_fn_in_trait)]
1315
async fn call_default_impl() {
1416
Self::default_impl().await
1517
}

tests/ui/async-await/in-trait/async-example-desugared-extra.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::pin::Pin;
1010
use std::task::Poll;
1111

1212
pub trait MyTrait {
13+
#[allow(async_fn_in_trait)]
1314
async fn foo(&self) -> i32;
1415
}
1516

tests/ui/async-await/in-trait/async-example-desugared.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use std::future::Future;
99

1010
trait MyTrait {
11+
#[allow(async_fn_in_trait)]
1112
async fn foo(&self) -> i32;
1213
}
1314

tests/ui/async-await/in-trait/async-example.rs

+3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
#![allow(incomplete_features)]
66

77
trait MyTrait {
8+
#[allow(async_fn_in_trait)]
89
async fn foo(&self) -> i32;
10+
11+
#[allow(async_fn_in_trait)]
912
async fn bar(&self) -> i32;
1013
}
1114

tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use std::fmt::Debug;
88

99
trait MyTrait<'a, 'b, T> {
10+
#[allow(async_fn_in_trait)]
1011
async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T) where T: Debug + Sized;
1112
}
1213

tests/ui/async-await/in-trait/async-lifetimes.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![allow(incomplete_features)]
66

77
trait MyTrait<'a, 'b, T> {
8+
#[allow(async_fn_in_trait)]
89
async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T);
910
}
1011

tests/ui/async-await/in-trait/early-bound-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![allow(incomplete_features)]
66

77
pub trait Foo {
8+
#[allow(async_fn_in_trait)]
89
async fn foo(&mut self);
910
}
1011

tests/ui/async-await/in-trait/early-bound-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![allow(incomplete_features)]
66

77
pub trait Foo {
8+
#[allow(async_fn_in_trait)]
89
async fn foo(&mut self);
910
}
1011

tests/ui/async-await/in-trait/implied-bounds.rs

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
trait TcpStack {
88
type Connection<'a>: Sized where Self: 'a;
99
fn connect<'a>(&'a self) -> Self::Connection<'a>;
10+
11+
#[allow(async_fn_in_trait)]
1012
async fn async_connect<'a>(&'a self) -> Self::Connection<'a>;
1113
}
1214

tests/ui/async-await/in-trait/issue-102138.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ async fn yield_now() {}
1010

1111
trait AsyncIterator {
1212
type Item;
13+
14+
#[allow(async_fn_in_trait)]
1315
async fn next(&mut self) -> Option<Self::Item>;
1416
}
1517

tests/ui/async-await/in-trait/issue-102219.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
#![allow(incomplete_features)]
77

88
trait T {
9+
#[allow(async_fn_in_trait)]
910
async fn foo();
1011
}

tests/ui/async-await/in-trait/issue-102310.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![allow(incomplete_features)]
66

77
pub trait SpiDevice {
8+
#[allow(async_fn_in_trait)]
89
async fn transaction<F, R>(&mut self);
910
}
1011

tests/ui/async-await/in-trait/issue-104678.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::future::Future;
88
pub trait Pool {
99
type Conn;
1010

11+
#[allow(async_fn_in_trait)]
1112
async fn async_callback<'a, F: FnOnce(&'a Self::Conn) -> Fut, Fut: Future<Output = ()>>(
1213
&'a self,
1314
callback: F,

tests/ui/async-await/in-trait/nested-rpit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::future::Future;
99
use std::marker::PhantomData;
1010

1111
trait Lockable<K, V> {
12+
#[allow(async_fn_in_trait)]
1213
async fn lock_all_entries(&self) -> impl Future<Output = Guard<'_>>;
1314
}
1415

tests/ui/async-await/in-trait/normalize-opaque-with-bound-vars.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
pub struct SharedState {}
1212

1313
pub trait State {
14+
#[allow(async_fn_in_trait)]
1415
async fn execute(self, shared_state: &SharedState);
1516
}
1617

tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: return type notation is experimental
2-
--> $DIR/feature-gate-return_type_notation.rs:14:17
2+
--> $DIR/feature-gate-return_type_notation.rs:15:17
33
|
44
LL | fn foo<T: Trait<m(): Send>>() {}
55
| ^^^^^^^^^
@@ -8,15 +8,15 @@ LL | fn foo<T: Trait<m(): Send>>() {}
88
= help: add `#![feature(return_type_notation)]` to the crate attributes to enable
99

1010
error: parenthesized generic arguments cannot be used in associated type constraints
11-
--> $DIR/feature-gate-return_type_notation.rs:14:17
11+
--> $DIR/feature-gate-return_type_notation.rs:15:17
1212
|
1313
LL | fn foo<T: Trait<m(): Send>>() {}
1414
| ^--
1515
| |
1616
| help: remove these parentheses
1717

1818
error[E0220]: associated type `m` not found for `Trait`
19-
--> $DIR/feature-gate-return_type_notation.rs:14:17
19+
--> $DIR/feature-gate-return_type_notation.rs:15:17
2020
|
2121
LL | fn foo<T: Trait<m(): Send>>() {}
2222
| ^ associated type `m` not found

tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: return type notation is experimental
2-
--> $DIR/feature-gate-return_type_notation.rs:14:17
2+
--> $DIR/feature-gate-return_type_notation.rs:15:17
33
|
44
LL | fn foo<T: Trait<m(): Send>>() {}
55
| ^^^^^^^^^

tests/ui/feature-gates/feature-gate-return_type_notation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![feature(async_fn_in_trait)]
88

99
trait Trait {
10+
#[allow(async_fn_in_trait)]
1011
async fn m();
1112
}
1213

tests/ui/impl-trait/in-trait/assumed-wf-bounds-in-impl.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ trait AsyncLendingIterator {
99
where
1010
Self: 'a;
1111

12+
#[allow(async_fn_in_trait)]
1213
async fn next(&mut self) -> Option<Self::Item<'_>>;
1314
}
1415

tests/ui/impl-trait/in-trait/default-body-with-rpit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use std::fmt::Debug;
88

99
trait Foo {
10+
#[allow(async_fn_in_trait)]
1011
async fn baz(&self) -> impl Debug {
1112
""
1213
}

tests/ui/impl-trait/in-trait/default-body.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use std::fmt::Debug;
88

99
trait Foo {
10+
#[allow(async_fn_in_trait)]
1011
async fn baz(&self) -> &str {
1112
""
1213
}

tests/ui/impl-trait/in-trait/early.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![allow(incomplete_features)]
66

77
pub trait Foo {
8+
#[allow(async_fn_in_trait)]
89
async fn bar<'a: 'a>(&'a mut self);
910
}
1011

tests/ui/impl-trait/in-trait/suggest-missing-item.fixed

+3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)]
55

66
trait Trait {
7+
#[allow(async_fn_in_trait)]
78
async fn foo();
89

10+
#[allow(async_fn_in_trait)]
911
async fn bar() -> i32;
1012

1113
fn test(&self) -> impl Sized + '_;
1214

15+
#[allow(async_fn_in_trait)]
1316
async fn baz(&self) -> &i32;
1417
}
1518

tests/ui/impl-trait/in-trait/suggest-missing-item.rs

+3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
#![feature(async_fn_in_trait, return_position_impl_trait_in_trait)]
55

66
trait Trait {
7+
#[allow(async_fn_in_trait)]
78
async fn foo();
89

10+
#[allow(async_fn_in_trait)]
911
async fn bar() -> i32;
1012

1113
fn test(&self) -> impl Sized + '_;
1214

15+
#[allow(async_fn_in_trait)]
1316
async fn baz(&self) -> &i32;
1417
}
1518

tests/ui/impl-trait/in-trait/suggest-missing-item.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error[E0046]: not all trait items implemented, missing: `foo`, `bar`, `test`, `baz`
2-
--> $DIR/suggest-missing-item.rs:18:1
2+
--> $DIR/suggest-missing-item.rs:21:1
33
|
44
LL | async fn foo();
55
| --------------- `foo` from trait
6-
LL |
6+
...
77
LL | async fn bar() -> i32;
88
| ---------------------- `bar` from trait
99
LL |
1010
LL | fn test(&self) -> impl Sized + '_;
1111
| ---------------------------------- `test` from trait
12-
LL |
12+
...
1313
LL | async fn baz(&self) -> &i32;
1414
| ---------------------------- `baz` from trait
1515
...

0 commit comments

Comments
 (0)