about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-10-26 21:46:13 +0000
committerbors <bors@rust-lang.org>2018-10-26 21:46:13 +0000
commitfa45602b71c59c6315fdb07e925dec61f5827ad9 (patch)
tree5f4e8068e3e90fed1a3718e693d7fcab2a25a1cc /src/test/ui/error-codes
parent3e6f30ec3e6bda159063fcd126dcb14725fef92d (diff)
parent81a609bd4c7a8244e1cedaf9d34824b241deadbb (diff)
downloadrust-fa45602b71c59c6315fdb07e925dec61f5827ad9.tar.gz
rust-fa45602b71c59c6315fdb07e925dec61f5827ad9.zip
Auto merge of #54929 - csmoe:cfg_lint, r=petrochenkov
Suggest to remove prefix `b` in cfg attribute lint string

Closes #54926
r? @estebank
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0565-1.stderr2
-rw-r--r--src/test/ui/error-codes/E0565-2.rs15
-rw-r--r--src/test/ui/error-codes/E0565-2.stderr9
-rw-r--r--src/test/ui/error-codes/E0565.stderr2
4 files changed, 26 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0565-1.stderr b/src/test/ui/error-codes/E0565-1.stderr
index 2a9bf92e9dd..a2e099acd3c 100644
--- a/src/test/ui/error-codes/E0565-1.stderr
+++ b/src/test/ui/error-codes/E0565-1.stderr
@@ -1,4 +1,4 @@
-error[E0565]: unsupported literal
+error[E0565]: item in `deprecated` must be a key/value pair
   --> $DIR/E0565-1.rs:12:14
    |
 LL | #[deprecated("since")] //~ ERROR E0565
diff --git a/src/test/ui/error-codes/E0565-2.rs b/src/test/ui/error-codes/E0565-2.rs
new file mode 100644
index 00000000000..eb13e432751
--- /dev/null
+++ b/src/test/ui/error-codes/E0565-2.rs
@@ -0,0 +1,15 @@
+// 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.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// repr currently doesn't support literals
+#[deprecated(since = b"1.29", note = "hi")] //~ ERROR E0565
+struct A {  }
+
+fn main() {  }
diff --git a/src/test/ui/error-codes/E0565-2.stderr b/src/test/ui/error-codes/E0565-2.stderr
new file mode 100644
index 00000000000..68093e4e2f0
--- /dev/null
+++ b/src/test/ui/error-codes/E0565-2.stderr
@@ -0,0 +1,9 @@
+error[E0565]: literal in `deprecated` value must be a string
+  --> $DIR/E0565-2.rs:12:22
+   |
+LL | #[deprecated(since = b"1.29", note = "hi")] //~ ERROR E0565
+   |                      ^^^^^^^ help: consider removing the prefix: `"1.29"`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0565`.
diff --git a/src/test/ui/error-codes/E0565.stderr b/src/test/ui/error-codes/E0565.stderr
index abea4290f0a..04edff8ec69 100644
--- a/src/test/ui/error-codes/E0565.stderr
+++ b/src/test/ui/error-codes/E0565.stderr
@@ -1,4 +1,4 @@
-error[E0565]: unsupported literal
+error[E0565]: meta item in `repr` must be an identifier
   --> $DIR/E0565.rs:12:8
    |
 LL | #[repr("C")] //~ ERROR E0565