add test for non-defining use of TAIT in foreign function item

This commit is contained in:
Lukas Markeffsky 2024-01-15 01:21:03 +01:00
parent 450cb5eda6
commit 22833c177e
2 changed files with 15 additions and 1 deletions

View File

@ -12,3 +12,8 @@ fn test() -> Pointer<_> {
fn main() {
test();
}
extern "Rust" {
fn bar() -> Pointer<_>;
//~^ ERROR: the placeholder `_` is not allowed within types
}

View File

@ -7,6 +7,15 @@ LL | fn test() -> Pointer<_> {
| | not allowed in type signatures
| help: replace with the correct return type: `Pointer<i32>`
error: aborting due to 1 previous error
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
--> $DIR/issue-77179.rs:17:25
|
LL | fn bar() -> Pointer<_>;
| ^
| |
| not allowed in type signatures
| help: use type parameters instead: `T`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0121`.