Remove println!
's from ui/issues/issue-52126-assign-op-invariance.rs
This is not strictly necessary to make this test "more robust with respect to NLL"; its just an attempt to narrow the scope of the test and focus on its core.
This commit is contained in:
parent
41a1ee923e
commit
62a2bb1294
2 changed files with 5 additions and 5 deletions
|
@ -3,9 +3,9 @@ error[E0597]: `line` does not live long enough
|
|||
|
|
||||
LL | let v: Vec<&str> = line.split_whitespace().collect();
|
||||
| ^^^^ borrowed value does not live long enough
|
||||
LL | //~^ ERROR `line` does not live long enough
|
||||
LL | println!("accumulator before add_assign {:?}", acc.map);
|
||||
| ------- borrow used here, in later iteration of loop
|
||||
...
|
||||
LL | acc += cnt2;
|
||||
| --- borrow used here, in later iteration of loop
|
||||
...
|
||||
LL | }
|
||||
| - `line` dropped here while still borrowed
|
||||
|
|
|
@ -43,7 +43,7 @@ pub fn panics() {
|
|||
for line in vec!["123456789".to_string(), "12345678".to_string()] {
|
||||
let v: Vec<&str> = line.split_whitespace().collect();
|
||||
//~^ ERROR `line` does not live long enough
|
||||
println!("accumulator before add_assign {:?}", acc.map);
|
||||
// println!("accumulator before add_assign {:?}", acc.map);
|
||||
let mut map = HashMap::new();
|
||||
for str_ref in v {
|
||||
let e = map.entry(str_ref);
|
||||
|
@ -53,7 +53,7 @@ pub fn panics() {
|
|||
}
|
||||
let cnt2 = Counter{map};
|
||||
acc += cnt2;
|
||||
println!("accumulator after add_assign {:?}", acc.map);
|
||||
// println!("accumulator after add_assign {:?}", acc.map);
|
||||
// line gets dropped here but references are kept in acc.map
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue