Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix typo in improper_ctypes suggestion
closes #52345
  • Loading branch information
Robin Kruppe committed Jul 13, 2018
1 parent c0955a3 commit e20f1d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc_lint/types.rs
Expand Up @@ -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"),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/lint-ctypes.stderr
Expand Up @@ -126,15 +126,15 @@ 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
|
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
Expand Down

0 comments on commit e20f1d1

Please sign in to comment.