File tree 2 files changed +15
-1
lines changed
tests/ui/type-alias-impl-trait
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,8 @@ fn test() -> Pointer<_> {
12
12
fn main ( ) {
13
13
test ( ) ;
14
14
}
15
+
16
+ extern "Rust" {
17
+ fn bar ( ) -> Pointer < _ > ;
18
+ //~^ ERROR: the placeholder `_` is not allowed within types
19
+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ LL | fn test() -> Pointer<_> {
7
7
| | not allowed in type signatures
8
8
| help: replace with the correct return type: `Pointer<i32>`
9
9
10
- error: aborting due to 1 previous error
10
+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
11
+ --> $DIR/issue-77179.rs:17:25
12
+ |
13
+ LL | fn bar() -> Pointer<_>;
14
+ | ^
15
+ | |
16
+ | not allowed in type signatures
17
+ | help: use type parameters instead: `T`
18
+
19
+ error: aborting due to 2 previous errors
11
20
12
21
For more information about this error, try `rustc --explain E0121`.
You can’t perform that action at this time.
0 commit comments