From 875194099c6071c1d8fa763a7ac9077998b20d1d Mon Sep 17 00:00:00 2001 From: Andrew Pollack Date: Mon, 12 Sep 2022 22:38:49 +0000 Subject: [PATCH 01/11] Adding ignore-fuchsia arg to non-applicable compiler ui tests --- src/test/ui/env-funky-keys.rs | 1 + src/test/ui/process/core-run-destroy.rs | 1 + src/test/ui/process/process-envs.rs | 1 + src/test/ui/process/process-remove-from-env.rs | 1 + src/test/ui/process/process-sigpipe.rs | 1 + src/test/ui/wait-forked-but-failed-child.rs | 1 + 6 files changed, 6 insertions(+) diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs index 4548d333947..46e20d8c61f 100644 --- a/src/test/ui/env-funky-keys.rs +++ b/src/test/ui/env-funky-keys.rs @@ -6,6 +6,7 @@ // ignore-emscripten no execve // ignore-sgx no execve // ignore-vxworks no execve +// ignore-fuchsia no 'execve' // no-prefer-dynamic #![feature(rustc_private)] diff --git a/src/test/ui/process/core-run-destroy.rs b/src/test/ui/process/core-run-destroy.rs index 5fd418e6c86..d0e97bf01f3 100644 --- a/src/test/ui/process/core-run-destroy.rs +++ b/src/test/ui/process/core-run-destroy.rs @@ -8,6 +8,7 @@ // ignore-emscripten no processes // ignore-sgx no processes // ignore-vxworks no 'cat' and 'sleep' +// ignore-fuchsia no 'cat' // N.B., these tests kill child processes. Valgrind sees these children as leaking // memory, which makes for some *confusing* logs. That's why these are here diff --git a/src/test/ui/process/process-envs.rs b/src/test/ui/process/process-envs.rs index 8fc99b23fd2..f3a46979142 100644 --- a/src/test/ui/process/process-envs.rs +++ b/src/test/ui/process/process-envs.rs @@ -2,6 +2,7 @@ // ignore-emscripten no processes // ignore-sgx no processes // ignore-vxworks no 'env' +// ignore-fuchsia no 'env' use std::process::Command; use std::env; diff --git a/src/test/ui/process/process-remove-from-env.rs b/src/test/ui/process/process-remove-from-env.rs index af4e49dfdbb..ad027d68588 100644 --- a/src/test/ui/process/process-remove-from-env.rs +++ b/src/test/ui/process/process-remove-from-env.rs @@ -2,6 +2,7 @@ // ignore-emscripten no processes // ignore-sgx no processes // ignore-vxworks no 'env' +// ignore-fuchsia no 'env' use std::process::Command; use std::env; diff --git a/src/test/ui/process/process-sigpipe.rs b/src/test/ui/process/process-sigpipe.rs index ecf5e93c99e..107eba45dc2 100644 --- a/src/test/ui/process/process-sigpipe.rs +++ b/src/test/ui/process/process-sigpipe.rs @@ -14,6 +14,7 @@ // ignore-emscripten no threads support // ignore-vxworks no 'sh' +// ignore-fuchsia no 'sh' use std::process; use std::thread; diff --git a/src/test/ui/wait-forked-but-failed-child.rs b/src/test/ui/wait-forked-but-failed-child.rs index 0eb0fe071f5..674c26a43f2 100644 --- a/src/test/ui/wait-forked-but-failed-child.rs +++ b/src/test/ui/wait-forked-but-failed-child.rs @@ -2,6 +2,7 @@ // ignore-emscripten no processes // ignore-sgx no processes // ignore-vxworks no 'ps' +// ignore-fuchsia no 'ps' #![feature(rustc_private)] From 9025ab7a1f5d8ce136fcc41d82c0b6be8b8adaf7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 11 Aug 2022 18:02:10 +0100 Subject: [PATCH 02/11] Add BE8 support --- .../src/spec/armeb_linux_gnueabi.rs | 19 +++++++++++++++++++ compiler/rustc_target/src/spec/mod.rs | 1 + 2 files changed, 20 insertions(+) create mode 100644 compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs diff --git a/compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs new file mode 100644 index 00000000000..4836f3cf720 --- /dev/null +++ b/compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs @@ -0,0 +1,19 @@ +use crate::abi::Endian; +use crate::spec::{Target, TargetOptions}; + +pub fn target() -> Target { + Target { + llvm_target: "armeb-unknown-linux-gnueabi".into(), + pointer_width: 32, + data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), + arch: "arm".into(), + options: TargetOptions { + abi: "eabi".into(), + features: "+strict-align,+v8,+crc".into(), + endian: Endian::Big, + max_atomic_width: Some(64), + mcount: "\u{1}__gnu_mcount_nc".into(), + ..super::linux_gnu_base::opts() + }, + } +} diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 47eb5fc6a1d..42ba059972b 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -932,6 +932,7 @@ supported_targets! { ("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu), ("arm-unknown-linux-gnueabi", arm_unknown_linux_gnueabi), ("arm-unknown-linux-gnueabihf", arm_unknown_linux_gnueabihf), + ("armeb-linux-gnueabi", armeb_linux_gnueabi), ("arm-unknown-linux-musleabi", arm_unknown_linux_musleabi), ("arm-unknown-linux-musleabihf", arm_unknown_linux_musleabihf), ("armv4t-unknown-linux-gnueabi", armv4t_unknown_linux_gnueabi), From d56e02e99aa35005243fc8c78c542f4c0559156a Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Sep 2022 20:07:48 +0100 Subject: [PATCH 03/11] Added platform docs --- src/doc/rustc/src/platform-support.md | 1 + .../platform-support/armeb-linux-gnueabi.md | 74 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index fe090a73327..83f554b507a 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -223,6 +223,7 @@ target | std | host | notes `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI) `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian) [`arm64_32-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | ARM Apple WatchOS 64-bit with 32-bit pointers +[`armeb-linux-gnueabi`](platform-support/armeb-linux-gnueabi.md) | ✓ | ? | ARM BE8 the default ARM big-endian architecture since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). `armv4t-none-eabi` | * | | ARMv4T A32 `armv4t-unknown-linux-gnueabi` | ? | | `armv5te-unknown-linux-uclibceabi` | ? | | ARMv5TE Linux with uClibc diff --git a/src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md b/src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md new file mode 100644 index 00000000000..e9576fad953 --- /dev/null +++ b/src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md @@ -0,0 +1,74 @@ +# armeb-linux-gnueabi +**Tier: 3** + +Target for cross-compiling Linux user-mode applications targetting the ARM BE8 architecture. + +## Overview +BE8 architecture retains the same little-endian ordered code-stream used by conventional little endian ARM systems, however the data accesses are in big-endian. BE8 is used primarily in high-performance networking applications where the ability to read packets in their native "Network Byte Order" is important (many network protocols transmit data in big-endian byte order for their wire formats). + +## History +BE8 architecture is the default big-endian architecture for ARM since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). It's predecessor, used for ARMv4 and ARMv5 devices was [BE32](https://developer.arm.com/documentation/dui0474/j/linker-command-line-options/--be32). On ARMv6 architecture, endianness can be configured via [system registers](https://developer.arm.com/documentation/ddi0290/g/unaligned-and-mixed-endian-data-access-support/mixed-endian-access-support/interaction-between-the-bus-protocol-and-the-core-endianness). However, BE32 was withdrawn for [ARMv7](https://developer.arm.com/documentation/ddi0406/cb/Appendixes/Deprecated-and-Obsolete-Features/Obsolete-features/Support-for-BE-32-endianness-model) onwards. + +## Target Maintainers +* [@WorksButNotTested](https://github.com/WorksButNotTested) + +## Requirements +The target is cross-compiled. This target supports `std` in the normal way (indeed only nominal changes are required from the standard ARM configuration). + +## Target definition +The target definition can be seen [here](../../../../../compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs). In particular, it should be noted that the `features` specify that this target is built for the ARMv8 core. Though this can likely be modified as required. + +## Building the target +Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target. + +Therefore, you can build Rust with support for the target by adding it to the target list in config.toml, a sample configuration is shown below. It is expected that the user already have a working GNU compiler toolchain and update the paths accordingly. + +```toml +[llvm] +download-ci-llvm = false +skip-rebuild = true +optimize = true +ninja = true +targets = "ARM;X86" +clang = false + +[build] +target = ["x86_64-unknown-linux-gnu", "armeb-linux-gnueabi"] +docs = false +docs-minification = false +compiler-docs = false +[install] +prefix = "/home/user/x-tools/rust/" + +[rust] +debug-logging=true +backtrace = true +incremental = true + +[target.x86_64-unknown-linux-gnu] + +[dist] + +[target.armeb-linux-gnueabi] +cc = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc" +cxx = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-g++" +ar = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ar" +ranlib = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ranlib" +linker = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc" +llvm-config = "/home/user/x-tools/clang/bin/llvm-config" +llvm-filecheck = "/home/user/x-tools/clang/bin/FileCheck" +``` + +## Building Rust programs + +The following `.cargo/config` is needed inside any project directory to build for the BE8 target: + +```toml +[build] +target = "armeb-linux-gnueabi" + +[target.armeb-linux-gnueabi] +linker = "armeb-linux-gnueabi-gcc" +``` + +Note that it is expected that the user has a suitable linker from the GNU toolchain. From 11a52dc61afda5ea82cff3e783e24f2302bdce3f Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 13 Sep 2022 14:22:38 -0700 Subject: [PATCH 04/11] rustdoc: clean up DOM by removing `.dockblock-short p` On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103. --- src/librustdoc/html/markdown.rs | 6 ++++- src/librustdoc/html/static/css/rustdoc.css | 6 +---- .../rustdoc-gui/label-next-to-symbol.goml | 18 +++----------- src/test/rustdoc/short-docblock.rs | 10 ++++---- src/test/rustdoc/trait-impl.rs | 24 +++++++++---------- 5 files changed, 26 insertions(+), 38 deletions(-) diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index ec2e129c364..43d07d4a533 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1119,7 +1119,11 @@ impl MarkdownSummaryLine<'_> { let mut s = String::new(); - html::push_html(&mut s, LinkReplacer::new(SummaryLine::new(p), links)); + let without_paragraphs = LinkReplacer::new(SummaryLine::new(p), links).filter(|event| { + !matches!(event, Event::Start(Tag::Paragraph) | Event::End(Tag::Paragraph)) + }); + + html::push_html(&mut s, without_paragraphs); s } diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 011c559b34b..14f27eb6fa8 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -609,16 +609,12 @@ h2.location a { .docblock-short { overflow-wrap: break-word; overflow-wrap: anywhere; -} -.docblock-short p { - display: inline; overflow: hidden; text-overflow: ellipsis; - margin: 0; } /* Wrap non-pre code blocks (`text`) but not (```text```). */ .docblock > :not(pre) > code, -.docblock-short > :not(pre) > code { +.docblock-short > code { white-space: pre-wrap; } diff --git a/src/test/rustdoc-gui/label-next-to-symbol.goml b/src/test/rustdoc-gui/label-next-to-symbol.goml index f9081189a86..4b4cea2621f 100644 --- a/src/test/rustdoc-gui/label-next-to-symbol.goml +++ b/src/test/rustdoc-gui/label-next-to-symbol.goml @@ -31,15 +31,9 @@ compare-elements-position: ( ) // Ensure no wrap -compare-elements-position-near: ( - "//*[@class='item-left module-item']//a[text()='replaced_function']", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", - {"y": 2}, -) -// compare parent elements compare-elements-position: ( "//*[@class='item-left module-item']//a[text()='replaced_function']/..", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..", + "//*[@class='item-right docblock-short'][text()='a thing with a label']", ("y"), ) @@ -60,19 +54,13 @@ compare-elements-position: ( ) // Ensure wrap -compare-elements-position-near-false: ( - "//*[@class='item-left module-item']//a[text()='replaced_function']", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", - {"y": 12}, -) -// compare parent elements compare-elements-position-false: ( "//*[@class='item-left module-item']//a[text()='replaced_function']/..", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']/..", + "//*[@class='item-right docblock-short'][text()='a thing with a label']", ("y"), ) compare-elements-position-false: ( ".item-left .stab.deprecated", - "//*[@class='item-right docblock-short']//p[text()='a thing with a label']", + "//*[@class='item-right docblock-short'][text()='a thing with a label']", ("y"), ) diff --git a/src/test/rustdoc/short-docblock.rs b/src/test/rustdoc/short-docblock.rs index 17c44eab091..1a8a689be1d 100644 --- a/src/test/rustdoc/short-docblock.rs +++ b/src/test/rustdoc/short-docblock.rs @@ -1,7 +1,7 @@ #![crate_name = "foo"] -// @has foo/index.html '//*[@class="item-right docblock-short"]/p' 'fooo' -// @!has foo/index.html '//*[@class="item-right docblock-short"]/p/h1' 'fooo' +// @has foo/index.html '//*[@class="item-right docblock-short"]' 'fooo' +// @!has foo/index.html '//*[@class="item-right docblock-short"]/h1' 'fooo' // @has foo/fn.foo.html '//h2[@id="fooo"]/a[@href="#fooo"]' 'fooo' /// # fooo @@ -9,8 +9,8 @@ /// foo pub fn foo() {} -// @has foo/index.html '//*[@class="item-right docblock-short"]/p' 'mooood' -// @!has foo/index.html '//*[@class="item-right docblock-short"]/p/h2' 'mooood' +// @has foo/index.html '//*[@class="item-right docblock-short"]' 'mooood' +// @!has foo/index.html '//*[@class="item-right docblock-short"]/h2' 'mooood' // @has foo/foo/index.html '//h3[@id="mooood"]/a[@href="#mooood"]' 'mooood' /// ## mooood @@ -18,7 +18,7 @@ pub fn foo() {} /// foo mod pub mod foo {} -// @has foo/index.html '//*[@class="item-right docblock-short"]/p/a[@href=\ +// @has foo/index.html '//*[@class="item-right docblock-short"]/a[@href=\ // "https://nougat.world"]/code' 'nougat' /// [`nougat`](https://nougat.world) diff --git a/src/test/rustdoc/trait-impl.rs b/src/test/rustdoc/trait-impl.rs index 4d5173f6024..195cdf009b9 100644 --- a/src/test/rustdoc/trait-impl.rs +++ b/src/test/rustdoc/trait-impl.rs @@ -21,26 +21,26 @@ pub trait Trait { pub struct Struct; impl Trait for Struct { - // @has trait_impl/struct.Struct.html '//*[@id="method.a"]/../../div[@class="docblock"]/p' 'Some long docs' - // @!has - '//*[@id="method.a"]/../../div[@class="docblock"]/p' 'link will be added' - // @has - '//*[@id="method.a"]/../../div[@class="docblock"]/p/a' 'Read more' - // @has - '//*[@id="method.a"]/../../div[@class="docblock"]/p/a/@href' 'trait.Trait.html#tymethod.a' + // @has trait_impl/struct.Struct.html '//*[@id="method.a"]/../../div[@class="docblock"]' 'Some long docs' + // @!has - '//*[@id="method.a"]/../../div[@class="docblock"]' 'link will be added' + // @has - '//*[@id="method.a"]/../../div[@class="docblock"]/a' 'Read more' + // @has - '//*[@id="method.a"]/../../div[@class="docblock"]/a/@href' 'trait.Trait.html#tymethod.a' fn a() {} - // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p' 'These docs contain' - // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a' 'reference link' - // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a/@href' 'https://example.com' - // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a' 'Read more' - // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a/@href' 'trait.Trait.html#tymethod.b' + // @has - '//*[@id="method.b"]/../../div[@class="docblock"]' 'These docs contain' + // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a' 'reference link' + // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a/@href' 'https://example.com' + // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a' 'Read more' + // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a/@href' 'trait.Trait.html#tymethod.b' fn b() {} - // @!has - '//*[@id="method.c"]/../../div[@class="docblock"]/p' 'code block' + // @!has - '//*[@id="method.c"]/../../div[@class="docblock"]' 'code block' // @has - '//*[@id="method.c"]/../../div[@class="docblock"]/a' 'Read more' // @has - '//*[@id="method.c"]/../../div[@class="docblock"]/a/@href' 'trait.Trait.html#tymethod.c' fn c() {} - // @has - '//*[@id="method.d"]/../../div[@class="docblock"]/p' 'Escaped formatting a*b*c* works' - // @!has - '//*[@id="method.d"]/../../div[@class="docblock"]/p/em' '' + // @has - '//*[@id="method.d"]/../../div[@class="docblock"]' 'Escaped formatting a*b*c* works' + // @!has - '//*[@id="method.d"]/../../div[@class="docblock"]/em' '' fn d() {} // @has - '//*[@id="impl-Trait-for-Struct"]/h3//a/@href' 'trait.Trait.html' From 31d53489bca824087a641dddc34e2e1ba06e20c4 Mon Sep 17 00:00:00 2001 From: yukang Date: Wed, 14 Sep 2022 14:44:42 +0800 Subject: [PATCH 05/11] tidy will not check coding style in bootstrap/target --- src/tools/tidy/src/walk.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/tidy/src/walk.rs b/src/tools/tidy/src/walk.rs index 6dca55dfa9f..b07e80767fa 100644 --- a/src/tools/tidy/src/walk.rs +++ b/src/tools/tidy/src/walk.rs @@ -23,6 +23,7 @@ pub fn filter_dirs(path: &Path) -> bool { "src/doc/book", // Filter RLS output directories "target/rls", + "src/bootstrap/target", ]; skip.iter().any(|p| path.ends_with(p)) } From f4ff6860dcefbe59fac837f7208a83b5f83b2820 Mon Sep 17 00:00:00 2001 From: raldone01 Date: Wed, 14 Sep 2022 18:31:53 +0200 Subject: [PATCH 06/11] Constify `PartialEq` for Ordering. --- library/core/src/cmp.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index 8a30bb67450..d9f2d3d64d6 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -23,6 +23,7 @@ #![stable(feature = "rust1", since = "1.0.0")] use crate::marker::Destruct; +use crate::marker::StructuralPartialEq; use self::Ordering::*; @@ -338,7 +339,7 @@ pub struct AssertParamIsEq { /// let result = 2.cmp(&1); /// assert_eq!(Ordering::Greater, result); /// ``` -#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)] +#[derive(Clone, Copy, Eq, Debug, Hash)] #[stable(feature = "rust1", since = "1.0.0")] #[repr(i8)] pub enum Ordering { @@ -884,6 +885,18 @@ pub macro Ord($item:item) { /* compiler built-in */ } +#[stable(feature = "rust1", since = "1.0.0")] +impl StructuralPartialEq for Ordering {} + +#[stable(feature = "rust1", since = "1.0.0")] +#[rustc_const_unstable(feature = "const_cmp", issue = "92391")] +impl const PartialEq for Ordering { + #[inline] + fn eq(&self, other: &Self) -> bool { + (*self as i32).eq(&(*other as i32)) + } +} + #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_cmp", issue = "92391")] impl const Ord for Ordering { From 44d9b8d07014d976c88f541dbe0af37e64e37bdd Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 14 Sep 2022 09:45:05 -0700 Subject: [PATCH 07/11] rustdoc: clean up CSS `#titles` using flexbox This commit allows it to stop manually specifying pixel heights for the tabs on search result pages. There's less messing with manual breakpoints and less complex CSS selectors. --- src/librustdoc/html/static/css/rustdoc.css | 29 +++++----------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 600e7cf3a0b..3f3c86e9598 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1378,27 +1378,19 @@ pre.rust { } #titles { - height: 35px; + display: flex; + flex-direction: row; + gap: 1px; + margin-bottom: 4px; } #titles > button { - float: left; - width: 33.3%; text-align: center; font-size: 1.125rem; cursor: pointer; border: 0; border-top: 2px solid; -} - -#titles > button:first-child:last-child { - margin-right: 1px; - width: calc(100% - 1px); -} - -#titles > button:not(:last-child) { - margin-right: 1px; - width: calc(33.3% - 1px); + flex: 1; } #titles > button > div.count { @@ -1895,12 +1887,7 @@ in storage.js plus the media query with (min-width: 701px) } #titles > button > div.count { - float: left; - width: 100%; - } - - #titles { - height: 50px; + display: block; } /* Because of ios, we need to actually have a full height sidebar title so the @@ -2031,10 +2018,6 @@ in storage.js plus the media query with (min-width: 701px) } @media (max-width: 464px) { - #titles, #titles > button { - height: 73px; - } - #crate-search { border-radius: 4px; } From 73d6dd50982ed9712f28c4cf9d5d1648c7c767df Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 14 Sep 2022 18:38:01 +0100 Subject: [PATCH 08/11] Changes to rename target and update docs --- ...eabi.rs => armeb_unknown_linux_gnueabi.rs} | 0 compiler/rustc_target/src/spec/mod.rs | 2 +- src/doc/rustc/src/SUMMARY.md | 1 + src/doc/rustc/src/platform-support.md | 2 +- ...eabi.md => armeb-unknown-linux-gnueabi.md} | 24 +++++++++---------- 5 files changed, 15 insertions(+), 14 deletions(-) rename compiler/rustc_target/src/spec/{armeb_linux_gnueabi.rs => armeb_unknown_linux_gnueabi.rs} (100%) rename src/doc/rustc/src/platform-support/{armeb-linux-gnueabi.md => armeb-unknown-linux-gnueabi.md} (72%) diff --git a/compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs similarity index 100% rename from compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs rename to compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 42ba059972b..7e7f7a82e90 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -932,7 +932,7 @@ supported_targets! { ("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu), ("arm-unknown-linux-gnueabi", arm_unknown_linux_gnueabi), ("arm-unknown-linux-gnueabihf", arm_unknown_linux_gnueabihf), - ("armeb-linux-gnueabi", armeb_linux_gnueabi), + ("armeb-unknown-linux-gnueabi", armeb_unknown_linux_gnueabi), ("arm-unknown-linux-musleabi", arm_unknown_linux_musleabi), ("arm-unknown-linux-musleabihf", arm_unknown_linux_musleabihf), ("armv4t-unknown-linux-gnueabi", armv4t_unknown_linux_gnueabi), diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index 4e6bc41daa7..d9d430c2046 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -18,6 +18,7 @@ - [aarch64-apple-ios-sim](platform-support/aarch64-apple-ios-sim.md) - [\*-apple-watchos\*](platform-support/apple-watchos.md) - [aarch64-nintendo-switch-freestanding](platform-support/aarch64-nintendo-switch-freestanding.md) + - [armeb-unknown-linux-gnueabi](platform-support/armeb-unknown-linux-gnueabi.md) - [armv4t-none-eabi](platform-support/armv4t-none-eabi.md) - [armv6k-nintendo-3ds](platform-support/armv6k-nintendo-3ds.md) - [armv7-unknown-linux-uclibceabi](platform-support/armv7-unknown-linux-uclibceabi.md) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 83f554b507a..3a6963ebc87 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -223,7 +223,7 @@ target | std | host | notes `aarch64_be-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (big-endian, ILP32 ABI) `aarch64_be-unknown-linux-gnu` | ✓ | ✓ | ARM64 Linux (big-endian) [`arm64_32-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | ARM Apple WatchOS 64-bit with 32-bit pointers -[`armeb-linux-gnueabi`](platform-support/armeb-linux-gnueabi.md) | ✓ | ? | ARM BE8 the default ARM big-endian architecture since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). +[`armeb-unknown-linux-gnueabi`](platform-support/armeb-unknown-linux-gnueabi.md) | ✓ | ? | ARM BE8 the default ARM big-endian architecture since [ARMv6](https://developer.arm.com/documentation/101754/0616/armlink-Reference/armlink-Command-line-Options/--be8?lang=en). `armv4t-none-eabi` | * | | ARMv4T A32 `armv4t-unknown-linux-gnueabi` | ? | | `armv5te-unknown-linux-uclibceabi` | ? | | ARMv5TE Linux with uClibc diff --git a/src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md b/src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md similarity index 72% rename from src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md rename to src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md index e9576fad953..507631cdc54 100644 --- a/src/doc/rustc/src/platform-support/armeb-linux-gnueabi.md +++ b/src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md @@ -1,4 +1,4 @@ -# armeb-linux-gnueabi +# armeb-unknown-linux-gnueabi **Tier: 3** Target for cross-compiling Linux user-mode applications targetting the ARM BE8 architecture. @@ -16,7 +16,7 @@ BE8 architecture is the default big-endian architecture for ARM since [ARMv6](ht The target is cross-compiled. This target supports `std` in the normal way (indeed only nominal changes are required from the standard ARM configuration). ## Target definition -The target definition can be seen [here](../../../../../compiler/rustc_target/src/spec/armeb_linux_gnueabi.rs). In particular, it should be noted that the `features` specify that this target is built for the ARMv8 core. Though this can likely be modified as required. +The target definition can be seen [here](https://github.com/rust-lang/rust/tree/master/compiler/rustc_target/src/spec/armeb_unknown_linux_gnueabi.rs). In particular, it should be noted that the `features` specify that this target is built for the ARMv8 core. Though this can likely be modified as required. ## Building the target Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target. @@ -33,7 +33,7 @@ targets = "ARM;X86" clang = false [build] -target = ["x86_64-unknown-linux-gnu", "armeb-linux-gnueabi"] +target = ["x86_64-unknown-linux-gnu", "armeb-unknown-linux-gnueabi"] docs = false docs-minification = false compiler-docs = false @@ -49,12 +49,12 @@ incremental = true [dist] -[target.armeb-linux-gnueabi] -cc = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc" -cxx = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-g++" -ar = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ar" -ranlib = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ranlib" -linker = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc" +[target.armeb-unknown-linux-gnueabi] +cc = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-gcc" +cxx = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-g++" +ar = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-ar" +ranlib = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-ranlib" +linker = "/home/user/x-tools/armeb-unknown-linux-gnueabi/bin/armeb-unknown-linux-gnueabi-gcc" llvm-config = "/home/user/x-tools/clang/bin/llvm-config" llvm-filecheck = "/home/user/x-tools/clang/bin/FileCheck" ``` @@ -65,10 +65,10 @@ The following `.cargo/config` is needed inside any project directory to build fo ```toml [build] -target = "armeb-linux-gnueabi" +target = "armeb-unknown-linux-gnueabi" -[target.armeb-linux-gnueabi] -linker = "armeb-linux-gnueabi-gcc" +[target.armeb-unknown-linux-gnueabi] +linker = "armeb-unknown-linux-gnueabi-gcc" ``` Note that it is expected that the user has a suitable linker from the GNU toolchain. From 75aa73db308b31547c2dccbea2a21c441ca1cec1 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 14 Sep 2022 13:09:32 -0700 Subject: [PATCH 09/11] rustdoc: remove no-op rule `a { background: transparent }` The background is transparent by default. It was added in 5a01dbe67b43660bf1df96074f34a635aad50e56 to work around a bug in the JavaScript syntax highlighting engine that rustdoc used at the time. --- src/librustdoc/html/static/css/rustdoc.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 600e7cf3a0b..41018ec34c5 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -766,7 +766,6 @@ nav.sub form { display: inline; } a { text-decoration: none; - background: transparent; } .small-section-header { From bcef48373874a880fde9cb8f11af92fd5fea252d Mon Sep 17 00:00:00 2001 From: Nixon Enraght-Moony Date: Wed, 14 Sep 2022 22:19:43 +0100 Subject: [PATCH 10/11] Add test for #101743 --- src/test/rustdoc/issue-101743-bold-tag.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/rustdoc/issue-101743-bold-tag.rs diff --git a/src/test/rustdoc/issue-101743-bold-tag.rs b/src/test/rustdoc/issue-101743-bold-tag.rs new file mode 100644 index 00000000000..631181fec66 --- /dev/null +++ b/src/test/rustdoc/issue-101743-bold-tag.rs @@ -0,0 +1,19 @@ +// Regression test for https://github.com/rust-lang/rust/issues/101743 + +#![crate_name="foo"] + +pub type Word = usize; +pub struct Repr([i32; B]); +pub struct IBig(usize); + +pub const fn base_as_ibig() -> IBig { + IBig(B) +} + +impl Repr { + // If we change back to rendering the value of consts, check this doesn't add + // a tag, but escapes correctly + + // @has foo/struct.Repr.html '//section[@id="associatedconstant.BASE"]/h4' '= _' + pub const BASE: IBig = base_as_ibig::(); +} From 88baf8f6f5c9dc80ab2bc86a110ff0c0e40e83d6 Mon Sep 17 00:00:00 2001 From: Andrew Pollack Date: Thu, 8 Sep 2022 05:14:03 +0000 Subject: [PATCH 11/11] Adding backtrace off option for fuchsia targets --- library/std/src/panic.rs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/library/std/src/panic.rs b/library/std/src/panic.rs index 45bc56efb3b..c4f022de021 100644 --- a/library/std/src/panic.rs +++ b/library/std/src/panic.rs @@ -295,23 +295,22 @@ pub fn get_backtrace_style() -> Option { return Some(style); } - // Setting environment variables for Fuchsia components isn't a standard - // or easily supported workflow. For now, display backtraces by default. - let format = if cfg!(target_os = "fuchsia") { - BacktraceStyle::Full - } else { - crate::env::var_os("RUST_BACKTRACE") - .map(|x| { - if &x == "0" { - BacktraceStyle::Off - } else if &x == "full" { - BacktraceStyle::Full - } else { - BacktraceStyle::Short - } - }) - .unwrap_or(BacktraceStyle::Off) - }; + let format = crate::env::var_os("RUST_BACKTRACE") + .map(|x| { + if &x == "0" { + BacktraceStyle::Off + } else if &x == "full" { + BacktraceStyle::Full + } else { + BacktraceStyle::Short + } + }) + .unwrap_or(if cfg!(target_os = "fuchsia") { + // Fuchsia components default to full backtrace. + BacktraceStyle::Full + } else { + BacktraceStyle::Off + }); set_backtrace_style(format); Some(format) }