Skip to content

Commit 6a6decd

Browse files
author
The rustc-josh-sync Cronjob Bot
committed
Merge ref 'e22c616e4e87' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@e22c616 Filtered ref: rust-lang/stdarch@47c3de5 Upstream diff: rust-lang/rust@e4fdb55...e22c616 This merge was created using https://github.com/rust-lang/josh-sync.
2 parents c83e65c + 592b9fb commit 6a6decd

26 files changed

Lines changed: 492 additions & 244 deletions

.github/workflows/rustc-pull.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
1313
with:
1414
github-app-id: ${{ vars.APP_CLIENT_ID }}
15+
pr-author: "workflows-rustc-dev-guide[bot]"
1516
zulip-stream-id: 196385
1617
zulip-bot-email: "rustc-dev-guide-gha-notif-bot@rust-lang.zulipchat.com"
1718
pr-base-branch: main

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
562dee4820c458d823175268e41601d4c060588a
1+
30d0309fa821f7a0984a9629e0d227ca3c0d2eda

src/SUMMARY.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
- [WASI](notification-groups/wasi.md)
7373
- [WebAssembly](notification-groups/wasm.md)
7474
- [Windows](notification-groups/windows.md)
75+
- [GPU target](notification-groups/gpu-target.md)
7576
- [Licenses](./licenses.md)
7677
- [Editions](guides/editions.md)
7778

@@ -100,9 +101,9 @@
100101
- [Parallel compilation](./parallel-rustc.md)
101102
- [Rustdoc internals](./rustdoc-internals.md)
102103
- [Search](./rustdoc-internals/search.md)
103-
- [The `rustdoc-html` test suite](./rustdoc-internals/rustdoc-html-test-suite.md)
104-
- [The `rustdoc-gui` test suite](./rustdoc-internals/rustdoc-gui-test-suite.md)
105-
- [The `rustdoc-json` test suite](./rustdoc-internals/rustdoc-json-test-suite.md)
104+
- [The `rustdoc-html` test suite](./rustdoc-internals/rustdoc-html-test-suite.md)
105+
- [The `rustdoc-gui` test suite](./rustdoc-internals/rustdoc-gui-test-suite.md)
106+
- [The `rustdoc-json` test suite](./rustdoc-internals/rustdoc-json-test-suite.md)
106107
- [GPU offload internals](./offload/internals.md)
107108
- [Installation](./offload/installation.md)
108109
- [Usage](./offload/usage.md)
@@ -189,6 +190,7 @@
189190
- [Significant changes and quirks](./solve/significant-changes.md)
190191
- [Sharing the trait solver with rust-analyzer](./solve/sharing-crates-with-rust-analyzer.md)
191192
- [`Unsize` and `CoerceUnsized` traits](./traits/unsize.md)
193+
- [Having separate `Trait` and `Projection` bounds](./traits/separate-projection-bounds.md)
192194
- [Variance](./variance.md)
193195
- [Coherence checking](./coherence.md)
194196
- [HIR Type checking](./hir-typeck/summary.md)

src/appendix/code-index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Code Index
22

3-
rustc has a lot of important data structures. This is an attempt to give some
4-
guidance on where to learn more about some of the key data structures of the
5-
compiler.
3+
rustc has a lot of important data structures.
4+
This is an attempt to give some guidance on where to learn more
5+
about some of the key data structures of the compiler.
66

