diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-ui/coverage/enums.stdout | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/toggle-item-contents.rs | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/tuple-struct-fields-doc.rs | 36 | ||||
| -rw-r--r-- | src/test/ui-fulldeps/plugin-args.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/bastion-of-the-turbofish.rs | 16 | ||||
| -rw-r--r-- | src/test/ui/malformed/malformed-plugin-3.stderr | 1 |
6 files changed, 52 insertions, 10 deletions
diff --git a/src/test/rustdoc-ui/coverage/enums.stdout b/src/test/rustdoc-ui/coverage/enums.stdout index 64c012c1f66..414d60c86d3 100644 --- a/src/test/rustdoc-ui/coverage/enums.stdout +++ b/src/test/rustdoc-ui/coverage/enums.stdout @@ -1,7 +1,7 @@ +-------------------------------------+------------+------------+------------+------------+ | File | Documented | Percentage | Examples | Percentage | +-------------------------------------+------------+------------+------------+------------+ -| ...est/rustdoc-ui/coverage/enums.rs | 6 | 75.0% | 0 | 0.0% | +| ...est/rustdoc-ui/coverage/enums.rs | 6 | 66.7% | 0 | 0.0% | +-------------------------------------+------------+------------+------------+------------+ -| Total | 6 | 75.0% | 0 | 0.0% | +| Total | 6 | 66.7% | 0 | 0.0% | +-------------------------------------+------------+------------+------------+------------+ diff --git a/src/test/rustdoc/toggle-item-contents.rs b/src/test/rustdoc/toggle-item-contents.rs index 8d2046591d0..ae871e79d7f 100644 --- a/src/test/rustdoc/toggle-item-contents.rs +++ b/src/test/rustdoc/toggle-item-contents.rs @@ -81,8 +81,8 @@ pub enum EnumStructVariant { } // @has 'toggle_item_contents/enum.LargeEnum.html' -// @count - '//details[@class="rustdoc-toggle type-contents-toggle"]' 1 -// @has - '//details[@class="rustdoc-toggle type-contents-toggle"]' 'Show 13 variants' +// @count - '//*[@class="rust enum"]//details[@class="rustdoc-toggle type-contents-toggle"]' 1 +// @has - '//*[@class="rust enum"]//details[@class="rustdoc-toggle type-contents-toggle"]' 'Show 13 variants' pub enum LargeEnum { A, B, C, D, E, F(u8), G, H, I, J, K, L, M } diff --git a/src/test/rustdoc/tuple-struct-fields-doc.rs b/src/test/rustdoc/tuple-struct-fields-doc.rs new file mode 100644 index 00000000000..f3d8e39ea2d --- /dev/null +++ b/src/test/rustdoc/tuple-struct-fields-doc.rs @@ -0,0 +1,36 @@ +#![crate_name = "foo"] + +// @has foo/struct.Foo.html +// @has - '//h2[@id="fields"]' 'Tuple Fields' +// @has - '//h3[@class="sidebar-title"]/a[@href="#fields"]' 'Tuple Fields' +// @has - '//*[@id="structfield.0"]' '0: u32' +// @has - '//*[@id="main"]/div[@class="docblock"]' 'hello' +// @!has - '//*[@id="structfield.1"]' +// @has - '//*[@id="structfield.2"]' '2: char' +// @has - '//*[@id="structfield.3"]' '3: i8' +// @has - '//*[@id="main"]/div[@class="docblock"]' 'not hello' +pub struct Foo( + /// hello + pub u32, + char, + pub char, + /// not hello + pub i8, +); + +// @has foo/enum.Bar.html +// @has - '//pre[@class="rust enum"]' 'BarVariant(String),' +// @matches - '//*[@id="variant.BarVariant.fields"]/h3' '^Tuple Fields of BarVariant$' +// @has - '//*[@id="variant.BarVariant.field.0"]' '0: String' +// @has - '//*[@id="variant.BarVariant.fields"]//*[@class="docblock"]' 'Hello docs' +// @matches - '//*[@id="variant.FooVariant.fields"]/h3' '^Fields of FooVariant$' +pub enum Bar { + BarVariant( + /// Hello docs + String + ), + FooVariant { + /// hello + x: u32, + }, +} diff --git a/src/test/ui-fulldeps/plugin-args.stderr b/src/test/ui-fulldeps/plugin-args.stderr index 2e255f185e2..177f33005c8 100644 --- a/src/test/ui-fulldeps/plugin-args.stderr +++ b/src/test/ui-fulldeps/plugin-args.stderr @@ -14,3 +14,4 @@ LL | #![plugin(empty_plugin(args))] error: aborting due to previous error; 1 warning emitted +For more information about this error, try `rustc --explain E0498`. diff --git a/src/test/ui/bastion-of-the-turbofish.rs b/src/test/ui/bastion-of-the-turbofish.rs index 233ddbbe117..e12857008a5 100644 --- a/src/test/ui/bastion-of-the-turbofish.rs +++ b/src/test/ui/bastion-of-the-turbofish.rs @@ -20,13 +20,17 @@ // in permitting generic arguments to be provided without the consent of the // Great Turbofish. Should you be so naïve as to try to revolt against its // mighty clutches, here shall its wrath be indomitably displayed. This -// program must pass for all eternity, fundamentally at odds with an impetuous -// rebellion against the Turbofish. +// program must pass for all eternity: forever watched by the guardian angel +// which gave this beast its name, and stands fundamentally at odds with the +// impetuous rebellion against the Turbofish. // // My heart aches in sorrow, for I know I am defeated. Let this be a warning -// to all those who come after. Here stands the bastion of the Turbofish. +// to all those who come after: for they too must overcome the impassible +// hurdle of defeating the great beast, championed by a resolute winged +// guardian. // -// RIP Anna Harren, Guardian Angel of the Hallowed Turbofish. <3 +// Here stands the Bastion of the Turbofish, a memorial to Anna Harren, +// Guardian Angel of these Hallowed Grounds. <3 // See https://github.com/rust-lang/rust/pull/53562 // and https://github.com/rust-lang/rfcs/pull/2527 @@ -34,6 +38,6 @@ // for context. fn main() { - let (oh, woe, is, me) = ("the", "Turbofish", "remains", "undefeated"); - let _: (bool, bool) = (oh<woe, is>(me)); + let (the, guardian, stands, resolute) = ("the", "Turbofish", "remains", "undefeated"); + let _: (bool, bool) = (the<guardian, stands>(resolute)); } diff --git a/src/test/ui/malformed/malformed-plugin-3.stderr b/src/test/ui/malformed/malformed-plugin-3.stderr index 11abdb16e0b..64cb429ea74 100644 --- a/src/test/ui/malformed/malformed-plugin-3.stderr +++ b/src/test/ui/malformed/malformed-plugin-3.stderr @@ -14,3 +14,4 @@ LL | #![plugin(foo="bleh")] error: aborting due to previous error; 1 warning emitted +For more information about this error, try `rustc --explain E0498`. |
