Skip to content

Commit

Permalink
Add a regression test for unevaluated const in rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 28, 2019
1 parent 7f9dc73 commit 9c9b7b4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/rustdoc/const-generics/add-impl.rs
Original file line number Diff line number Diff line change
@@ -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 }
}
}

0 comments on commit 9c9b7b4

Please sign in to comment.