From 9c9b7b4eaceefe88bafc3b4e3529635973320253 Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 28 May 2019 22:53:48 +0100 Subject: Add a regression test for unevaluated const in rustdoc --- src/test/rustdoc/const-generics/add-impl.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/rustdoc/const-generics/add-impl.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/const-generics/add-impl.rs b/src/test/rustdoc/const-generics/add-impl.rs new file mode 100644 index 00000000000..ed45d339728 --- /dev/null +++ b/src/test/rustdoc/const-generics/add-impl.rs @@ -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' +pub struct Simd { + inner: T, +} + +// @has foo/struct.Simd.html '//div[@id="implementations-list"]/h3/code' 'impl Add> for Simd' +impl Add for Simd { + type Output = Self; + + fn add(self, rhs: Self) -> Self::Output { + Self { inner: 0 } + } +} -- cgit 1.4.1-3-g733a5