diff options
| author | bors <bors@rust-lang.org> | 2021-09-22 19:40:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-09-22 19:40:13 +0000 |
| commit | 308dffd25cb55bbb4a1fbee9822cf82c6a5d012d (patch) | |
| tree | 73d3e17944183d82799540460c59c291baba211a /src | |
| parent | cfff31bc833070a00578bd6178160aeed56f28ba (diff) | |
| parent | 26c783811858dca1ac37d7ee113e0bd13891420a (diff) | |
Auto merge of #89179 - the8472:rollup-moxrtaj, r=the8472
Rollup of 8 pull requests
Successful merges:
- #89036 (Fix missing `no_global_oom_handling` cfg-gating)
- #89041 (Work around invalid DWARF bugs for fat LTO)
- #89046 ("Fix" an overflow in byte position math)
- #89127 (Re-enable the `src/test/debuginfo/mutex.rs` test on Windows)
- #89133 (Fix ICE with `--cap-lints=allow` and `-Zfuel=...=0`)
- #89162 (rustc_index: Add some map-like APIs to `IndexVec`)
- #89164 (Document `--show-type-layout` in the rustdoc book)
- #89170 (Disable the leak sanitizer on Macos aarch64 for now)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rustdoc/src/unstable-features.md | 18 | ||||
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 2 | ||||
| -rw-r--r-- | src/test/debuginfo/mutex.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/lint/issue-79546-fuel-ice.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/issue-44406.stderr | 2 | ||||
| -rw-r--r-- | src/tools/compiletest/src/util.rs | 3 |
6 files changed, 34 insertions, 11 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md index b55db452f12..91795997641 100644 --- a/src/doc/rustdoc/src/unstable-features.md +++ b/src/doc/rustdoc/src/unstable-features.md @@ -209,6 +209,22 @@ some consideration for their stability, and names that end in a number). Giving `rustdoc` will disable this sorting and instead make it print the items in the order they appear in the source. +### `--show-type-layout`: add a section to each type's docs describing its memory layout + +Using this flag looks like this: + +```bash +$ rustdoc src/lib.rs -Z unstable-options --show-type-layout +``` + +When this flag is passed, rustdoc will add a "Layout" section at the bottom of +each type's docs page that includes a summary of the type's memory layout as +computed by rustc. For example, rustdoc will show the size in bytes that a value +of that type will take in memory. + +Note that most layout information is **completely unstable** and may even differ +between compilations. + ### `--resource-suffix`: modifying the name of CSS/JavaScript in crate docs Using this flag looks like this: @@ -333,7 +349,7 @@ Some methodology notes about what rustdoc counts in this metric: Public items that are not documented can be seen with the built-in `missing_docs` lint. Private items that are not documented can be seen with Clippy's `missing_docs_in_private_items` lint. -## `-w`/`--output-format`: output format +### `-w`/`--output-format`: output format When using [`--show-coverage`](https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--show-coverage-get-statistics-about-code-documentation-coverage), diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 52505f2d634..3104cb3a3dd 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -1663,7 +1663,7 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) { writeln!( w, "<div class=\"warning\"><p><strong>Note:</strong> Most layout information is \ - completely unstable and may be different between compiler versions and platforms. \ + <strong>completely unstable</strong> and may even differ between compilations. \ The only exception is types with certain <code>repr(...)</code> attributes. \ Please see the Rust Reference’s \ <a href=\"https://doc.rust-lang.org/reference/type-layout.html\">“Type Layout”</a> \ diff --git a/src/test/debuginfo/mutex.rs b/src/test/debuginfo/mutex.rs index 4a529541bae..00dccf5f906 100644 --- a/src/test/debuginfo/mutex.rs +++ b/src/test/debuginfo/mutex.rs @@ -3,8 +3,6 @@ // cdb-only // min-cdb-version: 10.0.21287.1005 // compile-flags:-g -// FIXME: Failed on update to 10.0.22000.1 -// ignore-windows // === CDB TESTS ================================================================================== // @@ -14,17 +12,17 @@ // cdb-check:m,d [Type: std::sync::mutex::Mutex<i32>] // cdb-check: [...] inner [Type: std::sys_common::mutex::MovableMutex] // cdb-check: [...] poison [Type: std::sync::poison::Flag] -// cdb-check: [...] data [Type: core::cell::UnsafeCell<i32>] +// cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell<i32>] // // cdb-command:dx m.data,d -// cdb-check:m.data,d [Type: core::cell::UnsafeCell<i32>] -// cdb-check: [...] value : 0 [Type: int] +// cdb-check:m.data,d : 0 [Type: core::cell::UnsafeCell<i32>] +// cdb-check: [<Raw View>] [Type: core::cell::UnsafeCell<i32>] // // cdb-command:dx lock,d -// cdb-check:lock,d : Ok [Type: enum$<core::result::Result<std::sync::mutex::MutexGuard<i32>, enum$<std::sync::poison::TryLockError<std::sync::mutex::MutexGuard<i32> >, 0, 1, Poisoned> > >] -// cdb-check: [...] variant$ : Ok (0) [Type: core::result::Result] +// cdb-check:lock,d : Ok [Type: enum$<core::result::Result<std::sync::mutex::MutexGuard<i32>,enum$<std::sync::poison::TryLockError<std::sync::mutex::MutexGuard<i32> >, 0, 1, Poisoned> > >] +// cdb-check: [variant] : Ok // cdb-check: [...] __0 [Type: std::sync::mutex::MutexGuard<i32>] use std::sync::Mutex; diff --git a/src/test/ui/lint/issue-79546-fuel-ice.rs b/src/test/ui/lint/issue-79546-fuel-ice.rs new file mode 100644 index 00000000000..0e9f54088b8 --- /dev/null +++ b/src/test/ui/lint/issue-79546-fuel-ice.rs @@ -0,0 +1,8 @@ +// Regression test for the ICE described in #79546. + +// compile-flags: --cap-lints=allow -Zfuel=issue79546=0 +// check-pass +#![crate_name="issue79546"] + +struct S; +fn main() {} diff --git a/src/test/ui/parser/issue-44406.stderr b/src/test/ui/parser/issue-44406.stderr index 862026408ef..a37a806a157 100644 --- a/src/test/ui/parser/issue-44406.stderr +++ b/src/test/ui/parser/issue-44406.stderr @@ -26,7 +26,7 @@ LL | bar { } help: if `bar` is a function, use the arguments directly | LL - bar(baz: $rest) -LL + bar(true); +LL + bar(: $rest) | error: aborting due to 2 previous errors diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs index 75d392951ec..d03c21dc508 100644 --- a/src/tools/compiletest/src/util.rs +++ b/src/tools/compiletest/src/util.rs @@ -96,7 +96,8 @@ pub const ASAN_SUPPORTED_TARGETS: &[&str] = &[ ]; pub const LSAN_SUPPORTED_TARGETS: &[&str] = &[ - "aarch64-apple-darwin", + // FIXME: currently broken, see #88132 + // "aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", |
