1
Fork 0

Better group RFC ui tests together

This commit is contained in:
Maybe Waffle 2023-05-29 15:43:15 +00:00
parent 7452822843
commit 9d3482c403
543 changed files with 145 additions and 145 deletions

View file

@ -1,4 +1,3 @@
// run-pass
enum Wrapper {
Wrap(i32),
}
@ -7,39 +6,17 @@ use Wrapper::Wrap;
pub fn main() {
let Wrap(x) = &Wrap(3);
println!("{}", *x);
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
let Wrap(x) = &mut Wrap(3);
println!("{}", *x);
if let Some(x) = &Some(3) {
println!("{}", *x);
} else {
panic!();
}
if let Some(x) = &mut Some(3) {
println!("{}", *x);
} else {
panic!();
}
if let Some(x) = &mut Some(3) {
*x += 1;
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
} else {
panic!();
}
while let Some(x) = &Some(3) {
println!("{}", *x);
break;
}
while let Some(x) = &mut Some(3) {
println!("{}", *x);
break;
}
while let Some(x) = &mut Some(3) {
*x += 1;
*x += 1; //~ ERROR cannot assign to `*x`, which is behind a `&` reference
break;
}
}