]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/const-generics/add-impl.rs
ed45d339728bc3863fd3975fc227f885e2af3d81
[rust.git] / src / test / rustdoc / const-generics / add-impl.rs
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 }