From aaf92f04d1c9b90f05c586ed811e6b185743018d Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Wed, 15 Apr 2015 20:25:58 +1200 Subject: [PATCH] rustc: Add long diagnostics for E0161 --- src/librustc/diagnostics.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index a13cb27f48c51..15bad7aa5e535 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