about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-06 04:35:26 +0000
committerbors <bors@rust-lang.org>2021-04-06 04:35:26 +0000
commita6e7a5aa5dc842ddb64607040aefb6ec33e22b59 (patch)
tree5e5cecc462513a6cd3798a8b5b030084dca4d0df /src/test/ui/error-codes
parent0c7d4effd71f826abb9651419c316b9b57b8ac97 (diff)
parent448d07683a6defd567996114793a09c9a8aef5df (diff)
downloadrust-a6e7a5aa5dc842ddb64607040aefb6ec33e22b59.tar.gz
rust-a6e7a5aa5dc842ddb64607040aefb6ec33e22b59.zip
Auto merge of #81234 - repnop:fn-alignment, r=lcnr
Allow specifying alignment for functions

Fixes #75072

This allows the user to specify alignment for functions, which can be useful for low level work where functions need to necessarily be aligned to a specific value.

I believe the error cases not covered in the match are caught earlier based on my testing so I had them just return `None`.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0565.rs5
-rw-r--r--src/test/ui/error-codes/E0565.stderr8
2 files changed, 3 insertions, 10 deletions
diff --git a/src/test/ui/error-codes/E0565.rs b/src/test/ui/error-codes/E0565.rs
index 3bf42867610..df76f6b13af 100644
--- a/src/test/ui/error-codes/E0565.rs
+++ b/src/test/ui/error-codes/E0565.rs
@@ -1,6 +1,5 @@
 // repr currently doesn't support literals
 #[repr("C")] //~ ERROR E0565
-             //~| ERROR E0565
-struct A {  }
+struct A {}
 
-fn main() {  }
+fn main() {}
diff --git a/src/test/ui/error-codes/E0565.stderr b/src/test/ui/error-codes/E0565.stderr
index aa0951528e1..6ed90c0ae4f 100644
--- a/src/test/ui/error-codes/E0565.stderr
+++ b/src/test/ui/error-codes/E0565.stderr
@@ -4,12 +4,6 @@ error[E0565]: meta item in `repr` must be an identifier
 LL | #[repr("C")]
    |        ^^^
 
-error[E0565]: meta item in `repr` must be an identifier
-  --> $DIR/E0565.rs:2:8
-   |
-LL | #[repr("C")]
-   |        ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0565`.