add message for resolution failure because wrong namespace

This commit is contained in:
YI 2020-04-22 15:33:34 +08:00
parent 25f070d1ed
commit bb1eedb026
3 changed files with 95 additions and 45 deletions

View file

@ -0,0 +1,6 @@
use std::sync::mpsc;
fn main() {
let (tx, rx) = mpsc::channel::new(1);
//~^ ERROR `channel` in `mpsc` is a concrete value, not a module or Struct you specified
}

View file

@ -0,0 +1,9 @@
error[E0433]: failed to resolve: `channel` in `mpsc` is a concrete value, not a module or Struct you specified
--> $DIR/issue-71406.rs:4:26
|
LL | let (tx, rx) = mpsc::channel::new(1);
| ^^^^^^^ `channel` in `mpsc` is a concrete value, not a module or Struct you specified
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.