Skip to content

Commit

Permalink
Add long diagnostics for E0247
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisdairO committed Sep 4, 2015
1 parent 62c45f4 commit 8175dce
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,24 @@ struct Bar<S, T> { x: Foo<S, T> }
```
"##,

//NB: not currently reachable
E0247: r##"
This error indicates an attempt to use a module name where a type is expected.
For example:
```
mod MyMod {
mod MySubMod { }
}
fn do_something(x: MyMod::MySubMod) { }
```
In this example, we're attempting to take a parameter of type `MyMod::MySubMod`
in the do_something function. This is not legal: `MyMod::MySubMod` is a module
name, not a type.
"##,

E0248: r##"
This error indicates an attempt to use a value where a type is expected. For
example:
Expand Down Expand Up @@ -3291,7 +3309,6 @@ register_diagnostics! {
E0242, // internal error looking up a definition
E0245, // not a trait
// E0246, // invalid recursive type
E0247, // found module name used as a type
// E0319, // trait impls for defaulted traits allowed just for structs/enums
E0320, // recursive overflow during dropck
E0321, // extended coherence rules for defaulted traits violated
Expand Down

0 comments on commit 8175dce

Please sign in to comment.