about summary refs log tree commit diff
path: root/tests/ui/thir-print
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2023-12-04 16:31:13 +0000
committerMatthew Jasper <mjjasper1@gmail.com>2023-12-04 16:31:13 +0000
commit43adf41ca6fd87cff0eb2325ffb6a68e49c6de18 (patch)
treea38a3d7b77ec3166b13f80a95777019fe253c72d /tests/ui/thir-print
parent0a83e43f282353398e4b22466cf1f4e3cc8c1682 (diff)
downloadrust-43adf41ca6fd87cff0eb2325ffb6a68e49c6de18.tar.gz
rust-43adf41ca6fd87cff0eb2325ffb6a68e49c6de18.zip
Don't include destruction scopes in THIR
They are not used by anyone, and add memory/performance overhead.
Diffstat (limited to 'tests/ui/thir-print')
-rw-r--r--tests/ui/thir-print/thir-flat-const-variant.stdout61
-rw-r--r--tests/ui/thir-print/thir-flat.stdout13
-rw-r--r--tests/ui/thir-print/thir-tree-match.stdout365
-rw-r--r--tests/ui/thir-print/thir-tree.stdout30
4 files changed, 163 insertions, 306 deletions
diff --git a/tests/ui/thir-print/thir-flat-const-variant.stdout b/tests/ui/thir-print/thir-flat-const-variant.stdout
index 7bddc925996..1840be7885b 100644
--- a/tests/ui/thir-print/thir-flat-const-variant.stdout
+++ b/tests/ui/thir-print/thir-flat-const-variant.stdout
@@ -66,18 +66,6 @@ Thir {
             ),
             span: $DIR/thir-flat-const-variant.rs:12:23: 12:35 (#0),
         },
-        Expr {
-            kind: Scope {
-                region_scope: Destruction(3),
-                lint_level: Inherited,
-                value: e3,
-            },
-            ty: Foo,
-            temp_lifetime: Some(
-                Node(3),
-            ),
-            span: $DIR/thir-flat-const-variant.rs:12:23: 12:35 (#0),
-        },
     ],
     stmts: [],
     params: [],
@@ -151,18 +139,6 @@ Thir {
             ),
             span: $DIR/thir-flat-const-variant.rs:13:23: 13:36 (#0),
         },
-        Expr {
-            kind: Scope {
-                region_scope: Destruction(3),
-                lint_level: Inherited,
-                value: e3,
-            },
-            ty: Foo,
-            temp_lifetime: Some(
-                Node(3),
-            ),
-            span: $DIR/thir-flat-const-variant.rs:13:23: 13:36 (#0),
-        },
     ],
     stmts: [],
     params: [],
@@ -236,18 +212,6 @@ Thir {
             ),
             span: $DIR/thir-flat-const-variant.rs:14:24: 14:36 (#0),
         },
-        Expr {
-            kind: Scope {
-                region_scope: Destruction(3),
-                lint_level: Inherited,
-                value: e3,
-            },
-            ty: Foo,
-            temp_lifetime: Some(
-                Node(3),
-            ),
-            span: $DIR/thir-flat-const-variant.rs:14:24: 14:36 (#0),
-        },
     ],
     stmts: [],
     params: [],
@@ -321,18 +285,6 @@ Thir {
             ),
             span: $DIR/thir-flat-const-variant.rs:15:24: 15:37 (#0),
         },
-        Expr {
-            kind: Scope {
-                region_scope: Destruction(3),
-                lint_level: Inherited,
-                value: e3,
-            },
-            ty: Foo,
-            temp_lifetime: Some(
-                Node(3),
-            ),
-            span: $DIR/thir-flat-const-variant.rs:15:24: 15:37 (#0),
-        },
     ],
     stmts: [],
     params: [],
@@ -348,7 +300,6 @@ Thir {
         Block {
             targeted_by_break: false,
             region_scope: Node(1),
-            opt_destruction_scope: None,
             span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0),
             stmts: [],
             expr: None,
@@ -380,18 +331,6 @@ Thir {
             ),
             span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0),
         },
