Skip to content

Commit 9c9b7b4

Browse files
committed
Add a regression test for unevaluated const in rustdoc
1 parent 7f9dc73 commit 9c9b7b4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// ignore-tidy-linelength
2+
3+
#![feature(const_generics)]
4+
5+
#![crate_name = "foo"]
6+
7+
use std::ops::Add;
8+
9+
// @has foo/struct.Simd.html '//pre[@class="rust struct"]' 'pub struct Simd<T, const WIDTH: usize>'
10+
pub struct Simd<T, const WIDTH: usize> {
11+
inner: T,
12+
}
13+
14+
// @has foo/struct.Simd.html '//div[@id="implementations-list"]/h3/code' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
15+
impl Add for Simd<u8, 16> {
16+
type Output = Self;
17+
18+
fn add(self, rhs: Self) -> Self::Output {
19+
Self { inner: 0 }
20+
}
21+
}

0 commit comments

Comments
 (0)