diff options
| author | Chris Wong <lambda.fairy@gmail.com> | 2015-04-15 20:25:58 +1200 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-04-16 22:23:36 -0400 |
| commit | aaf92f04d1c9b90f05c586ed811e6b185743018d (patch) | |
| tree | b1e886f071075567d2c6d3f05f57080c3287d43f | |
| parent | c08facfcfd010807d27d4b315c42537d981c3b5e (diff) | |
| download | rust-aaf92f04d1c9b90f05c586ed811e6b185743018d.tar.gz rust-aaf92f04d1c9b90f05c586ed811e6b185743018d.zip | |
rustc: Add long diagnostics for E0161
| -rw-r--r-- | src/librustc/diagnostics.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index a13cb27f48c..15bad7aa5e5 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -144,6 +144,14 @@ match Some(42) { } "##, +E0161: r##" +In Rust, you can only move a value when its size is known at compile time. + +To work around this restriction, consider "hiding" the value behind a reference: +either `&x` or `&mut x`. Since a reference has a fixed size, this lets you move +it around as usual. +"##, + E0162: r##" An if-let pattern attempts to match the pattern, and enters the body if the match was succesful. If the match is irrefutable (when it cannot fail to match), @@ -288,7 +296,6 @@ register_diagnostics! { E0137, E0138, E0139, - E0161, E0170, E0261, // use of undeclared lifetime name E0262, // illegal lifetime parameter name |