-        Expr {
-            kind: Scope {
-                region_scope: Destruction(2),
-                lint_level: Inherited,
-                value: e1,
-            },
-            ty: (),
-            temp_lifetime: Some(
-                Node(2),
-            ),
-            span: $DIR/thir-flat-const-variant.rs:18:11: 18:13 (#0),
-        },
     ],
     stmts: [],
     params: [],
diff --git a/tests/ui/thir-print/thir-flat.stdout b/tests/ui/thir-print/thir-flat.stdout
index b0aa44b56aa..a31d08adab6 100644
--- a/tests/ui/thir-print/thir-flat.stdout
+++ b/tests/ui/thir-print/thir-flat.stdout
@@ -8,7 +8,6 @@ Thir {
         Block {
             targeted_by_break: false,
             region_scope: Node(1),
-            opt_destruction_scope: None,
             span: $DIR/thir-flat.rs:4:15: 4:17 (#0),
             stmts: [],
             expr: None,
@@ -40,18 +39,6 @@ Thir {
             ),
             span: $DIR/thir-flat.rs:4:15: 4:17 (#0),
         },
-        Expr {
-            kind: Scope {
-                region_scope: Destruction(2),
-                lint_level: Inherited,
-                value: e1,
-            },
-            ty: (),
-            temp_lifetime: Some(
-                Node(2),
-            ),
-            span: $DIR/thir-flat.rs:4:15: 4:17 (#0),
-        },
     ],
     stmts: [],
     params: [],
diff --git a/tests/ui/thir-print/thir-tree-match.stdout b/tests/ui/thir-print/thir-tree-match.stdout
index 3fc130f0176..60c9283abcf 100644
--- a/tests/ui/thir-print/thir-tree-match.stdout
+++ b/tests/ui/thir-print/thir-tree-match.stdout
@@ -31,262 +31,217 @@ body:
         span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
         kind: 
             Scope {
-                region_scope: Destruction(26)
-                lint_level: Inherited
+                region_scope: Node(26)
+                lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).26))
                 value:
                     Expr {
                         ty: bool
                         temp_lifetime: Some(Node(26))
                         span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
                         kind: 
-                            Scope {
-                                region_scope: Node(26)
-                                lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).26))
-                                value:
+                            Block {
+                                targeted_by_break: false
+                                span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
+                                region_scope: Node(25)
+                                safety_mode: Safe
+                                stmts: []
+                                expr:
                                     Expr {
                                         ty: bool
                                         temp_lifetime: Some(Node(26))
-                                        span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
+                                        span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0)
                                         kind: 
-                                            Block {
-                                                targeted_by_break: false
-                                                opt_destruction_scope: None
-                                                span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0)
-                                                region_scope: Node(25)
-                                                safety_mode: Safe
-                                                stmts: []
-                                                expr:
+                                            Scope {
+                                                region_scope: Node(3)
+                                                lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).3))
+                                                value:
                                                     Expr {
                                                         ty: bool
                                                         temp_lifetime: Some(Node(26))
                                                         span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0)
                                                         kind: 
-                                                            Scope {
-                                                                region_scope: Node(3)
-                                                                lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).3))
-                                                                value:
+                                                            Match {
+                                                                scrutinee:
                                                                     Expr {
-                                                                        ty: bool
+                                                                        ty: Foo
                                                                         temp_lifetime: Some(Node(26))
-                                                                        span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0)
+                                                                        span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0)
                                                                         kind: 
-                                                                            Match {
-                                                                                scrutinee:
+                                                                            Scope {
+                                                                                region_scope: Node(4)
+                                                                                lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).4))
+                                                                                value:
                                                                                     Expr {
                                                                                         ty: Foo
                                                                                         temp_lifetime: Some(Node(26))
                                                                                         span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0)
                                                                                         kind: 
-                                                                                            Scope {
-                                                                                                region_scope: Node(4)
-                                                                                                lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).4))
-                                                                                                value:
-                                                                                                    Expr {
-                                                                                                        ty: Foo
-                                                                                                        temp_lifetime: Some(Node(26))
-                                                                                                        span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0)
-                                                                                                        kind: 
-                                                                                                            VarRef {
-                                                                                                                id: LocalVarId(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).2))
-                                                                                                            }
-                                                                                                    }
+                                                                                            VarRef {
+                                                                                                id: LocalVarId(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).2))
                                                                                             }
                                                                                     }
