diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-01-27 11:03:21 +0000 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2019-05-12 18:46:43 +0100 |
| commit | ff71b80a85185c5d0ce594c13efddcaca9be54c5 (patch) | |
| tree | 6923a16bf6742b2a0d31f99311e6fc4cb1d71913 /src/test/ui/error-codes | |
| parent | 0df1e57991e34825697b1659732c0716e7508519 (diff) | |
| download | rust-ff71b80a85185c5d0ce594c13efddcaca9be54c5.tar.gz rust-ff71b80a85185c5d0ce594c13efddcaca9be54c5.zip | |
Change compare mode to use -Zborrowck=mir
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0502.nll.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0502.nll.stderr b/src/test/ui/error-codes/E0502.nll.stderr new file mode 100644 index 00000000000..e5671ee49e6 --- /dev/null +++ b/src/test/ui/error-codes/E0502.nll.stderr @@ -0,0 +1,13 @@ +error[E0502]: cannot borrow `*a` as mutable because it is also borrowed as immutable + --> $DIR/E0502.rs:4:9 + | +LL | let ref y = a; + | ----- immutable borrow occurs here +LL | bar(a); + | ^ mutable borrow occurs here +LL | y.use_ref(); + | - immutable borrow later used here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0502`. diff --git a/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr new file mode 100644 index 00000000000..5140d1a9a7a --- /dev/null +++ b/src/test/ui/error-codes/E0621-does-not-trigger-for-closures.nll.stderr @@ -0,0 +1,11 @@ +error: lifetime may not live long enough + --> $DIR/E0621-does-not-trigger-for-closures.rs:15:45 + | +LL | invoke(&x, |a, b| if a > b { a } else { b }); + | -- ^ returning this value requires that `'1` must outlive `'2` + | || + | |return type of closure is &'2 i32 + | has type `&'1 i32` + +error: aborting due to previous error + |
