1
Fork 0

Rollup merge of #52346 - rkruppe:patch-1, r=cramertj

Fix typo in improper_ctypes suggestion

closes #52345
This commit is contained in:
kennytm 2018-07-14 02:56:57 +08:00 committed by GitHub
commit fe1b41016c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -673,7 +673,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
return FfiUnsafe {
ty: ty,
reason: "this function pointer has Rust-specific calling convention",
help: Some("consider using an `fn \"extern\"(...) -> ...` \
help: Some("consider using an `extern fn(...) -> ...` \
function pointer instead"),
}
}

View file

@ -126,7 +126,7 @@ error: `extern` block uses type `fn()` which is not FFI-safe: this function poin
LL | pub fn fn_type(p: RustFn); //~ ERROR function pointer has Rust-specific
| ^^^^^^
|
= help: consider using an `fn "extern"(...) -> ...` function pointer instead
= help: consider using an `extern fn(...) -> ...` function pointer instead
error: `extern` block uses type `fn()` which is not FFI-safe: this function pointer has Rust-specific calling convention
--> $DIR/lint-ctypes.rs:70:24
@ -134,7 +134,7 @@ error: `extern` block uses type `fn()` which is not FFI-safe: this function poin
LL | pub fn fn_type2(p: fn()); //~ ERROR function pointer has Rust-specific
| ^^^^
|
= help: consider using an `fn "extern"(...) -> ...` function pointer instead
= help: consider using an `extern fn(...) -> ...` function pointer instead
error: `extern` block uses type `std::boxed::Box<u32>` which is not FFI-safe: this struct has unspecified layout
--> $DIR/lint-ctypes.rs:71:28