-                                                                                arms: [
-                                                                                    Arm {
-                                                                                        pattern: 
+                                                                            }
+                                                                    }
+                                                                arms: [
+                                                                    Arm {
+                                                                        pattern: 
+                                                                            Pat: {
+                                                                                ty: Foo
+                                                                                span: $DIR/thir-tree-match.rs:17:9: 17:32 (#0)
+                                                                                kind: PatKind {
+                                                                                    Variant {
+                                                                                        adt_def: 
+                                                                                            AdtDef {
+                                                                                                did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
+                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+                                                                                                flags: IS_ENUM
+                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+                                                                                        args: []
+                                                                                        variant_index: 0
+                                                                                        subpatterns: [
                                                                                             Pat: {
-                                                                                                ty: Foo
-                                                                                                span: $DIR/thir-tree-match.rs:17:9: 17:32 (#0)
+                                                                                                ty: Bar
+                                                                                                span: $DIR/thir-tree-match.rs:17:21: 17:31 (#0)
                                                                                                 kind: PatKind {
                                                                                                     Variant {
                                                                                                         adt_def: 
                                                                                                             AdtDef {
-                                                                                                                did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
-                                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+                                                                                                                did: DefId(0:3 ~ thir_tree_match[fcf8]::Bar)
+                                                                                                                variants: [VariantDef { def_id: DefId(0:4 ~ thir_tree_match[fcf8]::Bar::First), ctor: Some((Const, DefId(0:5 ~ thir_tree_match[fcf8]::Bar::First::{constructor#0}))), name: "First", discr: Relative(0), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:6 ~ thir_tree_match[fcf8]::Bar::Second), ctor: Some((Const, DefId(0:7 ~ thir_tree_match[fcf8]::Bar::Second::{constructor#0}))), name: "Second", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:8 ~ thir_tree_match[fcf8]::Bar::Third), ctor: Some((Const, DefId(0:9 ~ thir_tree_match[fcf8]::Bar::Third::{constructor#0}))), name: "Third", discr: Relative(2), fields: [], flags: NO_VARIANT_FLAGS }]
                                                                                                                 flags: IS_ENUM
-                                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+                                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 10333377570083945360 }
                                                                                                         args: []
                                                                                                         variant_index: 0
-                                                                                                        subpatterns: [
-                                                                                                            Pat: {
-                                                                                                                ty: Bar
-                                                                                                                span: $DIR/thir-tree-match.rs:17:21: 17:31 (#0)
-                                                                                                                kind: PatKind {
-                                                                                                                    Variant {
-                                                                                                                        adt_def: 
-                                                                                                                            AdtDef {
-                                                                                                                                did: DefId(0:3 ~ thir_tree_match[fcf8]::Bar)
-                                                                                                                                variants: [VariantDef { def_id: DefId(0:4 ~ thir_tree_match[fcf8]::Bar::First), ctor: Some((Const, DefId(0:5 ~ thir_tree_match[fcf8]::Bar::First::{constructor#0}))), name: "First", discr: Relative(0), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:6 ~ thir_tree_match[fcf8]::Bar::Second), ctor: Some((Const, DefId(0:7 ~ thir_tree_match[fcf8]::Bar::Second::{constructor#0}))), name: "Second", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:8 ~ thir_tree_match[fcf8]::Bar::Third), ctor: Some((Const, DefId(0:9 ~ thir_tree_match[fcf8]::Bar::Third::{constructor#0}))), name: "Third", discr: Relative(2), fields: [], flags: NO_VARIANT_FLAGS }]
-                                                                                                                                flags: IS_ENUM
-                                                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 10333377570083945360 }
-                                                                                                                        args: []
-                                                                                                                        variant_index: 0
-                                                                                                                        subpatterns: []
-                                                                                                                    }
-                                                                                                                }
-                                                                                                            }
-                                                                                                        ]
+                                                                                                        subpatterns: []
                                                                                                     }
                                                                                                 }
                                                                                             }
-                                                                                        guard: None
-                                                                                        body: 
+                                                                                        ]
+                                                                                    }
+                                                                                }
+                                                                            }
+                                                                        guard: None
+                                                                        body: 
+                                                                            Expr {
+                                                                                ty: bool
+                                                                                temp_lifetime: Some(Node(13))
+                                                                                span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
+                                                                                kind: 
+                                                                                    Scope {
+                                                                                        region_scope: Node(13)
+                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).13))
+                                                                                        value:
                                                                                             Expr {
                                                                                                 ty: bool
                                                                                                 temp_lifetime: Some(Node(13))
                                                                                                 span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
                                                                                                 kind: 
-                                                                                                    Scope {
-                                                                                                        region_scope: Destruction(13)
-                                                                                                        lint_level: Inherited
-                                                                                                        value:
-                                                                                                            Expr {
-                                                                                                                ty: bool
-                                                                                                                temp_lifetime: Some(Node(13))
-                                                                                                                span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
-                                                                                                                kind: 
-                                                                                                                    Scope {
-                                                                                                                        region_scope: Node(13)
-                                                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).13))
-                                                                                                                        value:
-                                                                                                                            Expr {
-                                                                                                                                ty: bool
-                                                                                                                                temp_lifetime: Some(Node(13))
-                                                                                                                                span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0)
-                                                                                                                                kind: 
-                                                                                                                                    Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) }, neg: false)
+                                                                                                    Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) }, neg: false)
 
-                                                                                                                            }
-                                                                                                                    }
-                                                                                                            }
-                                                                                                    }
                                                                                             }
-                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).12))
-                                                                                        scope: Node(12)
-                                                                                        span: $DIR/thir-tree-match.rs:17:9: 17:40 (#0)
                                                                                     }
-                                                                                    Arm {
-                                                                                        pattern: 
+                                                                            }
+                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).12))
+                                                                        scope: Node(12)
+                                                                        span: $DIR/thir-tree-match.rs:17:9: 17:40 (#0)
+                                                                    }
+                                                                    Arm {
+                                                                        pattern: 
+                                                                            Pat: {
+                                                                                ty: Foo
+                                                                                span: $DIR/thir-tree-match.rs:18:9: 18:23 (#0)
+                                                                                kind: PatKind {
+                                                                                    Variant {
+                                                                                        adt_def: 
+                                                                                            AdtDef {
+                                                                                                did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
+                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+                                                                                                flags: IS_ENUM
+                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+                                                                                        args: []
+                                                                                        variant_index: 0
+                                                                                        subpatterns: [
                                                                                             Pat: {
-                                                                                                ty: Foo
-                                                                                                span: $DIR/thir-tree-match.rs:18:9: 18:23 (#0)
+                                                                                                ty: Bar
+                                                                                                span: $DIR/thir-tree-match.rs:18:21: 18:22 (#0)
                                                                                                 kind: PatKind {
-                                                                                                    Variant {
-                                                                                                        adt_def: 
-                                                                                                            AdtDef {
-                                                                                                                did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
-                                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
-                                                                                                                flags: IS_ENUM
-                                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
-                                                                                                        args: []
-                                                                                                        variant_index: 0
-                                                                                                        subpatterns: [
-                                                                                                            Pat: {
-                                                                                                                ty: Bar
-                                                                                                                span: $DIR/thir-tree-match.rs:18:21: 18:22 (#0)
-                                                                                                                kind: PatKind {
-                                                                                                                    Wild
-                                                                                                                }
-                                                                                                            }
-                                                                                                        ]
-                                                                                                    }
+                                                                                                    Wild
                                                                                                 }
                                                                                             }
-                                                                                        guard: None
-                                                                                        body: 
+                                                                                        ]
+                                                                                    }
+                                                                                }
+                                                                            }
+                                                                        guard: None
+                                                                        body: 
+                                                                            Expr {
+                                                                                ty: bool
+                                                                                temp_lifetime: Some(Node(19))
+                                                                                span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
+                                                                                kind: 
+                                                                                    Scope {
+                                                                                        region_scope: Node(19)
+                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).19))
+                                                                                        value:
                                                                                             Expr {
                                                                                                 ty: bool
                                                                                                 temp_lifetime: Some(Node(19))
                                                                                                 span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
                                                                                                 kind: 
-                                                                                                    Scope {
-                                                                                                        region_scope: Destruction(19)
-                                                                                                        lint_level: Inherited
-                                                                                                        value:
-                                                                                                            Expr {
-                                                                                                                ty: bool
-                                                                                                                temp_lifetime: Some(Node(19))
-                                                                                                                span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
-                                                                                                                kind: 
-                                                                                                                    Scope {
-                                                                                                                        region_scope: Node(19)
-                                                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).19))
-                                                                                                                        value:
-                                                                                                                            Expr {
-                                                                                                                                ty: bool
-                                                                                                                                temp_lifetime: Some(Node(19))
-                                                                                                                                span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0)
-                                                                                                                                kind: 
-                                                                                                                                    Literal( lit: Spanned { node: Bool(false), span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) }, neg: false)
+                                                                                                    Literal( lit: Spanned { node: Bool(false), span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) }, neg: false)
 
-                                                                                                                            }
-                                                                                                                    }
-                                                                                                            }
-                                                                                                    }
                                                                                             }
-                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).18))
-                                                                                        scope: Node(18)
-                                                                                        span: $DIR/thir-tree-match.rs:18:9: 18:32 (#0)
                                                                                     }
-                                                                                    Arm {
-                                                                                        pattern: 
-                                                                                            Pat: {
-                                                                                                ty: Foo
-                                                                                                span: $DIR/thir-tree-match.rs:19:9: 19:20 (#0)
-                                                                                                kind: PatKind {
-                                                                                                    Variant {
-                                                                                                        adt_def: 
-                                                                                                            AdtDef {
-                                                                                                                did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
-                                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
-                                                                                                                flags: IS_ENUM
-                                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
-                                                                                                        args: []
-                                                                                                        variant_index: 1
-                                                                                                        subpatterns: []
-                                                                                                    }
-                                                                                                }
-                                                                                            }
-                                                                                        guard: None
-                                                                                        body: 
+                                                                            }
+                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).18))
+                                                                        scope: Node(18)
+                                                                        span: $DIR/thir-tree-match.rs:18:9: 18:32 (#0)
+                                                                    }
+                                                                    Arm {
+                                                                        pattern: 
+                                                                            Pat: {
+                                                                                ty: Foo
+                                                                                span: $DIR/thir-tree-match.rs:19:9: 19:20 (#0)
+                                                                                kind: PatKind {
+                                                                                    Variant {
+                                                                                        adt_def: 
+                                                                                            AdtDef {
+                                                                                                did: DefId(0:10 ~ thir_tree_match[fcf8]::Foo)
+                                                                                                variants: [VariantDef { def_id: DefId(0:11 ~ thir_tree_match[fcf8]::Foo::FooOne), ctor: Some((Fn, DefId(0:12 ~ thir_tree_match[fcf8]::Foo::FooOne::{constructor#0}))), name: "FooOne", discr: Relative(0), fields: [FieldDef { did: DefId(0:13 ~ thir_tree_match[fcf8]::Foo::FooOne::0), name: "0", vis: Restricted(DefId(0:0 ~ thir_tree_match[fcf8])) }], flags: NO_VARIANT_FLAGS }, VariantDef { def_id: DefId(0:14 ~ thir_tree_match[fcf8]::Foo::FooTwo), ctor: Some((Const, DefId(0:15 ~ thir_tree_match[fcf8]::Foo::FooTwo::{constructor#0}))), name: "FooTwo", discr: Relative(1), fields: [], flags: NO_VARIANT_FLAGS }]
+                                                                                                flags: IS_ENUM
+                                                                                                repr: ReprOptions { int: None, align: None, pack: None, flags: (empty), field_shuffle_seed: 3477539199540094892 }
+                                                                                        args: []
+                                                                                        variant_index: 1
+                                                                                        subpatterns: []
+                                                                                    }
+                                                                                }
+                                                                            }
+                                                                        guard: None
+                                                                        body: 
+                                                                            Expr {
+                                                                                ty: bool
+                                                                                temp_lifetime: Some(Node(24))
+                                                                                span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
+                                                                                kind: 
+                                                                                    Scope {
+                                                                                        region_scope: Node(24)
+                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).24))
+                                                                                        value:
                                                                                             Expr {
                                                                                                 ty: bool
                                                                                                 temp_lifetime: Some(Node(24))
                                                                                                 span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
                                                                                                 kind: 
-                                                                                                    Scope {
-                                                                                                        region_scope: Destruction(24)
-                                                                                                        lint_level: Inherited
-                                                                                                        value:
-                                                                                                            Expr {
-                                                                                                                ty: bool
-                                                                                                                temp_lifetime: Some(Node(24))
-                                                                                                                span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
-                                                                                                                kind: 
-                                                                                                                    Scope {
-                                                                                                                        region_scope: Node(24)
-                                                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).24))
-                                                                                                                        value:
-                                                                                                                            Expr {
-                                                                                                                                ty: bool
-                                                                                                                                temp_lifetime: Some(Node(24))
-                                                                                                                                span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0)
-                                                                                                                                kind: 
-                                                                                                                                    Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) }, neg: false)
+                                                                                                    Literal( lit: Spanned { node: Bool(true), span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) }, neg: false)
 
-                                                                                                                            }
-                                                                                                                    }
-                                                                                                            }
-                                                                                                    }
                                                                                             }
