Skip to content

Conversation

@CieriA
Copy link
Contributor

@CieriA CieriA commented Jan 12, 2026

This PR improves documentation to std::mem::uninitialized. While the function is deprecated, it currently lacks a formal # Safety section and clear examples on how to use it, even if it is almost always UB.

Documentation of `std::mem::uninitialized` now have a # Safety section and a # Examples section.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 12, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 12, 2026

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@CieriA CieriA marked this pull request as draft January 12, 2026 22:01
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 12, 2026
@CieriA CieriA marked this pull request as ready for review January 12, 2026 22:06
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 12, 2026
@tgross35
Copy link
Contributor

Cc @rust-lang/libs for thoughts but I feel like we may not want this. There is never a time when mem::uninitialized should be preferred over MaybeUninit::uninit, demonstrating a "correct use" seems to indicate that it may be okay in some cases.

I think that if somebody is interested in the actual semantics here, it's okay for them to read the source code.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cuviper
Copy link
Member

cuviper commented Jan 13, 2026

I feel like we may not want this.

Agreed, we should let this deprecated function die. I'm especially wary that explicitly documenting safety conditions is really an API guarantee of sorts, while we really don't want anything that encourages its use. The current ambiguity serves as an additional warning flag not to use it.

@Noratrieb
Copy link
Member

I agree with not having an example, but I think listing out safety preconditions is still good (I'd reword them a bit though to clearly discourage use)

@tgross35
Copy link
Contributor

@rustbot author

If you are still interested in pursuing this, please drop the examples and apply some rewording as Nora suggested.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 16, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 16, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Comment on lines +715 to +716
/// - `T` must be *valid* with any sequence of bytes of the appropriate length,
/// initialized or uninitialized.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should hint that non-ZST T effectively needs to be all MaybeUninit to account for the uninitialized requirement. Not sure about best wording but maybe something like:

"... That is, if T is not a ZST, it must be MaybeUninit or an ADT containing only MaybeUninit and padding."

Copy link
Contributor Author

@CieriA CieriA Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but wouldn't that suggest a correct usage of this function? I removed that part because it would suggest that using uninitialized() with ZSTs is acceptable (and you said that we should discourage usage of uninitialized() by not providing any example, that's why I kept the safety conditions a bit more "abstract"). What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think mentioning the MaybeUninit requirement suggests anything more than what is already there, just makes it more obvious that this isn't sound even for POD types (since that's been a confusion point in the past). Not mentioning ZSTs seems reasonable though.

@rustbot
Copy link
Collaborator

rustbot commented Jan 22, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot
Copy link
Collaborator

rustbot commented Jan 22, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/rust.git main
    $ git push --force-with-lease
    

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Jan 22, 2026
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/imports/ambiguous-2.rs ... ok
test [ui] tests/ui/imports/ambiguous-4.rs ... ok
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
---

67                                                 }
68                                             )
69                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::concrete).10))
+                                             hir_id: HirId(DefId(offset_of::concrete).10)
71                                             span: $DIR/offset_of.rs:37:5: 1455:57 (#0)
72                                         }
73                                     }

116                                                 }
117                                             )
118                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::concrete).20))
+                                             hir_id: HirId(DefId(offset_of::concrete).20)
120                                             span: $DIR/offset_of.rs:38:5: 1455:57 (#0)
121                                         }
122                                     }

165                                                 }
166                                             )
167                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::concrete).30))
+                                             hir_id: HirId(DefId(offset_of::concrete).30)
169                                             span: $DIR/offset_of.rs:39:5: 1455:57 (#0)
170                                         }
171                                     }

214                                                 }
215                                             )
216                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::concrete).40))
+                                             hir_id: HirId(DefId(offset_of::concrete).40)
218                                             span: $DIR/offset_of.rs:40:5: 1455:57 (#0)
219                                         }
220                                     }

263                                                 }
264                                             )
265                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::concrete).50))
+                                             hir_id: HirId(DefId(offset_of::concrete).50)
267                                             span: $DIR/offset_of.rs:41:5: 1455:57 (#0)
268                                         }
269                                     }

