From 347d503333a12087f3bf885e4de13f70abdc4018 Mon Sep 17 00:00:00 2001 From: jackh726 Date: Mon, 18 Oct 2021 10:46:59 -0400 Subject: [PATCH 1/7] Add a couple tests for normalize under binder issues --- .../normalize-under-binder/issue-56556.rs | 13 +++++++++++++ .../normalize-under-binder/issue-76956.rs | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-56556.rs create mode 100644 src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-76956.rs diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-56556.rs b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-56556.rs new file mode 100644 index 0000000000000..768d1c36619da --- /dev/null +++ b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-56556.rs @@ -0,0 +1,13 @@ +// check-pass + +fn foo(t: T) -> usize +where + for<'a> &'a T: IntoIterator, + for<'a> <&'a T as IntoIterator>::IntoIter: ExactSizeIterator, +{ + t.into_iter().len() +} + +fn main() { + foo::>(vec![]); +} diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-76956.rs b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-76956.rs new file mode 100644 index 0000000000000..583470080a2fc --- /dev/null +++ b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-76956.rs @@ -0,0 +1,15 @@ +// check-pass + +use std::ops::Deref; + +struct Data { + boxed: Box<&'static i32> +} + +impl Data { + fn use_data(&self, user: impl for <'a> FnOnce( as Deref>::Target)) { + user(*self.boxed) + } +} + +fn main() {} From 14007eca0a3e6cbf040158c6af124c0063deb007 Mon Sep 17 00:00:00 2001 From: SparrowLii Date: Wed, 20 Oct 2021 10:19:23 +0800 Subject: [PATCH 2/7] enable `i8mm` target feature on aarch64 --- compiler/rustc_codegen_ssa/src/target_features.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 8d7e9612f4749..109bd15f12f89 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -90,7 +90,7 @@ const AARCH64_ALLOWED_FEATURES: &[(&str, Option)] = &[ // FEAT_FRINTTS ("frintts", Some(sym::aarch64_target_feature)), // FEAT_I8MM - // ("i8mm", Some(sym::aarch64_target_feature)), + ("i8mm", Some(sym::aarch64_target_feature)), // FEAT_F32MM // ("f32mm", Some(sym::aarch64_target_feature)), // FEAT_F64MM From b88fcc1ea3d9637bd3c1d6860d15718b0f21f92a Mon Sep 17 00:00:00 2001 From: SparrowLii Date: Mon, 25 Oct 2021 15:10:14 +0800 Subject: [PATCH 3/7] enable `i8mm` on arm --- compiler/rustc_codegen_ssa/src/target_features.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 109bd15f12f89..dbffb266be88c 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -19,6 +19,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option)] = &[ ("crypto", Some(sym::arm_target_feature)), ("aes", Some(sym::arm_target_feature)), ("sha2", Some(sym::arm_target_feature)), + ("i8mm", Some(sym::arm_target_feature)), ("v5te", Some(sym::arm_target_feature)), ("v6", Some(sym::arm_target_feature)), ("v6k", Some(sym::arm_target_feature)), From 345519baa7669a49bc4b79882ac97d4e358b42b1 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 24 Oct 2021 15:28:58 +0200 Subject: [PATCH 4/7] Fix scrollbars appearing on information tooltip on mac when they shouldn't --- src/librustdoc/html/static/css/rustdoc.css | 2 +- src/test/rustdoc-gui/overflow-tooltip-information.goml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/test/rustdoc-gui/overflow-tooltip-information.goml diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 6c908a21c39ad..4e4dd21120f73 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -532,7 +532,7 @@ nav.sub { position: relative; } -.docblock > * { +.docblock > :not(.information) { max-width: 100%; overflow-x: auto; } diff --git a/src/test/rustdoc-gui/overflow-tooltip-information.goml b/src/test/rustdoc-gui/overflow-tooltip-information.goml new file mode 100644 index 0000000000000..7ef85a4c44565 --- /dev/null +++ b/src/test/rustdoc-gui/overflow-tooltip-information.goml @@ -0,0 +1,8 @@ +// The goal of this test is to ensure that the tooltip `.information` class doesn't +// have overflow and max-width CSS rules set because they create a bug in firefox on +// mac. For more information: https://github.com/rust-lang/rust/issues/89185 +goto: file://|DOC_PATH|/test_docs/fn.foo.html +assert-css: (".docblock > .information", { + "overflow-x": "visible", + "max-width": "none" +}, ALL) From 32a3edb153f46d2864db0a5e6894a2e2ab8e3d52 Mon Sep 17 00:00:00 2001 From: Tommaso Fontana Date: Mon, 25 Oct 2021 13:51:34 +0200 Subject: [PATCH 5/7] Changed slice.swap documentation for better readability using "b" and "d" can be easily confused --- library/core/src/slice/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index aaa00653b99c2..92b1e1d75c660 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -553,9 +553,9 @@ impl [T] { /// # Examples /// /// ``` - /// let mut v = ["a", "b", "c", "d"]; - /// v.swap(1, 3); - /// assert!(v == ["a", "d", "c", "b"]); + /// let mut v = ["a", "b", "c", "d", "e]; + /// v.swap(2, 4); + /// assert!(v == ["a", "b", "e", "d", "c"]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[inline] From 9b28ab40acd55b5d26b6fcdae75873ea321f696d Mon Sep 17 00:00:00 2001 From: Tommaso Fontana Date: Mon, 25 Oct 2021 14:13:54 +0200 Subject: [PATCH 6/7] Fixed missing double quote in the patch (slice.swap) --- library/core/src/slice/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 92b1e1d75c660..a6370a4513bb5 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -553,7 +553,7 @@ impl [T] { /// # Examples /// /// ``` - /// let mut v = ["a", "b", "c", "d", "e]; + /// let mut v = ["a", "b", "c", "d", "e"]; /// v.swap(2, 4); /// assert!(v == ["a", "b", "e", "d", "c"]); /// ``` From 00bca4e957b80658493e746245cd0c894b527a29 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Mon, 25 Oct 2021 09:38:04 -0400 Subject: [PATCH 7/7] Move back to linux builder on try builds --- .github/workflows/ci.yml | 13 +++---------- src/ci/github-actions/ci.yml | 14 +++----------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 580120b25a251..407db519d51dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -532,16 +532,9 @@ jobs: strategy: matrix: include: - - name: dist-x86_64-apple - env: - SCRIPT: "./x.py dist --exclude src/doc --exclude extended && ./x.py dist --target=x86_64-apple-darwin src/doc && ./x.py dist extended" - RUST_CONFIGURE_ARGS: "--host=x86_64-apple-darwin --target=x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false" - RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 - MACOSX_DEPLOYMENT_TARGET: 10.7 - NO_LLVM_ASSERTIONS: 1 - NO_DEBUG_ASSERTIONS: 1 - DIST_REQUIRE_ALL_TOOLS: 1 - os: macos-latest + - name: dist-x86_64-linux + os: ubuntu-latest-xl + env: {} timeout-minutes: 600 runs-on: "${{ matrix.os }}" steps: diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 76ee324302e09..fbb3042d0d6ad 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -672,17 +672,9 @@ jobs: strategy: matrix: include: - - name: dist-x86_64-apple - env: - SCRIPT: ./x.py dist --exclude src/doc --exclude extended && ./x.py dist --target=x86_64-apple-darwin src/doc && ./x.py dist extended - RUST_CONFIGURE_ARGS: --host=x86_64-apple-darwin --target=x86_64-apple-darwin,aarch64-apple-ios,x86_64-apple-ios,aarch64-apple-ios-sim --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set llvm.ninja=false - RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 - MACOSX_DEPLOYMENT_TARGET: 10.7 - NO_LLVM_ASSERTIONS: 1 - NO_DEBUG_ASSERTIONS: 1 - DIST_REQUIRE_ALL_TOOLS: 1 - <<: *job-macos-xl - + - &dist-x86_64-linux + name: dist-x86_64-linux + <<: *job-linux-xl master: name: master