about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-06 22:38:39 +0100
committerGitHub <noreply@github.com>2020-02-06 22:38:39 +0100
commit7ef5b8951f9c4e2da8e8a918cd05d1784cbf895b (patch)
tree87251dcf146a39eb1bf7936a6b46453827a17170
parent0e294cf39548a9e3f5d73fbec2f3dde91a6253f9 (diff)
parent64450ac765366759af9f0e2769e578e87474cfca (diff)
downloadrust-7ef5b8951f9c4e2da8e8a918cd05d1784cbf895b.tar.gz
rust-7ef5b8951f9c4e2da8e8a918cd05d1784cbf895b.zip
Rollup merge of #68894 - JohnTitor:update-e0565, r=Dylan-DPC
Update E0565 examples

Fixes #68892

r? @GuillaumeGomez
-rw-r--r--src/librustc_error_codes/error_codes/E0565.md14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/librustc_error_codes/error_codes/E0565.md b/src/librustc_error_codes/error_codes/E0565.md
index 1faedf45932..d5bba941c1d 100644
--- a/src/librustc_error_codes/error_codes/E0565.md
+++ b/src/librustc_error_codes/error_codes/E0565.md
@@ -2,9 +2,11 @@ A literal was used in a built-in attribute that doesn't support literals.
 
 Erroneous code example:
 
-```ignore (compile_fail not working here; see Issue #43707)
-#[inline("always")] // error: unsupported literal
-pub fn something() {}
+```compile_fail,E0565
+#[repr("C")] // error: meta item in `repr` must be an identifier
+struct Repr {}
+
+fn main() {}
 ```
 
 Literals in attributes are new and largely unsupported in built-in attributes.
@@ -12,6 +14,8 @@ Work to support literals where appropriate is ongoing. Try using an unquoted
 name instead:
 
 ```
-#[inline(always)]
-pub fn something() {}
+#[repr(C)] // ok!
+struct Repr {}
+
+fn main() {}
 ```