diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-09-10 11:47:28 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2018-09-17 13:46:50 +0200 |
| commit | 3a07d3dbd6cdb2014369935b62b36c64d6c580a6 (patch) | |
| tree | 45c6fbe3a82b8efcd38f4bffa383eae0e8a68065 /src/test/ui/error-codes | |
| parent | c50884c6157645d22d8fb1ee1beb2c1552d570c7 (diff) | |
| download | rust-3a07d3dbd6cdb2014369935b62b36c64d6c580a6.tar.gz rust-3a07d3dbd6cdb2014369935b62b36c64d6c580a6.zip | |
On nightly with NLL, suggest `#![feature(bind_by_move_pattern_guards)]` when it might fix the code.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0008.nll.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0301.nll.stderr | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0008.nll.stderr b/src/test/ui/error-codes/E0008.nll.stderr new file mode 100644 index 00000000000..ce627cb741a --- /dev/null +++ b/src/test/ui/error-codes/E0008.nll.stderr @@ -0,0 +1,11 @@ +error[E0008]: cannot bind by-move into a pattern guard + --> $DIR/E0008.rs:13:14 + | +LL | Some(s) if s.len() == 0 => {}, + | ^ moves value into pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0008`. diff --git a/src/test/ui/error-codes/E0301.nll.stderr b/src/test/ui/error-codes/E0301.nll.stderr new file mode 100644 index 00000000000..f060eb90435 --- /dev/null +++ b/src/test/ui/error-codes/E0301.nll.stderr @@ -0,0 +1,11 @@ +error[E0301]: cannot mutably borrow in a pattern guard + --> $DIR/E0301.rs:14:19 + | +LL | option if option.take().is_none() => {}, //~ ERROR E0301 + | ^^^^^^ borrowed mutably in pattern guard + | + = help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0301`. |
