Add a regression test for unevaluated const in rustdoc

This commit is contained in:
varkor 2019-05-28 22:53:48 +01:00
parent 7f9dc73a31
commit 9c9b7b4eac

View file

@ -0,0 +1,21 @@
// ignore-tidy-linelength
#![feature(const_generics)]
#![crate_name = "foo"]
use std::ops::Add;
// @has foo/struct.Simd.html '//pre[@class="rust struct"]' 'pub struct Simd<T, const WIDTH: usize>'
pub struct Simd<T, const WIDTH: usize> {
inner: T,
}
// @has foo/struct.Simd.html '//div[@id="implementations-list"]/h3/code' '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 }
}
}