Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2b21f4f

Browse files
committedSep 3, 2024·
Auto merge of rust-lang#129946 - GuillaumeGomez:rollup-bovh08y, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - rust-lang#127021 (Add target support for RTEMS Arm) - rust-lang#128871 (bypass linker configuration and cross target check for specific commands) - rust-lang#129471 ([rustdoc] Sort impl associated items by kinds and then by appearance) - rust-lang#129529 (Add test to build crates used by r-a on stable) - rust-lang#129706 (Rename dump of coroutine by-move-body to be more consistent, fix ICE in dump_mir) - rust-lang#129796 (Unify scraped examples with other code examples) - rust-lang#129939 (explain why Rvalue::Len still exists) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d6c8169 + d4b349e commit 2b21f4f

File tree

68 files changed

+1272
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1272
-252
lines changed
 

‎compiler/rustc_middle/src/mir/pretty.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,9 @@ fn write_mir_sig(tcx: TyCtxt<'_>, body: &Body<'_>, w: &mut dyn io::Write) -> io:
612612
let def_id = body.source.def_id();
613613
let kind = tcx.def_kind(def_id);
614614
let is_function = match kind {
615-
DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(..) => true,
615+
DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(..) | DefKind::SyntheticCoroutineBody => {
616+
true
617+
}
616618
_ => tcx.is_closure_like(def_id),
617619
};
618620
match (kind, body.source.promoted) {

‎compiler/rustc_middle/src/mir/syntax.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,9 @@ pub enum Rvalue<'tcx> {
13071307
/// If the type of the place is an array, this is the array length. For slices (`[T]`, not
13081308
/// `&[T]`) this accesses the place's metadata to determine the length. This rvalue is
13091309
/// ill-formed for places of other types.
1310+
///
1311+
/// This cannot be a `UnOp(PtrMetadata, _)` because that expects a value, and we only
1312+
/// have a place, and `UnOp(PtrMetadata, RawPtr(place))` is not a thing.
13101313
Len(Place<'tcx>),
13111314

13121315
/// Performs essentially all of the casts that can be performed via `as`.

0 commit comments

Comments
 (0)
This repository has been archived.