about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorCaleb Cartwright <calebcartwright@users.noreply.github.com>2023-10-22 14:07:55 -0500
committerGitHub <noreply@github.com>2023-10-22 14:07:55 -0500
commit0bb2acf50fad389285d22b2706d592b9668e65d5 (patch)
tree04a882b7b65f81460a74805e127f5e76b4e9bd28 /tests
parent547577fa5d309d90292ca3a58fef1bf0d9325cc0 (diff)
parentc2515dfa41369e1fc7a384d07ba6e33bbb7e60b9 (diff)
downloadrust-0bb2acf50fad389285d22b2706d592b9668e65d5.tar.gz
rust-0bb2acf50fad389285d22b2706d592b9668e65d5.zip
Merge pull request #5944 from calebcartwright/subtree-sync-2023-10-22
sync subtree
Diffstat (limited to 'tests')
-rw-r--r--tests/source/immovable_coroutines.rs (renamed from tests/source/immovable_generators.rs)2
-rw-r--r--tests/source/let_chains.rs4
-rw-r--r--tests/target/anonymous-types.rs19
-rw-r--r--tests/target/immovable_coroutines.rs (renamed from tests/target/immovable_generators.rs)2
-rw-r--r--tests/target/issue_4110.rs2
-rw-r--r--tests/target/let_chains.rs13
6 files changed, 31 insertions, 11 deletions
diff --git a/tests/source/immovable_generators.rs b/tests/source/immovable_coroutines.rs
index c57a1e14483..3b94af0c96c 100644
--- a/tests/source/immovable_generators.rs
+++ b/tests/source/immovable_coroutines.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 unsafe fn foo() {
     let mut ga = static || { 
diff --git a/tests/source/let_chains.rs b/tests/source/let_chains.rs
index 88ee126bfbd..b7c1f811096 100644
--- a/tests/source/let_chains.rs
+++ b/tests/source/let_chains.rs
@@ -5,11 +5,11 @@ fn main() {
 
     if aaaaaaaaaaaaaaaaaaaaa &&  aaaaaaaaaaaaaaa && aaaaaaaaa && let Some(x) = xxxxxxxxxxxx && aaaaaaa && let None = aaaaaaaaaa {}
 
-    if aaaaaaaaaaaaaaaaaaaaa &&  aaaaaaaaaaaaaaa || aaaaaaaaa && let Some(x) = xxxxxxxxxxxx && aaaaaaa && let None = aaaaaaaaaa {}
+    if aaaaaaaaaaaaaaaaaaaaa &&  aaaaaaaaaaaaaaa && aaaaaaaaa && let Some(x) = xxxxxxxxxxxx && aaaaaaa && let None = aaaaaaaaaa {}
 
     if let Some(Struct { x:TS(1,2) }) = path::to::<_>(hehe)
         && let [Simple, people] = /* get ready */ create_universe(/* hi */  GreatPowers).initialize_badminton().populate_swamps() &&
-        let    everybody    =    (Loops { hi /*hi*/  , ..loopy() }) || summons::triumphantly() { todo!() }
+        let    everybody    =    (Loops { hi /*hi*/  , ..loopy() }) && summons::triumphantly() { todo!() }
 
     if let XXXXXXXXX { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyy, zzzzzzzzzzzzz} = xxxxxxx()
     && let Foo = bar() { todo!() }
diff --git a/tests/target/anonymous-types.rs b/tests/target/anonymous-types.rs
new file mode 100644
index 00000000000..8e08c314ed1
--- /dev/null
+++ b/tests/target/anonymous-types.rs
@@ -0,0 +1,19 @@
+// Test for issue 85480
+// Pretty print anonymous struct and union types
+
+// pp-exact
+// pretty-compare-only
+
+struct Foo {
+    _: union  {
+        _: struct  {
+            a: u8,
+            b: u16,
+        },
+        c: u32,
+    },
+    d: u64,
+    e: f32,
+}
+
+fn main() {}
diff --git a/tests/target/immovable_generators.rs b/tests/target/immovable_coroutines.rs
index 0bf7a2d91ba..f52cfa00f97 100644
--- a/tests/target/immovable_generators.rs
+++ b/tests/target/immovable_coroutines.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 unsafe fn foo() {
     let mut ga = static || {
diff --git a/tests/target/issue_4110.rs b/tests/target/issue_4110.rs
index d3734e90b7f..ea8fa3b73d2 100644
--- a/tests/target/issue_4110.rs
+++ b/tests/target/issue_4110.rs
@@ -12,7 +12,7 @@ fn bindings() {
                 span,
                 ..
             },
-        ) if borrow_spans.for_generator() | borrow_spans.for_closure() => self
+        ) if borrow_spans.for_coroutine() | borrow_spans.for_closure() => self
             .report_escaping_closure_capture(
                 borrow_spans,
                 borrow_span,
diff --git a/tests/target/let_chains.rs b/tests/target/let_chains.rs
index 165641521cf..1ceecac8abc 100644
--- a/tests/target/let_chains.rs
+++ b/tests/target/let_chains.rs
@@ -13,11 +13,12 @@ fn main() {
         && let None = aaaaaaaaaa
     {}
 
-    if aaaaaaaaaaaaaaaaaaaaa && aaaaaaaaaaaaaaa
-        || aaaaaaaaa
-            && let Some(x) = xxxxxxxxxxxx
-            && aaaaaaa
-            && let None = aaaaaaaaaa
+    if aaaaaaaaaaaaaaaaaaaaa
+        && aaaaaaaaaaaaaaa
+        && aaaaaaaaa
+        && let Some(x) = xxxxxxxxxxxx
+        && aaaaaaa
+        && let None = aaaaaaaaaa
     {}
 
     if let Some(Struct { x: TS(1, 2) }) = path::to::<_>(hehe)
@@ -29,7 +30,7 @@ fn main() {
             hi, /*hi*/
             ..loopy()
         })
-        || summons::triumphantly()
+        && summons::triumphantly()
     {
         todo!()
     }