about summary refs log tree commit diff
path: root/src/test/rustdoc/const-generics/const-impl.rs
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2021-11-26 15:03:16 -0800
committerNoah Lev <camelidcamel@gmail.com>2021-11-28 11:49:12 -0800
commitee58c06a12fc74dbc553eb3d63281fd8d8cf4137 (patch)
tree6e93beab281b00c86ba397fc6e2a0344e3c0b16e /src/test/rustdoc/const-generics/const-impl.rs
parent5fcae0a05d8f48e93a3b77bacddea6c6c7f9ea24 (diff)
downloadrust-ee58c06a12fc74dbc553eb3d63281fd8d8cf4137.tar.gz
rust-ee58c06a12fc74dbc553eb3d63281fd8d8cf4137.zip
Fix warnings in rustdoc HTML tests
Now that compiletest denies warnings in these tests, they need fixing!
Diffstat (limited to 'src/test/rustdoc/const-generics/const-impl.rs')
-rw-r--r--src/test/rustdoc/const-generics/const-impl.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/test/rustdoc/const-generics/const-impl.rs b/src/test/rustdoc/const-generics/const-impl.rs
index fed37f6c9a2..cda900773ab 100644
--- a/src/test/rustdoc/const-generics/const-impl.rs
+++ b/src/test/rustdoc/const-generics/const-impl.rs
@@ -1,3 +1,5 @@
+#![allow(incomplete_features)]
+
 #![feature(adt_const_params)]
 
 #![crate_name = "foo"]
@@ -15,15 +17,15 @@ pub struct VSet<T, const ORDER: Order> {
     inner: Vec<T>,
 }
 
-// @has foo/struct.VSet.html '//div[@id="impl"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, {Order::Sorted}>'
-impl <T> VSet<T, {Order::Sorted}> {
+// @has foo/struct.VSet.html '//div[@id="impl"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, { Order::Sorted }>'
+impl<T> VSet<T, { Order::Sorted }> {
     pub fn new() -> Self {
         Self { inner: Vec::new() }
     }
 }
 
-// @has foo/struct.VSet.html '//div[@id="impl-1"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, {Order::Unsorted}>'
-impl <T> VSet<T, {Order::Unsorted}> {
+// @has foo/struct.VSet.html '//div[@id="impl-1"]/h3[@class="code-header in-band"]' 'impl<T> VSet<T, { Order::Unsorted }>'
+impl<T> VSet<T, { Order::Unsorted }> {
     pub fn new() -> Self {
         Self { inner: Vec::new() }
     }
@@ -31,7 +33,7 @@ impl <T> VSet<T, {Order::Unsorted}> {
 
 pub struct Escape<const S: &'static str>;
 
-// @has foo/struct.Escape.html '//div[@id="impl"]/h3[@class="code-header in-band"]' 'impl Escape<{ r#"<script>alert("Escape");</script>"# }>'
-impl Escape<{ r#"<script>alert("Escape");</script>"# }> {
+// @has foo/struct.Escape.html '//div[@id="impl"]/h3[@class="code-header in-band"]' 'impl Escape<r#"<script>alert("Escape");</script>"#>'
+impl Escape<r#"<script>alert("Escape");</script>"#> {
     pub fn f() {}
 }