about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-22 15:40:03 +0000
committerbors <bors@rust-lang.org>2020-11-22 15:40:03 +0000
commit52e3cf13aa9716f6648b1cad286ccd8d37aa315f (patch)
tree73c2ccb909d6813b4b5edf03bfdd4e5df77423e8
parent828461b4b27c4a955587887936e54057efc5e2c1 (diff)
parent749fe400c85687172aff3ca8e4436b1f32352348 (diff)
downloadrust-52e3cf13aa9716f6648b1cad286ccd8d37aa315f.tar.gz
rust-52e3cf13aa9716f6648b1cad286ccd8d37aa315f.zip
Auto merge of #79306 - GuillaumeGomez:rollup-4cnudfj, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - #78670 (Remove FIXME comment in some incremental test suite)
 - #79292 (Fix typo in doc comment for report_too_many_hashes)
 - #79300 (Prevent feature information to be hidden if it's on the impl directly)
 - #79302 (Add regression test for issue 73899)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
-rw-r--r--compiler/rustc_parse/src/lexer/mod.rs2
-rw-r--r--src/librustdoc/html/static/main.js10
-rw-r--r--src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs2
-rw-r--r--src/test/incremental/change_add_field/struct_point.rs2
-rw-r--r--src/test/incremental/change_private_impl_method/struct_point.rs2
-rw-r--r--src/test/incremental/change_pub_inherent_method_body/struct_point.rs2
-rw-r--r--src/test/incremental/change_pub_inherent_method_sig/struct_point.rs2
-rw-r--r--src/test/incremental/issue-49595/issue-49595.rs2
-rw-r--r--src/test/ui/issues/issue-73899.rs21
9 files changed, 36 insertions, 9 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index 0dfacd78908..b5b34c7338d 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -510,7 +510,7 @@ impl<'a> StringReader<'a> {
         FatalError.raise()
     }
 
-    /// Note: It was decided to not add a test case, because it would be to big.
+    /// Note: It was decided to not add a test case, because it would be too big.
     /// <https://github.com/rust-lang/rust/pull/50296#issuecomment-392135180>
     fn report_too_many_hashes(&self, start: BytePos, found: usize) -> ! {
         self.fatal_span_(
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index b8377dc1569..b11bd667093 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -2332,12 +2332,18 @@ function defocusSearchBar() {
             var dontApplyBlockRule = toggle.parentNode.parentNode.id !== "main";
             if (action === "show") {
                 removeClass(relatedDoc, "fns-now-collapsed");
-                removeClass(docblock, "hidden-by-usual-hider");
+                // Stability information is never hidden.
+                if (hasClass(docblock, "stability") === false) {
+                    removeClass(docblock, "hidden-by-usual-hider");
+                }
                 onEachLazy(toggle.childNodes, adjustToggle(false, dontApplyBlockRule));
                 onEachLazy(relatedDoc.childNodes, implHider(false, dontApplyBlockRule));
             } else if (action === "hide") {
                 addClass(relatedDoc, "fns-now-collapsed");
-                addClass(docblock, "hidden-by-usual-hider");
+                // Stability information should be shown even when detailed info is hidden.
+                if (hasClass(docblock, "stability") === false) {
+                    addClass(docblock, "hidden-by-usual-hider");
+                }
                 onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule));
                 onEachLazy(relatedDoc.childNodes, implHider(true, dontApplyBlockRule));
             }
diff --git a/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs b/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs
index 2af72f0e987..f698f8835a2 100644
--- a/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs
+++ b/src/test/incremental/add_private_fn_at_krate_root_cc/struct_point.rs
@@ -5,7 +5,7 @@
 // revisions:cfail1 cfail2
 // compile-flags: -Z query-dep-graph
 // aux-build:point.rs
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![feature(stmt_expr_attributes)]
diff --git a/src/test/incremental/change_add_field/struct_point.rs b/src/test/incremental/change_add_field/struct_point.rs
index 89699bce209..8d98cfac8a4 100644
--- a/src/test/incremental/change_add_field/struct_point.rs
+++ b/src/test/incremental/change_add_field/struct_point.rs
@@ -5,7 +5,7 @@
 
 // revisions:cfail1 cfail2
 // compile-flags: -Z query-dep-graph
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![feature(stmt_expr_attributes)]
diff --git a/src/test/incremental/change_private_impl_method/struct_point.rs b/src/test/incremental/change_private_impl_method/struct_point.rs
index 5c024ed91a3..11ba96a8c8d 100644
--- a/src/test/incremental/change_private_impl_method/struct_point.rs
+++ b/src/test/incremental/change_private_impl_method/struct_point.rs
@@ -3,7 +3,7 @@
 
 // revisions:cfail1 cfail2
 // compile-flags: -Z query-dep-graph
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![feature(stmt_expr_attributes)]
diff --git a/src/test/incremental/change_pub_inherent_method_body/struct_point.rs b/src/test/incremental/change_pub_inherent_method_body/struct_point.rs
index c944901e345..a192dff19e9 100644
--- a/src/test/incremental/change_pub_inherent_method_body/struct_point.rs
+++ b/src/test/incremental/change_pub_inherent_method_body/struct_point.rs
@@ -2,7 +2,7 @@
 
 // revisions:cfail1 cfail2
 // compile-flags: -Z query-dep-graph
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![crate_type = "rlib"]
 #![feature(rustc_attrs)]
diff --git a/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs b/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs
index 4a5aac682f5..b0476168555 100644
--- a/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs
+++ b/src/test/incremental/change_pub_inherent_method_sig/struct_point.rs
@@ -2,7 +2,7 @@
 
 // revisions:cfail1 cfail2
 // compile-flags: -Z query-dep-graph
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![crate_type = "rlib"]
 #![feature(rustc_attrs)]
diff --git a/src/test/incremental/issue-49595/issue-49595.rs b/src/test/incremental/issue-49595/issue-49595.rs
index ab4d76eef36..7b1096a64c1 100644
--- a/src/test/incremental/issue-49595/issue-49595.rs
+++ b/src/test/incremental/issue-49595/issue-49595.rs
@@ -1,6 +1,6 @@
 // revisions:cfail1 cfail2 cfail3
 // compile-flags: -Z query-dep-graph --test
-// build-pass (FIXME(62277): could be check-pass?)
+// build-pass
 
 #![feature(rustc_attrs)]
 #![crate_type = "rlib"]
diff --git a/src/test/ui/issues/issue-73899.rs b/src/test/ui/issues/issue-73899.rs
new file mode 100644
index 00000000000..2a3a5ab2a3b
--- /dev/null
+++ b/src/test/ui/issues/issue-73899.rs
@@ -0,0 +1,21 @@
+// run-pass
+#![feature(const_evaluatable_checked)]
+#![feature(const_generics)]
+#![allow(incomplete_features)]
+
+trait Foo {}
+
+impl<const N: usize> Foo for [(); N] where Self: FooImpl<{ N == 0 }> {}
+
+trait FooImpl<const IS_ZERO: bool> {}
+
+impl FooImpl<{ 0u8 == 0u8 }> for [(); 0] {}
+
+impl<const N: usize> FooImpl<{ 0u8 != 0u8 }> for [(); N] {}
+
+fn foo<T: Foo>(_v: T) {}
+
+fn main() {
+    foo([]);
+    foo([()]);
+}