]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/const-generics/add-impl.rs
Rollup merge of #100487 - tmiasko:assert-safe, r=petrochenkov
[rust.git] / src / test / rustdoc / const-generics / add-impl.rs
1 #![crate_name = "foo"]
2
3 use std::ops::Add;
4
5 // @has foo/struct.Simd.html '//pre[@class="rust struct"]' 'pub struct Simd<T, const WIDTH: usize>'
6 pub struct Simd<T, const WIDTH: usize> {
7     inner: T,
8 }
9
10 // @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header in-band"]' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
11 impl Add for Simd<u8, 16> {
12     type Output = Self;
13
14     fn add(self, rhs: Self) -> Self::Output {
15         Self { inner: 0 }
16     }
17 }