reduced the tests to their bare essence

This commit is contained in:
Jeroen Vannevel 2022-01-04 10:11:04 +00:00
parent 5beddf93e7
commit ec61abbe93

View file

@ -4346,11 +4346,9 @@ pub struct Foo {
} }
pub fn testfn(arg: &mut Foo) { pub fn testfn(arg: &mut Foo) {
$0arg.field = 8; // write access $0arg.field = 8;$0
println!("{}", arg.field); // read access$0
// Simulating access after the extracted portion // Simulating access after the extracted portion
arg.field = 16; // write access arg.field = 16;
println!("{}", arg.field); // read access
} }
"#, "#,
r#" r#"
@ -4359,15 +4357,13 @@ pub struct Foo {
} }
pub fn testfn(arg: &mut Foo) { pub fn testfn(arg: &mut Foo) {
fun_name(arg); // read access fun_name(arg);
// Simulating access after the extracted portion // Simulating access after the extracted portion
arg.field = 16; // write access arg.field = 16;
println!("{}", arg.field); // read access
} }
fn $0fun_name(arg: &mut Foo) { fn $0fun_name(arg: &mut Foo) {
arg.field = 8; arg.field = 8;
println!("{}", arg.field);
} }
"#, "#,
); );
@ -4383,8 +4379,7 @@ pub struct Foo {
} }
pub fn testfn(arg: &mut Foo) { pub fn testfn(arg: &mut Foo) {
$0arg.field = 8; // write access $0arg.field = 8;$0
println!("{}", arg.field); // read access$0
} }
"#, "#,
r#" r#"
@ -4393,12 +4388,11 @@ pub struct Foo {
} }
pub fn testfn(arg: &mut Foo) { pub fn testfn(arg: &mut Foo) {
fun_name(arg); // read access fun_name(arg);
} }
fn $0fun_name(arg: &mut Foo) { fn $0fun_name(arg: &mut Foo) {
arg.field = 8; arg.field = 8;
println!("{}", arg.field);
} }
"#, "#,
); );