diff options
| author | Nick Hamann <nick@wabbo.org> | 2015-05-19 00:32:27 -0500 |
|---|---|---|
| committer | Nick Hamann <nick@wabbo.org> | 2015-05-19 00:32:27 -0500 |
| commit | d50fa7eff56e6d2b4daae4cf835dc8133b235c35 (patch) | |
| tree | bbd0414cdbfa9e2475b38096dcba34417226e293 /src | |
| parent | 8dbc3699213965feb422ff9257111f2edb2fc9db (diff) | |
| download | rust-d50fa7eff56e6d2b4daae4cf835dc8133b235c35.tar.gz rust-d50fa7eff56e6d2b4daae4cf835dc8133b235c35.zip | |
Add error explanation for E0326.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index bb60de955f0..6bac0299441 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -684,6 +684,25 @@ for types as needed by the compiler, and it is currently disallowed to explicitly implement it for a type. "##, +E0326: r##" +The types of any associated constants in a trait implementation must match the +types in the trait definition. This error indicates that there was a mismatch. + +Here's an example of this error: + +``` +trait Foo { + const BAR: bool; +} + +struct Bar; + +impl Foo for Bar { + const BAR: u32 = 5; // error, expected bool, found u32 +} +``` +"##, + E0368: r##" This error indicates that a binary assignment operator like `+=` or `^=` was applied to the wrong types. @@ -885,7 +904,6 @@ register_diagnostics! { E0323, // implemented an associated const when another trait item expected E0324, // implemented a method when another trait item expected E0325, // implemented an associated type when another trait item expected - E0326, // associated const implemented with different type from trait E0327, // referred to method instead of constant in match pattern E0328, // cannot implement Unsize explicitly E0366, // dropck forbid specialization to concrete type or region |
