From 3090b0151c896dd47dedcbd26f1223a534f55f17 Mon Sep 17 00:00:00 2001 From: Tor Hovland Date: Thu, 22 Apr 2021 22:33:54 +0200 Subject: Use flex more consistently. --- src/librustdoc/html/static/rustdoc.css | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 213ca9ec9e3..cf934efbb15 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -117,9 +117,12 @@ h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) { } h1.fqn { display: flex; - width: 100%; border-bottom: 1px dashed; margin-top: 0; + + /* workaround to keep flex from breaking below 700 px width due to the float: right on the nav + above the h1 */ + padding-left: 1px; } h1.fqn > .in-band > a:hover { text-decoration: underline; @@ -453,20 +456,14 @@ nav.sub { } .content .out-of-band { - float: right; + flex-grow: 0; + text-align: right; font-size: 23px; margin: 0px; - padding: 0px; + padding: 0 0 0 12px; font-weight: normal; } -h1.fqn > .out-of-band { - float: unset; - flex: 1; - text-align: right; - margin-left: 8px; -} - h3.impl > .out-of-band { font-size: 21px; } @@ -486,6 +483,7 @@ h4 > code, h3 > code, .invisible > code { } .content .in-band { + flex-grow: 1; margin: 0px; padding: 0px; } @@ -1483,10 +1481,6 @@ h4 > .notable-traits { display: none !important; } - h1.fqn { - overflow: initial; - } - .theme-picker { left: 10px; top: 54px; -- cgit 1.4.1-3-g733a5 From 31ae3b2bdb9376b749fc1d64b531e86806e03c73 Mon Sep 17 00:00:00 2001 From: Jack Huey Date: Wed, 28 Apr 2021 10:18:52 -0400 Subject: Add HAS_RE_LATE_BOUND if there are bound vars --- compiler/rustc_middle/src/ty/flags.rs | 4 ++++ src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs | 14 ++++++++++++++ src/test/ui/lifetimes/issue-84604.rs | 9 +++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs create mode 100644 src/test/ui/lifetimes/issue-84604.rs (limited to 'src') diff --git a/compiler/rustc_middle/src/ty/flags.rs b/compiler/rustc_middle/src/ty/flags.rs index 01bc5cc761c..92288c89827 100644 --- a/compiler/rustc_middle/src/ty/flags.rs +++ b/compiler/rustc_middle/src/ty/flags.rs @@ -59,6 +59,10 @@ impl FlagComputation { { let mut computation = FlagComputation::new(); + if !value.bound_vars().is_empty() { + computation.flags = computation.flags | TypeFlags::HAS_RE_LATE_BOUND; + } + f(&mut computation, value.skip_binder()); self.add_flags(computation.flags); diff --git a/src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs b/src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs new file mode 100644 index 00000000000..c496a3556c8 --- /dev/null +++ b/src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs @@ -0,0 +1,14 @@ +// build-pass +// compile-flags: --edition 2018 +// compile-flags: --crate-type rlib + +use std::future::Future; + +async fn handle(slf: &F) +where + F: Fn(&()) -> Box Future + Unpin>, +{ + (slf)(&()).await; +} + +fn main() {} diff --git a/src/test/ui/lifetimes/issue-84604.rs b/src/test/ui/lifetimes/issue-84604.rs new file mode 100644 index 00000000000..df8368da0a0 --- /dev/null +++ b/src/test/ui/lifetimes/issue-84604.rs @@ -0,0 +1,9 @@ +// run-pass +// compile-flags: -Zsymbol-mangling-version=v0 + +pub fn f() {} +pub trait Frob {} +fn main() { + f::>(); + f:: Frob>(); +} -- cgit 1.4.1-3-g733a5 From 8c0469552e879f6319f8f96db660bab9eae1de5c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 29 Apr 2021 10:40:10 +0200 Subject: Remove unnecessary CSS rules for search results --- src/librustdoc/html/static/rustdoc.css | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src') diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index a024fa49b0e..3eda2bea7fe 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -385,13 +385,6 @@ nav.sub { position: relative; } -#results { - position: absolute; - right: 0; - left: 0; - overflow: auto; -} - #results > table { width: 100%; table-layout: fixed; -- cgit 1.4.1-3-g733a5 From a20831e7a6617953e8e9d3f94140a558feb1e8ce Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 29 Apr 2021 11:26:35 +0200 Subject: Remove unneeded bottom margin on search results --- src/librustdoc/html/static/rustdoc.css | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index a024fa49b0e..62ea0935360 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -395,7 +395,6 @@ nav.sub { #results > table { width: 100%; table-layout: fixed; - margin-bottom: 40px; } .content pre.line-numbers { -- cgit 1.4.1-3-g733a5