-                                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).23))
-                                                                                        scope: Node(23)
-                                                                                        span: $DIR/thir-tree-match.rs:19:9: 19:28 (#0)
                                                                                     }
-                                                                                ]
                                                                             }
+                                                                        lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[fcf8]::has_match).23))
+                                                                        scope: Node(23)
+                                                                        span: $DIR/thir-tree-match.rs:19:9: 19:28 (#0)
                                                                     }
+                                                                ]
                                                             }
                                                     }
                                             }
@@ -307,33 +262,21 @@ body:
         span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
         kind: 
             Scope {
-                region_scope: Destruction(2)
-                lint_level: Inherited
+                region_scope: Node(2)
+                lint_level: Explicit(HirId(DefId(0:17 ~ thir_tree_match[fcf8]::main).2))
                 value:
                     Expr {
                         ty: ()
                         temp_lifetime: Some(Node(2))
                         span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
                         kind: 
-                            Scope {
-                                region_scope: Node(2)
-                                lint_level: Explicit(HirId(DefId(0:17 ~ thir_tree_match[fcf8]::main).2))
-                                value:
-                                    Expr {
-                                        ty: ()
-                                        temp_lifetime: Some(Node(2))
-                                        span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
-                                        kind: 
-                                            Block {
-                                                targeted_by_break: false
-                                                opt_destruction_scope: None
-                                                span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
-                                                region_scope: Node(1)
-                                                safety_mode: Safe
-                                                stmts: []
-                                                expr: []
-                                            }
-                                    }
+                            Block {
+                                targeted_by_break: false
+                                span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0)
+                                region_scope: Node(1)
+                                safety_mode: Safe
+                                stmts: []
+                                expr: []
                             }
                     }
             }
