Skip to content

Commit

Permalink
rustc: Add long diagnostics for E0161
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy authored and steveklabnik committed Apr 17, 2015
1 parent c08facf commit aaf92f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/librustc/diagnostics.rs
Expand Up @@ -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),
Expand Down Expand Up @@ -288,7 +296,6 @@ register_diagnostics! {
E0137,
E0138,
E0139,
E0161,
E0170,
E0261, // use of undeclared lifetime name
E0262, // illegal lifetime parameter name
Expand Down

0 comments on commit aaf92f0

Please sign in to comment.