File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use async_trait:: async_trait;
4
4
5
- // Renaming to avoid masking missing absolute paths in generated code.
6
- use std:: future:: Future as StdFuture ;
7
-
8
5
#[ async_trait]
9
6
trait Trait {
10
7
type Assoc ;
@@ -120,14 +117,19 @@ pub async fn test_object_safe_with_default() {
120
117
}
121
118
122
119
// https://github.com/dtolnay/async-trait/issues/2
123
- #[ async_trait]
124
- pub trait Issue2 : StdFuture {
125
- async fn flatten ( self ) -> <<Self as StdFuture >:: Output as StdFuture >:: Output
126
- where
127
- Self :: Output : StdFuture + Send ,
128
- Self : Sized ,
129
- {
130
- let nested_future = self . await ;
131
- nested_future. await
120
+ mod issue2 {
121
+ use async_trait:: async_trait;
122
+ use std:: future:: Future ;
123
+
124
+ #[ async_trait]
125
+ pub trait Issue2 : Future {
126
+ async fn flatten ( self ) -> <<Self as Future >:: Output as Future >:: Output
127
+ where
128
+ Self :: Output : Future + Send ,
129
+ Self : Sized ,
130
+ {
131
+ let nested_future = self . await ;
132
+ nested_future. await
133
+ }
132
134
}
133
135
}
You can’t perform that action at this time.
0 commit comments