about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-03-15 02:44:23 +0100
committerGitHub <noreply@github.com>2020-03-15 02:44:23 +0100
commit838884e022ff571108d166f4637281eafabad3e1 (patch)
tree5d63fe83cbdf0ea858d2ef9942a384e5d7089cfd /src/librustc_error_codes/error_codes
parent191a7965b17c602d7e219767c6355dcdd1790918 (diff)
parent1c88052fa0dd0aae4f01f60ea9c42699952698ba (diff)
downloadrust-838884e022ff571108d166f4637281eafabad3e1.tar.gz
rust-838884e022ff571108d166f4637281eafabad3e1.zip
Rollup merge of #69993 - ayushmishra2005:doc/61137-add-long-error-code-e0693, r=Dylan-DPC
Add long error explanation for E0693

Add long explanation for the E0693 error code
Part of #61137

r? @GuillaumeGomez
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0693.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0693.md b/src/librustc_error_codes/error_codes/E0693.md
new file mode 100644
index 00000000000..43e9d17979e
--- /dev/null
+++ b/src/librustc_error_codes/error_codes/E0693.md
@@ -0,0 +1,19 @@
+`align` representation hint was incorrectly declared.
+
+Erroneous code examples:
+
+```compile_fail,E0693
+#[repr(align=8)] // error!
+struct Align8(i8);
+
+#[repr(align="8")] // error!
+struct Align8(i8);
+```
+
+This is a syntax error at the level of attribute declarations. The proper
+syntax for `align` representation hint is the following:
+
+```
+#[repr(align(8))] // ok!
+struct Align8(i8);
+```