summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-02-10 21:01:49 -0800
committerEsteban Küber <esteban@kuber.com.ar>2018-03-14 18:04:20 -0700
commit6d8a1739805fa81b6baa8c86efc3e79920ecb306 (patch)
tree8ca52590f0d3e738cc3d8ec277ab564653618e35 /src/test/ui/error-codes
parent883e74645d350b6752cb94d48f46363f6f8789e9 (diff)
downloadrust-6d8a1739805fa81b6baa8c86efc3e79920ecb306.tar.gz
rust-6d8a1739805fa81b6baa8c86efc3e79920ecb306.zip
Reword E0044 and message for `!Send` types
 - Reword E0044 help.
 - Change error message for types that don't implement `Send`
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0044.rs8
-rw-r--r--src/test/ui/error-codes/E0044.stderr12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/test/ui/error-codes/E0044.rs b/src/test/ui/error-codes/E0044.rs
index 48fe2300031..4d20edea5fe 100644
--- a/src/test/ui/error-codes/E0044.rs
+++ b/src/test/ui/error-codes/E0044.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,7 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern { fn some_func<T>(x: T); } //~ ERROR E0044
+extern {
+    fn sqrt<T>(f: T) -> T;
+    //~^ ERROR foreign items may not have type parameters [E0044]
+    //~| HELP use specialization instead of type parameters by replacing them with concrete types
+}
 
 fn main() {
 }
diff --git a/src/test/ui/error-codes/E0044.stderr b/src/test/ui/error-codes/E0044.stderr
index b823f3717b3..12324e771d3 100644
--- a/src/test/ui/error-codes/E0044.stderr
+++ b/src/test/ui/error-codes/E0044.stderr
@@ -1,14 +1,10 @@
 error[E0044]: foreign items may not have type parameters
-  --> $DIR/E0044.rs:11:10
+  --> $DIR/E0044.rs:12:5
    |
-LL | extern { fn some_func<T>(x: T); } //~ ERROR E0044
-   |          ^^^^^^^^^^^^^^^^^^^^^^
+LL |     fn sqrt<T>(f: T) -> T;
+   |     ^^^^^^^^^^^^^^^^^^^^^^
    |
-help: consider using specialization instead of type parameters
-  --> $DIR/E0044.rs:11:10
-   |
-LL | extern { fn some_func<T>(x: T); } //~ ERROR E0044
-   |          ^^^^^^^^^^^^^^^^^^^^^^
+   = help: use specialization instead of type parameters by replacing them with concrete types like `u32`
 
 error: aborting due to previous error