diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir index 65311abb73d2b..cc87b27b9cd39 100644 --- a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir +++ b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir @@ -1,9 +1,14 @@ // MIR for `b::{closure#0}` 0 generator_resume /* generator_layout = GeneratorLayout { field_tys: { -<<<<<<< master _0: GeneratorSavedTy { - ty: impl std::future::Future, + ty: Alias( + Opaque, + AliasTy { + substs: [], + def_id: DefId(0:7 ~ async_await[672b]::a::{opaque#0}), + }, + ), source_info: SourceInfo { span: $DIR/async_await.rs:15:8: 15:14 (#9), scope: scope[0], @@ -11,29 +16,19 @@ ignore_for_traits: false, }, _1: GeneratorSavedTy { - ty: impl std::future::Future, + ty: Alias( + Opaque, + AliasTy { + substs: [], + def_id: DefId(0:7 ~ async_await[672b]::a::{opaque#0}), + }, + ), source_info: SourceInfo { span: $DIR/async_await.rs:16:8: 16:14 (#12), scope: scope[0], }, ignore_for_traits: false, }, -======= - _0: Alias( - Opaque, - AliasTy { - substs: [], - def_id: DefId(0:7 ~ async_await[672b]::a::{opaque#0}), - }, - ), - _1: Alias( - Opaque, - AliasTy { - substs: [], - def_id: DefId(0:7 ~ async_await[672b]::a::{opaque#0}), - }, - ), ->>>>>>> mir printing changes }, variant_fields: { Unresumed(0): [], diff --git a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir b/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir index 812c7c6374259..e1342606fc6b9 100644 --- a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir +++ b/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir @@ -1,21 +1,17 @@ // MIR for `main::{closure#0}` 0 generator_drop /* generator_layout = GeneratorLayout { field_tys: { -<<<<<<< master _0: GeneratorSavedTy { - ty: std::string::String, + ty: Adt( + std::string::String, + [], + ), source_info: SourceInfo { span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0), scope: scope[0], }, ignore_for_traits: false, }, -======= - _0: Adt( - std::string::String, - [], - ), ->>>>>>> mir printing changes }, variant_fields: { Unresumed(0): [], diff --git a/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir b/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir index 6dd4650c4f4ac..d57168ec65d46 100644 --- a/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir +++ b/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir @@ -1,21 +1,17 @@ // MIR for `main::{closure#0}` 0 generator_resume /* generator_layout = GeneratorLayout { field_tys: { -<<<<<<< master _0: GeneratorSavedTy { - ty: HasDrop, + ty: Adt( + HasDrop, + [], + ), source_info: SourceInfo { span: $DIR/generator_tiny.rs:20:13: 20:15 (#0), scope: scope[0], }, ignore_for_traits: false, }, -======= - _0: Adt( - HasDrop, - [], - ), ->>>>>>> mir printing changes }, variant_fields: { Unresumed(0): [], diff --git a/tests/ui/generator/print/generator-print-verbose-1.drop_tracking.stderr b/tests/ui/generator/print/generator-print-verbose-1.drop_tracking.stderr index 7d0a201699b5c..3f70914a8deef 100644 --- a/tests/ui/generator/print/generator-print-verbose-1.drop_tracking.stderr +++ b/tests/ui/generator/print/generator-print-verbose-1.drop_tracking.stderr @@ -37,7 +37,7 @@ note: required because it's used within this generator | LL | || { | ^^ -note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Arc>])` +note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Adt(Arc, [Adt(RefCell, [Int(I32)])])])` --> $DIR/generator-print-verbose-1.rs:44:30 | LL | pub fn make_gen2(t: T) -> impl Generator { diff --git a/tests/ui/generator/print/generator-print-verbose-1.drop_tracking_mir.stderr b/tests/ui/generator/print/generator-print-verbose-1.drop_tracking_mir.stderr index c045b1441c146..3c6213733ff5d 100644 --- a/tests/ui/generator/print/generator-print-verbose-1.drop_tracking_mir.stderr +++ b/tests/ui/generator/print/generator-print-verbose-1.drop_tracking_mir.stderr @@ -33,7 +33,7 @@ note: required because it's used within this generator | LL | || { | ^^ -note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Arc>])` +note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Adt(Arc, [Adt(RefCell, [Int(I32)])])])` --> $DIR/generator-print-verbose-1.rs:44:30 | LL | pub fn make_gen2(t: T) -> impl Generator { diff --git a/tests/ui/generator/print/generator-print-verbose-1.no_drop_tracking.stderr b/tests/ui/generator/print/generator-print-verbose-1.no_drop_tracking.stderr index 7d0a201699b5c..3f70914a8deef 100644 --- a/tests/ui/generator/print/generator-print-verbose-1.no_drop_tracking.stderr +++ b/tests/ui/generator/print/generator-print-verbose-1.no_drop_tracking.stderr @@ -37,7 +37,7 @@ note: required because it's used within this generator | LL | || { | ^^ -note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Arc>])` +note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Adt(Arc, [Adt(RefCell, [Int(I32)])])])` --> $DIR/generator-print-verbose-1.rs:44:30 | LL | pub fn make_gen2(t: T) -> impl Generator { diff --git a/tests/ui/generator/print/generator-print-verbose-1.stderr b/tests/ui/generator/print/generator-print-verbose-1.stderr deleted file mode 100644 index ac27ba49a1f4f..0000000000000 --- a/tests/ui/generator/print/generator-print-verbose-1.stderr +++ /dev/null @@ -1,62 +0,0 @@ -error: generator cannot be sent between threads safely - --> $DIR/generator-print-verbose-1.rs:37:18 - | -LL | require_send(send_gen); - | ^^^^^^^^ generator is not `Send` - | - = help: the trait `Sync` is not implemented for `RefCell` -note: generator is not `Send` as this value is used across a yield - --> $DIR/generator-print-verbose-1.rs:35:9 - | -LL | let _non_send_gen = make_non_send_generator(); - | ------------- has type `Opaque(DefId(0:34 ~ generator_print_verbose_1[749a]::make_non_send_generator::{opaque#0}), [])` which is not `Send` -LL | yield; - | ^^^^^ yield occurs here, with `_non_send_gen` maybe used later -LL | }; - | - `_non_send_gen` is later dropped here -note: required by a bound in `require_send` - --> $DIR/generator-print-verbose-1.rs:26:25 - | -LL | fn require_send(_: impl Send) {} - | ^^^^ required by this bound in `require_send` - -error[E0277]: `RefCell` cannot be shared between threads safely - --> $DIR/generator-print-verbose-1.rs:56:18 - | -LL | require_send(send_gen); - | ------------ ^^^^^^^^ `RefCell` cannot be shared between threads safely - | | - | required by a bound introduced by this call - | - = help: the trait `Sync` is not implemented for `RefCell` - = note: required for `Arc>` to implement `Send` -note: required because it's used within this generator - --> $DIR/generator-print-verbose-1.rs:42:5 - | -LL | || { - | ^^ -note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[749a]::make_gen2::{opaque#0}), [Adt(Arc, [Adt(RefCell, [Int(I32)])])])` - --> $DIR/generator-print-verbose-1.rs:41:30 - | -LL | pub fn make_gen2(t: T) -> impl Generator { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: required because it appears within the type `Opaque(DefId(0:36 ~ generator_print_verbose_1[749a]::make_non_send_generator2::{opaque#0}), [])` - --> $DIR/generator-print-verbose-1.rs:47:34 - | -LL | fn make_non_send_generator2() -> impl Generator>> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: required because it captures the following types: `Opaque(DefId(0:36 ~ generator_print_verbose_1[749a]::make_non_send_generator2::{opaque#0}), [])`, `()` -note: required because it's used within this generator - --> $DIR/generator-print-verbose-1.rs:52:20 - | -LL | let send_gen = || { - | ^^ -note: required by a bound in `require_send` - --> $DIR/generator-print-verbose-1.rs:26:25 - | -LL | fn require_send(_: impl Send) {} - | ^^^^ required by this bound in `require_send` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/thir-print/thir-tree-match.stdout b/tests/ui/thir-print/thir-tree-match.stdout index d6174ec262a44..a092b925c6555 100644 --- a/tests/ui/thir-print/thir-tree-match.stdout +++ b/tests/ui/thir-print/thir-tree-match.stdout @@ -1,13 +1,13 @@ DefId(0:16 ~ thir_tree_match[3c9a]::has_match): params: [ Param { - ty: Foo + ty: Adt(Foo, []) ty_span: Some($DIR/thir-tree-match.rs:15:19: 15:22 (#0)) self_kind: None hir_id: Some(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).1)) param: Some( Pat: { - ty: Foo + ty: Adt(Foo, []) span: $DIR/thir-tree-match.rs:15:14: 15:17 (#0) kind: PatKind { Binding { @@ -15,7 +15,7 @@ params: [ name: "foo" mode: ByValue var: LocalVarId(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).2)) - ty: Foo + ty: Adt(Foo, []) is_primary: true subpattern: None } @@ -26,7 +26,7 @@ params: [ ] body: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0) kind: @@ -35,7 +35,7 @@ body: lint_level: Inherited value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0) kind: @@ -44,7 +44,7 @@ body: lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).26)) value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:15:32: 21:2 (#0) kind: @@ -57,7 +57,7 @@ body: stmts: [] expr: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0) kind: @@ -66,14 +66,14 @@ body: lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).3)) value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:16:5: 20:6 (#0) kind: Match { scrutinee: Expr { - ty: Foo + ty: Adt(Foo, []) temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0) kind: @@ -82,7 +82,7 @@ body: lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).4)) value: Expr { - ty: Foo + ty: Adt(Foo, []) temp_lifetime: Some(Node(26)) span: $DIR/thir-tree-match.rs:16:11: 16:14 (#0) kind: @@ -96,7 +96,7 @@ body: Arm { pattern: Pat: { - ty: Foo + ty: Adt(Foo, []) span: $DIR/thir-tree-match.rs:17:9: 17:32 (#0) kind: PatKind { Variant { @@ -110,7 +110,7 @@ body: variant_index: 0 subpatterns: [ Pat: { - ty: Bar + ty: Adt(Bar, []) span: $DIR/thir-tree-match.rs:17:21: 17:31 (#0) kind: PatKind { Variant { @@ -133,7 +133,7 @@ body: guard: None body: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(13)) span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) kind: @@ -142,7 +142,7 @@ body: lint_level: Inherited value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(13)) span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) kind: @@ -151,7 +151,7 @@ body: lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).13)) value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(13)) span: $DIR/thir-tree-match.rs:17:36: 17:40 (#0) kind: @@ -169,7 +169,7 @@ body: Arm { pattern: Pat: { - ty: Foo + ty: Adt(Foo, []) span: $DIR/thir-tree-match.rs:18:9: 18:23 (#0) kind: PatKind { Variant { @@ -183,7 +183,7 @@ body: variant_index: 0 subpatterns: [ Pat: { - ty: Bar + ty: Adt(Bar, []) span: $DIR/thir-tree-match.rs:18:21: 18:22 (#0) kind: PatKind { Wild @@ -196,7 +196,7 @@ body: guard: None body: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(19)) span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) kind: @@ -205,7 +205,7 @@ body: lint_level: Inherited value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(19)) span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) kind: @@ -214,7 +214,7 @@ body: lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).19)) value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(19)) span: $DIR/thir-tree-match.rs:18:27: 18:32 (#0) kind: @@ -232,7 +232,7 @@ body: Arm { pattern: Pat: { - ty: Foo + ty: Adt(Foo, []) span: $DIR/thir-tree-match.rs:19:9: 19:20 (#0) kind: PatKind { Variant { @@ -251,7 +251,7 @@ body: guard: None body: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(24)) span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) kind: @@ -260,7 +260,7 @@ body: lint_level: Inherited value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(24)) span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) kind: @@ -269,7 +269,7 @@ body: lint_level: Explicit(HirId(DefId(0:16 ~ thir_tree_match[3c9a]::has_match).24)) value: Expr { - ty: bool + ty: Bool temp_lifetime: Some(Node(24)) span: $DIR/thir-tree-match.rs:19:24: 19:28 (#0) kind: @@ -302,7 +302,7 @@ params: [ ] body: Expr { - ty: () + ty: Tuple([]) temp_lifetime: Some(Node(2)) span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0) kind: @@ -311,7 +311,7 @@ body: lint_level: Inherited value: Expr { - ty: () + ty: Tuple([]) temp_lifetime: Some(Node(2)) span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0) kind: @@ -320,7 +320,7 @@ body: lint_level: Explicit(HirId(DefId(0:17 ~ thir_tree_match[3c9a]::main).2)) value: Expr { - ty: () + ty: Tuple([]) temp_lifetime: Some(Node(2)) span: $DIR/thir-tree-match.rs:23:11: 23:13 (#0) kind: diff --git a/tests/ui/thir-print/thir-tree.stdout b/tests/ui/thir-print/thir-tree.stdout index 0a35d9fb78ca2..817edc303a663 100644 --- a/tests/ui/thir-print/thir-tree.stdout +++ b/tests/ui/thir-print/thir-tree.stdout @@ -3,7 +3,7 @@ params: [ ] body: Expr { - ty: () + ty: Tuple([]) temp_lifetime: Some(Node(2)) span: $DIR/thir-tree.rs:4:15: 4:17 (#0) kind: @@ -12,7 +12,7 @@ body: lint_level: Inherited value: Expr { - ty: () + ty: Tuple([]) temp_lifetime: Some(Node(2)) span: $DIR/thir-tree.rs:4:15: 4:17 (#0) kind: @@ -21,7 +21,7 @@ body: lint_level: Explicit(HirId(DefId(0:3 ~ thir_tree[8f1d]::main).2)) value: Expr { - ty: () + ty: Tuple([]) temp_lifetime: Some(Node(2)) span: $DIR/thir-tree.rs:4:15: 4:17 (#0) kind: