add test for non-defining use of TAIT in foreign function item
This commit is contained in:
parent
450cb5eda6
commit
22833c177e
@ -12,3 +12,8 @@ fn test() -> Pointer<_> {
|
||||
fn main() {
|
||||
test();
|
||||
}
|
||||
|
||||
extern "Rust" {
|
||||
fn bar() -> Pointer<_>;
|
||||
//~^ ERROR: the placeholder `_` is not allowed within types
|
||||
}
|
||||
|
@ -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`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user