1
Fork 0

Adjust UI tests for unit_bindings

- Either explicitly annotate `let x: () = expr;` where `x` has unit
  type, or remove the unit binding to leave only `expr;` instead.
- Fix disjoint-capture-in-same-closure test
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2023-06-12 16:55:36 +08:00
parent 37998ab508
commit edafbaffb2
No known key found for this signature in database
GPG key ID: C5FD5D32014FDB47
61 changed files with 117 additions and 117 deletions

View file

@ -64,7 +64,7 @@ pub fn main() {
};
assert_eq!(trait_unified_3, ["Yes"]);
let regular_break = loop {
let regular_break: () = loop {
if true {
break;
} else {
@ -73,7 +73,7 @@ pub fn main() {
};
assert_eq!(regular_break, ());
let regular_break_2 = loop {
let regular_break_2: () = loop {
if true {
break Default::default();
} else {
@ -82,7 +82,7 @@ pub fn main() {
};
assert_eq!(regular_break_2, ());
let regular_break_3 = loop {
let regular_break_3: () = loop {
break if true {
Default::default()
} else {
@ -91,13 +91,13 @@ pub fn main() {
};
assert_eq!(regular_break_3, ());
let regular_break_4 = loop {
let regular_break_4: () = loop {
break ();
break;
};
assert_eq!(regular_break_4, ());
let regular_break_5 = loop {
let regular_break_5: () = loop {
break;
break ();
};