diff --git a/tests/ui/thir-print/thir-tree.stdout b/tests/ui/thir-print/thir-tree.stdout
index 1b478dbef99..ef6db368dbe 100644
--- a/tests/ui/thir-print/thir-tree.stdout
+++ b/tests/ui/thir-print/thir-tree.stdout
@@ -8,33 +8,21 @@ body:
         span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
         kind: 
             Scope {
-                region_scope: Destruction(2)
-                lint_level: Inherited
+                region_scope: Node(2)
+                lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree[7aaa]::main).2))
                 value:
                     Expr {
                         ty: ()
                         temp_lifetime: Some(Node(2))
                         span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
                         kind: 
-                            Scope {
-                                region_scope: Node(2)
-                                lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree[7aaa]::main).2))
-                                value:
-                                    Expr {
-                                        ty: ()
-                                        temp_lifetime: Some(Node(2))
-                                        span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
-                                        kind: 
-                                            Block {
-                                                targeted_by_break: false
-                                                opt_destruction_scope: None
-                                                span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
-                                                region_scope: Node(1)
-                                                safety_mode: Safe
-                                                stmts: []
-                                                expr: []
-                                            }
-                                    }
+                            Block {
+                                targeted_by_break: false
+                                span: $DIR/thir-tree.rs:4:15: 4:17 (#0)
+                                region_scope: Node(1)
+                                safety_mode: Safe
+                                stmts: []
+                                expr: []
                             }
                     }
             }