Skip to content

Commit

Permalink
Auto merge of rust-lang#79306 - GuillaumeGomez:rollup-4cnudfj, r=Guil…
Browse files Browse the repository at this point in the history
…laumeGomez

Rollup of 4 pull requests

Successful merges:

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

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Nov 22, 2020
2 parents 828461b + 749fe40 commit 52e3cf1
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_(
Expand Down
10 changes: 8 additions & 2 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/incremental/change_add_field/struct_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/incremental/issue-49595/issue-49595.rs
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
21 changes: 21 additions & 0 deletions src/test/ui/issues/issue-73899.rs
Original file line number Diff line number Diff line change
@@ -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([()]);
}

0 comments on commit 52e3cf1

Please sign in to comment.