We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dyn
1 parent ce8ab08 commit a144fd6Copy full SHA for a144fd6
tests/ui/attributes/fn-align-dyn.rs
@@ -0,0 +1,15 @@
1
+//@ run-pass
2
+#![feature(fn_align)]
3
+
4
+trait Test {
5
+ #[align(4096)]
6
+ fn foo(&self);
7
8
9
+ fn foo1(&self);
10
+}
11
12
+fn main() {
13
+ assert_eq!((<dyn Test>::foo as fn(_) as usize & !1) % 4096, 0);
14
+ assert_eq!((<dyn Test>::foo1 as fn(_) as usize & !1) % 4096, 0);
15
0 commit comments