about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-07-14 02:56:57 +0800
committerGitHub <noreply@github.com>2018-07-14 02:56:57 +0800
commitfe1b41016c5b132f1f5b76d2aa67d8d2dad1026b (patch)
treebf80e9828cd171a0fe28f1922c47104333d24f29 /src
parent3d6840234c1dce3456afa131d5c42221a9c6a0f0 (diff)
parente20f1d159e805cb941f06c6277337a228c69a86c (diff)
downloadrust-fe1b41016c5b132f1f5b76d2aa67d8d2dad1026b.tar.gz
rust-fe1b41016c5b132f1f5b76d2aa67d8d2dad1026b.zip
Rollup merge of #52346 - rkruppe:patch-1, r=cramertj
Fix typo in improper_ctypes suggestion

closes #52345
Diffstat (limited to 'src')
-rw-r--r--src/librustc_lint/types.rs2
-rw-r--r--src/test/ui/lint-ctypes.stderr4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs
index 50492ae0737..e5bd6a7f610 100644
--- a/src/librustc_lint/types.rs
+++ b/src/librustc_lint/types.rs
@@ -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"),
                         }
                     }
diff --git a/src/test/ui/lint-ctypes.stderr b/src/test/ui/lint-ctypes.stderr
index d1ef3a7a19c..b97e4662660 100644
--- a/src/test/ui/lint-ctypes.stderr
+++ b/src/test/ui/lint-ctypes.stderr
@@ -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