File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
tests/ui/type-alias-impl-trait Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,8 @@ fn test() -> Pointer<_> {
1212fn main ( ) {
1313 test ( ) ;
1414}
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<_> {
77 | | not allowed in type signatures
88 | help: replace with the correct return type: `Pointer<i32>`
99
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
1120
1221For more information about this error, try `rustc --explain E0121`.
You can’t perform that action at this time.
0 commit comments