Skip to content

Commit 62a2bb1

Browse files
committed
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.
1 parent 41a1ee9 commit 62a2bb1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/test/ui/issues/issue-52126-assign-op-invariance.nll.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ error[E0597]: `line` does not live long enough
33
|
44
LL | let v: Vec<&str> = line.split_whitespace().collect();
55
| ^^^^ borrowed value does not live long enough
6-
LL | //~^ ERROR `line` does not live long enough
7-
LL | println!("accumulator before add_assign {:?}", acc.map);
8-
| ------- borrow used here, in later iteration of loop
6+
...
7+
LL | acc += cnt2;
8+
| --- borrow used here, in later iteration of loop
99
...
1010
LL | }
1111
| - `line` dropped here while still borrowed

src/test/ui/issues/issue-52126-assign-op-invariance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub fn panics() {
4343
for line in vec!["123456789".to_string(), "12345678".to_string()] {
4444
let v: Vec<&str> = line.split_whitespace().collect();
4545
//~^ ERROR `line` does not live long enough
46-
println!("accumulator before add_assign {:?}", acc.map);
46+
// println!("accumulator before add_assign {:?}", acc.map);
4747
let mut map = HashMap::new();
4848
for str_ref in v {
4949
let e = map.entry(str_ref);
@@ -53,7 +53,7 @@ pub fn panics() {
5353
}
5454
let cnt2 = Counter{map};
5555
acc += cnt2;
56-
println!("accumulator after add_assign {:?}", acc.map);
56+
// println!("accumulator after add_assign {:?}", acc.map);
5757
// line gets dropped here but references are kept in acc.map
5858
}
5959
}

0 commit comments

Comments
 (0)