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.
1 parent aeca4d6 commit ca722b9Copy full SHA for ca722b9
src/test/ui/impl-trait/issue-56445.rs
@@ -0,0 +1,26 @@
1
+// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-629426939
2
+// check-pass
3
+
4
+#![crate_type = "lib"]
5
6
+use std::marker::PhantomData;
7
8
+pub struct S<'a>
9
+{
10
+ pub m1: PhantomData<&'a u8>,
11
+ pub m2: [u8; S::size()],
12
+}
13
14
+impl<'a> S<'a>
15
16
+ pub const fn size() -> usize { 1 }
17
18
+ pub fn new() -> Self
19
+ {
20
+ Self
21
22
+ m1: PhantomData,
23
+ m2: [0; Self::size()],
24
+ }
25
26
0 commit comments