Skip to content

Rollup of 4 pull requests #79306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 22, 2020
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([()]);
}