From ed0f0377e2620ed3c70a42890ca420c1472eb788 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 8 Sep 2022 16:08:53 -0700 Subject: [PATCH 1/7] Fix ICE report flags display. --- compiler/rustc_driver/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index a193d5db6916a..d6f51d7eee1af 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1119,22 +1119,25 @@ fn extra_compiler_flags() -> Option<(Vec, bool)> { while let Some(arg) = args.next() { if let Some(a) = ICE_REPORT_COMPILER_FLAGS.iter().find(|a| arg.starts_with(*a)) { let content = if arg.len() == a.len() { + // A space-separated option, like `-C incremental=foo` or `--crate-type rlib` match args.next() { Some(arg) => arg.to_string(), None => continue, } } else if arg.get(a.len()..a.len() + 1) == Some("=") { + // An equals option, like `--crate-type=rlib` arg[a.len() + 1..].to_string() } else { + // A non-space option, like `-Cincremental=foo` arg[a.len()..].to_string() }; - if ICE_REPORT_COMPILER_FLAGS_EXCLUDE.iter().any(|exc| content.starts_with(exc)) { + let option = content.split_once('=').map(|s| s.0).unwrap_or(&content); + if ICE_REPORT_COMPILER_FLAGS_EXCLUDE.iter().any(|exc| option == *exc) { excluded_cargo_defaults = true; } else { result.push(a.to_string()); - match ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE.iter().find(|s| content.starts_with(*s)) - { - Some(s) => result.push(s.to_string()), + match ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE.iter().find(|s| option == **s) { + Some(s) => result.push(format!("{}=[REDACTED]", s)), None => result.push(content), } } From 76aefbeddb4db78400e0cba87ef783b7444cbdc8 Mon Sep 17 00:00:00 2001 From: Tim Neumann Date: Fri, 9 Sep 2022 16:15:08 +0000 Subject: [PATCH 2/7] relax msan error-pattern due to LLVM changes --- src/test/ui/sanitize/memory-eager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/sanitize/memory-eager.rs b/src/test/ui/sanitize/memory-eager.rs index 8a0590bf16c52..cc0593ec07dcd 100644 --- a/src/test/ui/sanitize/memory-eager.rs +++ b/src/test/ui/sanitize/memory-eager.rs @@ -10,7 +10,7 @@ // run-fail // error-pattern: MemorySanitizer: use-of-uninitialized-value // error-pattern: Uninitialized value was created by an allocation -// error-pattern: in the stack frame of function 'random' +// error-pattern: in the stack frame // // This test case intentionally limits the usage of the std, // since it will be linked with an uninstrumented version of it. From b273c7502e363baeec293b972f671070e80f1391 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 9 Sep 2022 10:09:01 -0700 Subject: [PATCH 3/7] rustdoc: remove unused CSS `#search { position: relative }` This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c. To keep the layout looking the same, the links need to not have `width: 100%` any more, relying instead on the box naturally growing to fit because it has `display: block`. --- src/librustdoc/html/static/css/rustdoc.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 22217a3901246..3904568ef9884 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -596,10 +596,6 @@ h2.location a { margin: 0; } -#search { - position: relative; -} - .search-loading { text-align: center; } @@ -977,7 +973,6 @@ so that we can apply CSS-filters to change the arrow color in themes */ .search-results > a { display: block; - width: 100%; /* A little margin ensures the browser's outlining of focused links has room to display. */ margin-left: 2px; margin-right: 2px; From 0698ffbdb590d76cdeec0a1f06331fe82ff9aada Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 9 Sep 2022 11:48:43 -0700 Subject: [PATCH 4/7] rustdoc: update test cases Width changed by 2/4 pixels by b273c7502e363baeec293b972f671070e80f1391 --- src/test/rustdoc-gui/search-result-display.goml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml index db4907924faf3..54482005fa601 100644 --- a/src/test/rustdoc-gui/search-result-display.goml +++ b/src/test/rustdoc-gui/search-result-display.goml @@ -7,11 +7,11 @@ press-key: 'Enter' wait-for: "#crate-search" // The width is returned by "getComputedStyle" which returns the exact number instead of the // CSS rule which is "50%"... -assert-css: (".search-results div.desc", {"width": "295px"}) +assert-css: (".search-results div.desc", {"width": "293px"}) size: (600, 100) // As counter-intuitive as it may seem, in this width, the width is "100%", which is why // when computed it's larger. -assert-css: (".search-results div.desc", {"width": "570px"}) +assert-css: (".search-results div.desc", {"width": "566px"}) // Check that the crate filter `