diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-05-10 16:44:23 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-05-10 16:44:23 -0400 |
| commit | 5160bf80cdcf538e1a31c15eaa6a040a8fbc3b80 (patch) | |
| tree | f74e8724ea19c03165ec66e08e7d7a7c7d6753fd /src | |
| parent | d065d5769055b73d65fece8bc7221e82d03dce74 (diff) | |
| parent | ffc0d0448917c1f225a3500bf3a1dc6fc40029d7 (diff) | |
| download | rust-5160bf80cdcf538e1a31c15eaa6a040a8fbc3b80.tar.gz rust-5160bf80cdcf538e1a31c15eaa6a040a8fbc3b80.zip | |
Rollup merge of #25255 - caipre:diagnostic-messages, r=alexcrichton
Add a few diagnostic messages; part of #24407.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 0e6386618f1..026ba3d08b4 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -46,6 +46,23 @@ enum variant, one of the fields was not provided. Each field should be specified exactly once. "##, +E0067: r##" +The left-hand side of an assignment operator must be an lvalue expression. An +lvalue expression represents a memory location and includes item paths (ie, +namespaced variables), dereferences, indexing expressions, and field references. + +``` +use std::collections::LinkedList; + +// Good +let mut list = LinkedList::new(); + + +// Bad: assignment to non-lvalue expression +LinkedList::new() += 1; +``` +"##, + E0081: r##" Enum discriminants are used to differentiate enum variants stored in memory. This error indicates that the same value was used for two or more variants, @@ -119,6 +136,20 @@ construct an instance of the following type using only safe code: ``` enum Empty {} ``` +"##, + +E0131: r##" +It is not possible to define `main` with type parameters, or even with function +parameters. When `main` is present, it must take no arguments and return `()`. +"##, + +E0132: r##" +It is not possible to declare type parameters on a function that has the `start` +attribute. Such a function must have the following type signature: + +``` +fn(isize, *const *const u8) -> isize +``` "## } @@ -149,7 +180,6 @@ register_diagnostics! { E0060, E0061, E0066, - E0067, E0068, E0069, E0070, @@ -189,8 +219,6 @@ register_diagnostics! { E0128, E0129, E0130, - E0131, - E0132, E0141, E0159, E0163, |
