Skip to content

Commit

Permalink
Add test for -Z unpretty=thir-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
syvb committed Jul 24, 2021
1 parent e8165e7 commit 51df26e
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/ui/thir-tree.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// compile-flags: -Z unpretty=thir-tree
// check-pass

pub fn main() {}
55 changes: 55 additions & 0 deletions src/test/ui/thir-tree.stdout
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
DefId(0:3 ~ thir_tree[348d]::main):
Thir {
arms: [],
exprs: [
Expr {
ty: (),
temp_lifetime: Some(
Node(2),
),
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
kind: Block {
body: Block {
targeted_by_break: false,
region_scope: Node(1),
opt_destruction_scope: None,
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
stmts: [],
expr: None,
safety_mode: Safe,
},
},
},
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 {
owner: DefId(0:3 ~ thir_tree[348d]::main),
local_id: 2,
},
),
value: e0,
},
},
Expr {
ty: (),
temp_lifetime: Some(
Node(2),
),
span: $DIR/thir-tree.rs:4:15: 4:17 (#0),
kind: Scope {
region_scope: Destruction(2),
lint_level: Inherited,
value: e1,
},
},
],
stmts: [],
}

0 comments on commit 51df26e

Please sign in to comment.