From d10d3892256648d70472630416b9592d6a232662 Mon Sep 17 00:00:00 2001 From: Wilco Kusee Date: Sat, 23 Dec 2017 11:16:03 +0100 Subject: Testcase for const-eval array lengths --- src/test/rustdoc/auxiliary/issue-46727.rs | 17 +++++++++++++++++ src/test/rustdoc/issue-46727.rs | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/test/rustdoc/auxiliary/issue-46727.rs create mode 100644 src/test/rustdoc/issue-46727.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/auxiliary/issue-46727.rs b/src/test/rustdoc/auxiliary/issue-46727.rs new file mode 100644 index 00000000000..f0869f016e6 --- /dev/null +++ b/src/test/rustdoc/auxiliary/issue-46727.rs @@ -0,0 +1,17 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: -Cmetadata=aux + +pub trait Foo {} + +pub struct Bar { x: T } + +impl Foo for Bar<[T; 1 + 1 + 1]> {} diff --git a/src/test/rustdoc/issue-46727.rs b/src/test/rustdoc/issue-46727.rs new file mode 100644 index 00000000000..5b202d8c4fe --- /dev/null +++ b/src/test/rustdoc/issue-46727.rs @@ -0,0 +1,17 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:issue-46727.rs + +extern crate issue_46727; + +// @has issue_46727/trait.Foo.html +// @has - '//code' 'impl Foo for Bar<[T; 3]>' +pub use issue_46727::{Foo, Bar}; -- cgit 1.4.1-3-g733a5