diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2016-07-25 18:19:11 +0100 |
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2016-07-25 18:53:31 +0100 |
| commit | 5c0ce872fbbdb9364c970869a1ad7be486c29b37 (patch) | |
| tree | 079cce9161cf7721460a56419c7fe64dba63bb34 /src/test/rustdoc | |
| parent | ad264f7f39b6113fb87a489d72d31abbc03ab148 (diff) | |
| download | rust-5c0ce872fbbdb9364c970869a1ad7be486c29b37.tar.gz rust-5c0ce872fbbdb9364c970869a1ad7be486c29b37.zip | |
rustdoc: Fix tuple struct where clause rendering
For tuple structs the where clause comes after the definition.
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/issue-34928.rs | 16 | ||||
| -rw-r--r-- | src/test/rustdoc/where.rs | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/test/rustdoc/issue-34928.rs b/src/test/rustdoc/issue-34928.rs new file mode 100644 index 00000000000..b2104a0c80f --- /dev/null +++ b/src/test/rustdoc/issue-34928.rs @@ -0,0 +1,16 @@ +// Copyright 2016 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_name = "foo"] + +pub trait Bar {} + +// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;' +pub struct Foo<T>(pub T) where T: Bar; diff --git a/src/test/rustdoc/where.rs b/src/test/rustdoc/where.rs index 91ec69d9a3c..d8dc115abf9 100644 --- a/src/test/rustdoc/where.rs +++ b/src/test/rustdoc/where.rs @@ -12,7 +12,7 @@ pub trait MyTrait { fn dummy(&self) { } } -// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A> where A: MyTrait" +// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(_) where A: MyTrait" pub struct Alpha<A>(A) where A: MyTrait; // @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B> where B: MyTrait" pub trait Bravo<B> where B: MyTrait { fn get(&self, B: B); } |
