File tree 3 files changed +62
-0
lines changed
3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rustc -Zverbose - << 'EOF '
4
+
5
+
6
+ #![allow(unused_parens)]
7
+ trait Foo {
8
+ type Assoc;
9
+ }
10
+
11
+ fn called()
12
+ where
13
+ for<'b> fn(&'b ()): Foo,
14
+ {
15
+ }
16
+
17
+ fn caller()
18
+ where
19
+ (for<'a> fn(&'a ())): Foo,
20
+ {
21
+ called()
22
+ }
23
+
24
+ fn main() {}
25
+ EOF
26
+
Original file line number Diff line number Diff line change
1
+ pub trait Foo {
2
+ type Output : Foo ;
3
+
4
+ fn baz ( ) -> Self :: Output ;
5
+ }
6
+
7
+ pub struct Bar ;
8
+
9
+ impl Foo for & Bar {
10
+ type Output = Bar ;
11
+
12
+ fn baz ( ) -> Self :: Output {
13
+ Foo :: baz ( ) ;
14
+
15
+ Self :: Output { }
16
+ }
17
+ }
18
+
19
+ pub fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ rustc --edition=2021 - << 'EOF '
4
+
5
+ type AsyncFnPtr = Box<
6
+ dyn Fn() -> std::pin::Pin<Box<dyn std::future::Future<Output = ()>>>,
7
+ >;
8
+
9
+ async fn test() {}
10
+
11
+ #[allow(unused_must_use)]
12
+ fn main() {
13
+ Box::new(test) as AsyncFnPtr;
14
+ }
15
+
16
+ EOF
17
+
You can’t perform that action at this time.
0 commit comments