summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/const-generics/add-impl.rs
blob: b5226ad3f78bd6e0199ce2a4629b2207e406fbfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![crate_name = "foo"]

use std::ops::Add;

// @has foo/struct.Simd.html '//div[@class="item-decl"]/pre[@class="rust"]' 'pub struct Simd<T, const WIDTH: usize>'
pub struct Simd<T, const WIDTH: usize> {
    inner: T,
}

// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
impl Add for Simd<u8, 16> {
    type Output = Self;

    fn add(self, rhs: Self) -> Self::Output {
        Self { inner: 0 }
    }
}