77
Item | Kind | Short description | Chapter | Declaration
88
----------------|----------|-----------------------------|--------------------|-------------------
99
`BodyId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir/src/hir.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.BodyId.html)
1010
`Compiler` | struct | Represents a compiler session and can be used to drive a compilation. | [The Rustc Driver and Interface] | [compiler/rustc_interface/src/interface.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Compiler.html)
1111
`ast::Crate` | struct | A syntax-level representation of a parsed crate | [The parser] | [compiler/rustc_ast/src/ast.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/struct.Crate.html)
12-
`rustc_hir::Crate` | struct | A more abstract, compiler-friendly form of a crate's AST | [The Hir] | [compiler/rustc_hir/src/hir.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Crate.html)
12+
`hir::Crate` | struct | A more abstract, compiler-friendly form of a crate's AST | [The Hir] | [compiler/rustc_middle/src/hir/mod.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/struct.Crate.html)
1313
`DefId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir/src/def_id.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html)
1414
`Diag` | struct | A struct for a compiler diagnostic, such as an error or lint | [Emitting Diagnostics] | [compiler/rustc_errors/src/diagnostic.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.Diag.html)
1515
`DocContext` | struct | A state container used by rustdoc when crawling through a crate to gather its documentation | [Rustdoc] | [src/librustdoc/core.rs](https://github.com/rust-lang/rust/blob/HEAD/src/librustdoc/core.rs)

src/appendix/glossary.md

Lines changed: 48 additions & 24 deletions
Large diffs are not rendered by default.

src/compiler-debugging.md

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -273,18 +273,18 @@ Here are some notable ones:
273273

274274
| Attribute | Description |
275275
|----------------|-------------|
276-
| `rustc_def_path` | Dumps the [`def_path_str`] of an item. |
277276
| `rustc_dump_def_parents` | Dumps the chain of `DefId` parents of certain definitions. |
277+
| `rustc_dump_def_path` | Dumps the [`def_path_str`] of an item. |
278+
| `rustc_dump_hidden_type_of_opaques` | Dumps the [hidden type of each opaque types][opaq] in the crate. |
278279
| `rustc_dump_inferred_outlives` | Dumps implied bounds of an item. More precisely, the [`inferred_outlives_of`] an item. |
279280
| `rustc_dump_item_bounds` | Dumps the [`item_bounds`] of an item. |
281+
| `rustc_dump_layout` | [See this section](#debugging-type-layouts). |
280282
| `rustc_dump_object_lifetime_defaults` | Dumps the [object lifetime defaults] of an item. |
281283
| `rustc_dump_predicates` | Dumps the [`predicates_of`] an item. |
284+
| `rustc_dump_symbol_name` | Dumps the mangled & demangled [`symbol_name`] of an item. |
282285
| `rustc_dump_variances` | Dumps the [variances] of an item. |
283286
| `rustc_dump_vtable` | Dumps the vtable layout of an impl, or a type alias of a dyn type. |
284-
| `rustc_hidden_type_of_opaques` | Dumps the [hidden type of each opaque types][opaq] in the crate. |
285-
| `rustc_layout` | [See this section](#debugging-type-layouts). |
286287
| `rustc_regions` | Dumps NLL closure region requirements. |
287-
| `rustc_symbol_name` | Dumps the mangled & demangled [`symbol_name`] of an item. |
288288

289289
Right below you can find elaborate explainers on a selected few.
290290

@@ -316,54 +316,55 @@ $ firefox maybe_init_suffix.pdf # Or your favorite pdf viewer
316316

317317
### Debugging type layouts
318318

319-
The internal attribute `#[rustc_layout]` can be used to dump the [`Layout`] of
320-
the type it is attached to.
319+
The internal attribute `#[rustc_dump_layout(...)]` can be used to dump the
320+
[`Layout`] of the type it is attached to.
321321
For example:
322322

323323
```rust
324324
#![feature(rustc_attrs)]
325325

326-
#[rustc_layout(debug)]
326+
#[rustc_dump_layout(debug)]
327327
type T<'a> = &'a u32;
328328
```
329329

330330
Will emit the following:
331331

332332
```text
333-
error: layout_of(&'a u32) = Layout {
334-
fields: Primitive,
335-
variants: Single {
336-
index: 0,
337-
},
338-
abi: Scalar(
339-
Scalar {
340-
value: Pointer,
341-
valid_range: 1..=18446744073709551615,
342-
},
343-
),
344-
largest_niche: Some(
345-
Niche {
346-
offset: Size {
347-
raw: 0,
348-
},
349-
scalar: Scalar {
350-
value: Pointer,
351-
valid_range: 1..=18446744073709551615,
352-
},
353-
},
354-
),
355-
align: AbiAndPrefAlign {
356-
abi: Align {
357-
pow2: 3,
358-
},
359-
pref: Align {
360-
pow2: 3,
361-
},
362-
},
363-
size: Size {
364-
raw: 8,
365-
},
366-
}
333+
error: layout_of(&u32) = Layout {
334+
size: Size(8 bytes),
335+
align: AbiAlign {
336+
abi: Align(8 bytes),
337+
},
338+
backend_repr: Scalar(
339+
Initialized {
340+
value: Pointer(
341+
AddressSpace(
342+
0,
343+
),
344+
),
345+
valid_range: 1..=18446744073709551615,
346+
},
347+
),
348+
fields: Primitive,
349+
largest_niche: Some(
350+
Niche {
351+
offset: Size(0 bytes),
352+
value: Pointer(
353+
AddressSpace(
354+
0,
355+
),
356+
),
357+
valid_range: 1..=18446744073709551615,
358+
},
359+
),
360+
uninhabited: false,
361+
variants: Single {
362+
index: 0,
363+
},
364+
max_repr_align: None,
365+
unadjusted_abi_align: Align(8 bytes),
366+
randomization_seed: 281492156579847,
367+
}
367368
--> src/lib.rs:4:1
368369
|
369370
4 | type T<'a> = &'a u32;

0 commit comments

Comments
 (0)