We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d9f815 commit a9eacf3Copy full SHA for a9eacf3
src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs
@@ -0,0 +1,24 @@
1
+// check-pass
2
+// edition:2018
3
+#![feature(min_const_generics)]
4
+trait ValidTrait {}
5
+
6
+/// This has docs
7
+pub fn extern_fn<const N: usize>() -> impl Iterator<Item = [u8; N]> {
8
+ loop {}
9
+}
10
11
+pub trait Trait<const N: usize> {}
12
+impl Trait<1> for u8 {}
13
+impl Trait<2> for u8 {}
14
+impl<const N: usize> Trait<N> for [u8; N] {}
15
16
+/// This also has docs
17
+pub fn test<const N: usize>() -> impl Trait<N> where u8: Trait<N> {
18
19
20
21
+/// Document all the functions
22
+pub async fn a_sink<const N: usize>(v: [u8; N]) -> impl Trait<N> {
23
24
0 commit comments