863                                                 }
864                                             )
865                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::generic).12))
+                                             hir_id: HirId(DefId(offset_of::generic).12)
867                                             span: $DIR/offset_of.rs:45:5: 1455:57 (#0)
868                                         }
869                                     }

912                                                 }
913                                             )
914                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::generic).24))
+                                             hir_id: HirId(DefId(offset_of::generic).24)
916                                             span: $DIR/offset_of.rs:46:5: 1455:57 (#0)
917                                         }
918                                     }

961                                                 }
962                                             )
963                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::generic).36))
+                                             hir_id: HirId(DefId(offset_of::generic).36)
965                                             span: $DIR/offset_of.rs:47:5: 1455:57 (#0)
966                                         }
967                                     }

1010                                                 }
1011                                             )
1012                                             else_block: None
-                                             lint_level: Explicit(HirId(DefId(offset_of::generic).48))
+                                             hir_id: HirId(DefId(offset_of::generic).48)
1014                                             span: $DIR/offset_of.rs:48:5: 1455:57 (#0)
1015                                         }
1016                                     }

Note: some mismatched output was normalized before being compared
-                                             hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).10)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:37:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).20)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:38:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).30)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:39:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).40)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:40:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).50)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:41:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).12)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:45:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).24)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:46:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).36)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:47:5: 1455:57 (#0)
-                                             hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).48)
-                                             span: /checkout/tests/ui/thir-print/offset_of.rs:48:5: 1455:57 (#0)
+                                             hir_id: HirId(DefId(offset_of::concrete).10)
+                                             hir_id: HirId(DefId(offset_of::concrete).20)
+                                             hir_id: HirId(DefId(offset_of::concrete).30)
+                                             hir_id: HirId(DefId(offset_of::concrete).40)
+                                             hir_id: HirId(DefId(offset_of::concrete).50)
+                                             hir_id: HirId(DefId(offset_of::generic).12)
+                                             hir_id: HirId(DefId(offset_of::generic).24)
+                                             hir_id: HirId(DefId(offset_of::generic).36)
+                                             hir_id: HirId(DefId(offset_of::generic).48)


The actual stdout differed from the expected stdout
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args thir-print/offset_of.rs`

error: 1 errors occurred comparing output.
status: exit status: 0
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/thir-print/offset_of.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/thir-print/offset_of" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "-Zunpretty=thir-tree" "--crate-type=lib"
--- stdout -------------------------------
DefId(0:29 ~ offset_of[9c26]::concrete):
params: [
]
body:
    Expr {
        ty: ()
        temp_scope_id: 52
        span: /checkout/tests/ui/thir-print/offset_of.rs:36:19: 42:2 (#0)
        kind: 
            Scope {
                region_scope: Node(52)
                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).52)
                value:
                    Expr {
                        ty: ()
                        temp_scope_id: 52
                        span: /checkout/tests/ui/thir-print/offset_of.rs:36:19: 42:2 (#0)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /checkout/tests/ui/thir-print/offset_of.rs:36:19: 42:2 (#0)
                                region_scope: Node(1)
                                safety_mode: Safe
                                stmts: [
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 0}
                                            init_scope: Node(2)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:37:9: 37:10 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "x"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:29 ~ offset_of[9c26]::concrete).11))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#4)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(3)
                                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).3)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 3
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#4)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:32 ~ offset_of[9c26]::concrete::{constant#0})
                                                                            args: [usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).10)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:37:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 1}
                                            init_scope: Node(12)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:38:9: 38:10 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "y"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:29 ~ offset_of[9c26]::concrete).21))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#5)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(13)
                                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).13)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 13
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#5)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:33 ~ offset_of[9c26]::concrete::{constant#1})
                                                                            args: [usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).20)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:38:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 2}
                                            init_scope: Node(22)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:39:9: 39:10 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "h"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:29 ~ offset_of[9c26]::concrete).31))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#6)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(23)
                                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).23)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 23
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#6)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:34 ~ offset_of[9c26]::concrete::{constant#2})
                                                                            args: [usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).30)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:39:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 3}
                                            init_scope: Node(32)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:40:9: 40:11 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "z0"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:29 ~ offset_of[9c26]::concrete).41))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#7)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(33)
                                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).33)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 33
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#7)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:35 ~ offset_of[9c26]::concrete::{constant#3})
                                                                            args: [usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).40)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:40:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 4}
                                            init_scope: Node(42)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:41:9: 41:11 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "z1"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:29 ~ offset_of[9c26]::concrete).51))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#8)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(43)
                                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).43)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 43
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#8)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:36 ~ offset_of[9c26]::concrete::{constant#4})
                                                                            args: [usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).50)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:41:5: 1455:57 (#0)
                                        }
                                    }
                                ]
                                expr: []
                            }
                    }
            }
    }


DefId(0:32 ~ offset_of[9c26]::concrete::{constant#0}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 5
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#4)
        kind: 
            Scope {
                region_scope: Node(5)
                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).5)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 5
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#4)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#4)
                                region_scope: Node(6)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 7
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#4)
                                        kind: 
                                            Scope {
                                                region_scope: Node(7)
                                                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).7)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 7
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#4)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#4)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                        temp_scope_id: 7
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#4)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 7
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#4)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 7
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#4)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }
---
            }
    }


DefId(0:33 ~ offset_of[9c26]::concrete::{constant#1}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 15
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#5)
        kind: 
            Scope {
                region_scope: Node(15)
                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).15)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 15
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#5)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#5)
                                region_scope: Node(16)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 17
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#5)
                                        kind: 
                                            Scope {
                                                region_scope: Node(17)
                                                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).17)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 17
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#5)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#5)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                        temp_scope_id: 17
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#5)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 17
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#5)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 17
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#5)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000001
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }
---
            }
    }


DefId(0:34 ~ offset_of[9c26]::concrete::{constant#2}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 25
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#6)
        kind: 
            Scope {
                region_scope: Node(25)
                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).25)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 25
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#6)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#6)
                                region_scope: Node(26)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 27
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#6)
                                        kind: 
                                            Scope {
                                                region_scope: Node(27)
                                                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).27)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 27
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#6)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Blah])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#6)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Blah])
                                                                        temp_scope_id: 27
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#6)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 27
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#6)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000001
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 27
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#6)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000001
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }
---
            }
    }


DefId(0:35 ~ offset_of[9c26]::concrete::{constant#3}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 35
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#7)
        kind: 
            Scope {
                region_scope: Node(35)
                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).35)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 35
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#7)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#7)
                                region_scope: Node(36)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 37
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                        kind: 
                                            Scope {
                                                region_scope: Node(37)
                                                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).37)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 37
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
---
                                                                        temp_scope_id: 37
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                        kind: 
                                                                            Call {
                                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                                from_hir_call: false
                                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                fun:
                                                                                    Expr {
                                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                                        temp_scope_id: 37
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                        kind: 
                                                                                            ZstLiteral(user_ty: None)
                                                                                    }
                                                                                args: [
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 37
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000000
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 37
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000002
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                ]
                                                                            }
                                                                    }
                                                                rhs:
                                                                    Expr {
                                                                        ty: usize
                                                                        temp_scope_id: 37
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                        kind: 
                                                                            Call {
                                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Beta])
                                                                                from_hir_call: false
                                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                fun:
                                                                                    Expr {
                                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Beta])
                                                                                        temp_scope_id: 37
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                        kind: 
                                                                                            ZstLiteral(user_ty: None)
                                                                                    }
                                                                                args: [
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 37
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000000
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 37
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#7)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000000
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                ]
                                                                            }
                                                                    }
---
            }
    }


DefId(0:36 ~ offset_of[9c26]::concrete::{constant#4}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 45
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#8)
        kind: 
            Scope {
                region_scope: Node(45)
                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).45)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 45
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#8)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#8)
                                region_scope: Node(46)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 47
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                        kind: 
                                            Scope {
                                                region_scope: Node(47)
                                                hir_id: HirId(DefId(0:29 ~ offset_of[9c26]::concrete).47)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 47
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
---
                                                                        temp_scope_id: 47
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                        kind: 
                                                                            Call {
                                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                                from_hir_call: false
                                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                fun:
                                                                                    Expr {
                                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Alpha])
                                                                                        temp_scope_id: 47
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                        kind: 
                                                                                            ZstLiteral(user_ty: None)
                                                                                    }
                                                                                args: [
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 47
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000000
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 47
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000002
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                ]
                                                                            }
                                                                    }
                                                                rhs:
                                                                    Expr {
                                                                        ty: usize
                                                                        temp_scope_id: 47
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                        kind: 
                                                                            Call {
                                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Beta])
                                                                                from_hir_call: false
                                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                fun:
                                                                                    Expr {
                                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Beta])
                                                                                        temp_scope_id: 47
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                        kind: 
                                                                                            ZstLiteral(user_ty: None)
                                                                                    }
                                                                                args: [
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 47
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000000
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                    Expr {
                                                                                        ty: u32
                                                                                        temp_scope_id: 47
                                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#8)
                                                                                        kind: 
                                                                                            NonHirLiteral {
                                                                                                lit: 0x00000001
                                                                                                user_ty: None
                                                                                            }
                                                                                    }
                                                                                ]
                                                                            }
                                                                    }
---
            }
    }


DefId(0:30 ~ offset_of[9c26]::generic):
params: [
]
body:
    Expr {
        ty: ()
        temp_scope_id: 50
        span: /checkout/tests/ui/thir-print/offset_of.rs:44:21: 49:2 (#0)
        kind: 
            Scope {
                region_scope: Node(50)
                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).50)
                value:
                    Expr {
                        ty: ()
                        temp_scope_id: 50
                        span: /checkout/tests/ui/thir-print/offset_of.rs:44:21: 49:2 (#0)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /checkout/tests/ui/thir-print/offset_of.rs:44:21: 49:2 (#0)
                                region_scope: Node(1)
                                safety_mode: Safe
                                stmts: [
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 0}
                                            init_scope: Node(2)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:45:9: 45:11 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "gx"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:30 ~ offset_of[9c26]::generic).13))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#9)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(3)
                                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).3)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 3
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#9)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:37 ~ offset_of[9c26]::generic::{constant#0})
                                                                            args: [T/#0, usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).12)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:45:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 1}
                                            init_scope: Node(14)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:46:9: 46:11 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "gy"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:30 ~ offset_of[9c26]::generic).25))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#10)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(15)
                                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).15)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 15
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#10)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:38 ~ offset_of[9c26]::generic::{constant#1})
                                                                            args: [T/#0, usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).24)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:46:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 2}
                                            init_scope: Node(26)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:47:9: 47:11 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "dx"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:30 ~ offset_of[9c26]::generic).37))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#11)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(27)
                                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).27)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 27
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#11)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:39 ~ offset_of[9c26]::generic::{constant#2})
                                                                            args: [T/#0, usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).36)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:47:5: 1455:57 (#0)
                                        }
                                    }
                                    Stmt {
                                        kind: Let {
                                            remainder_scope: Remainder { block: 1, first_statement_index: 3}
                                            init_scope: Node(38)
                                            pattern: 
                                                Pat {
                                                    ty: usize
                                                    span: /checkout/tests/ui/thir-print/offset_of.rs:48:9: 48:11 (#0)
                                                    kind: PatKind {
                                                        Binding {
                                                            name: "dy"
                                                            mode: BindingMode(No, Not)
                                                            var: LocalVarId(HirId(DefId(0:30 ~ offset_of[9c26]::generic).49))
                                                            ty: usize
                                                            is_primary: true
                                                            is_shorthand: false
                                                            subpattern: None
                                                        }
                                                    }
---
                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#12)
                                                    kind: 
                                                        Scope {
                                                            region_scope: Node(39)
                                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).39)
                                                            value:
                                                                Expr {
                                                                    ty: usize
                                                                    temp_scope_id: 39
                                                                    span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:5: 1455:57 (#12)
                                                                    kind: 
                                                                        ConstBlock {
                                                                            did: DefId(0:40 ~ offset_of[9c26]::generic::{constant#3})
                                                                            args: [T/#0, usize]
                                                                        }
                                                                }
                                                        }
                                                }
                                            )
                                            else_block: None
                                            hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).48)
                                            span: /checkout/tests/ui/thir-print/offset_of.rs:48:5: 1455:57 (#0)
                                        }
                                    }
                                ]
                                expr: []
                            }
                    }
            }
    }


DefId(0:37 ~ offset_of[9c26]::generic::{constant#0}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 5
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#9)
        kind: 
            Scope {
                region_scope: Node(5)
                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).5)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 5
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#9)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#9)
                                region_scope: Node(6)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 7
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#9)
                                        kind: 
                                            Scope {
                                                region_scope: Node(7)
                                                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).7)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 7
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#9)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Gamma<T/#0>])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#9)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Gamma<T/#0>])
                                                                        temp_scope_id: 7
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#9)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 7
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#9)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 7
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#9)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }
---
            }
    }


DefId(0:38 ~ offset_of[9c26]::generic::{constant#1}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 17
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#10)
        kind: 
            Scope {
                region_scope: Node(17)
                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).17)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 17
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#10)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#10)
                                region_scope: Node(18)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 19
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#10)
                                        kind: 
                                            Scope {
                                                region_scope: Node(19)
                                                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).19)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 19
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#10)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Gamma<T/#0>])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#10)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Gamma<T/#0>])
                                                                        temp_scope_id: 19
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#10)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 19
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#10)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 19
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#10)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000001
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }
---
            }
    }


DefId(0:39 ~ offset_of[9c26]::generic::{constant#2}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 29
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#11)
        kind: 
            Scope {
                region_scope: Node(29)
                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).29)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 29
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#11)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#11)
                                region_scope: Node(30)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 31
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#11)
                                        kind: 
                                            Scope {
                                                region_scope: Node(31)
                                                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).31)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 31
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#11)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Delta<T/#0>])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#11)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Delta<T/#0>])
                                                                        temp_scope_id: 31
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#11)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 31
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#11)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 31
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#11)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000001
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }
---
            }
    }


DefId(0:40 ~ offset_of[9c26]::generic::{constant#3}):
params: [
]
body:
    Expr {
        ty: usize
        temp_scope_id: 41
        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#12)
        kind: 
            Scope {
                region_scope: Node(41)
                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).41)
                value:
                    Expr {
                        ty: usize
                        temp_scope_id: 41
                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#12)
                        kind: 
                            Block {
                                targeted_by_break: false
                                span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:11: 1455:57 (#12)
                                region_scope: Node(42)
                                safety_mode: Safe
                                stmts: []
                                expr:
                                    Expr {
                                        ty: usize
                                        temp_scope_id: 43
                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#12)
                                        kind: 
                                            Scope {
                                                region_scope: Node(43)
                                                hir_id: HirId(DefId(0:30 ~ offset_of[9c26]::generic).43)
                                                value:
                                                    Expr {
                                                        ty: usize
                                                        temp_scope_id: 43
                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#12)
                                                        kind: 
                                                            Call {
                                                                ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Delta<T/#0>])
                                                                from_hir_call: false
                                                                fn_span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#12)
                                                                fun:
                                                                    Expr {
                                                                        ty: FnDef(DefId(2:2121 ~ core[3181]::intrinsics::offset_of), [Delta<T/#0>])
                                                                        temp_scope_id: 43
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#12)
                                                                        kind: 
                                                                            ZstLiteral(user_ty: None)
                                                                    }
                                                                args: [
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 43
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#12)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000000
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                    Expr {
                                                                        ty: u32
                                                                        temp_scope_id: 43
                                                                        span: /rustc/FAKE_PREFIX/library/core/src/mem/mod.rs:1455:12: 1455:56 (#12)
                                                                        kind: 
                                                                            NonHirLiteral {
                                                                                lit: 0x00000002
                                                                                user_ty: None
                                                                            }
                                                                    }
                                                                ]
                                                            }
                                                    }

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 25, 2026

☔ The latest upstream changes (presumably #151634) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants