diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-02-20 21:18:16 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-02-28 08:43:47 -0500 |
| commit | d79ad36cf5c8f11e37001a090abae5ff94fbab1b (patch) | |
| tree | 7e60d68c0ba3a3abaa286963ca41c9b60b4aa1f7 /src/test | |
| parent | 3e9bddad7bcd2b1bb4e5d534c271c6005739ab9c (diff) | |
| download | rust-d79ad36cf5c8f11e37001a090abae5ff94fbab1b.tar.gz rust-d79ad36cf5c8f11e37001a090abae5ff94fbab1b.zip | |
walk the bodies "in order" by traversing the crate
Otherwise the errors from borrowck come out in an unpredictable order.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/span/mut-arg-hint.stderr | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index e4ed0622147..01364c07144 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -1,12 +1,4 @@ error: cannot borrow immutable borrowed content `*a` as mutable - --> $DIR/mut-arg-hint.rs:18:5 - | -17 | pub fn foo<'a>(mut a: &'a String) { - | ---------- use `&'a mut String` here to make mutable -18 | a.push_str("foo"); - | ^ cannot borrow as mutable - -error: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:13:9 | 12 | fn foo(mut a: &String) { @@ -15,6 +7,14 @@ error: cannot borrow immutable borrowed content `*a` as mutable | ^ cannot borrow as mutable error: cannot borrow immutable borrowed content `*a` as mutable + --> $DIR/mut-arg-hint.rs:18:5 + | +17 | pub fn foo<'a>(mut a: &'a String) { + | ---------- use `&'a mut String` here to make mutable +18 | a.push_str("foo"); + | ^ cannot borrow as mutable + +error: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:25:9 | 24 | pub fn foo(mut a: &String) { |
