We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0c09846 + 0398aa8 commit 50b6e7dCopy full SHA for 50b6e7d
src/test/rustdoc/generic_const_exprs.rs
@@ -0,0 +1,24 @@
1
+// Regression test for <https://github.com/rust-lang/rust/issues/92859>.
2
+
3
+#![allow(incomplete_features)]
4
+#![feature(generic_const_exprs)]
5
6
+#![crate_name = "foo"]
7
8
+// @has 'foo/trait.Foo.html'
9
10
+pub trait Foo: Sized {
11
+ const WIDTH: usize;
12
13
+ fn arrayify(self) -> [Self; Self::WIDTH];
14
+}
15
16
+impl<T: Sized> Foo for T {
17
+ const WIDTH: usize = 1;
18
19
+ // @has - '//*[@id="tymethod.arrayify"]/*[@class="code-header"]' \
20
+ // 'fn arrayify(self) -> [Self; Self::WIDTH]'
21
+ fn arrayify(self) -> [Self; Self::WIDTH] {
22
+ [self]
23
+ }
24
0 commit comments