-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given this code (playground):
use tokio::sync::mpsc;
fn main() {
let (tx, rx) = mpsc::channel::new(1);
}
I expected that rustc
would indicate that new()
is not function but channel(1)
is. Instead, I got:
Compiling playground v0.0.1 (/playground)
error[E0433]: failed to resolve: could not find `channel` in `mpsc`
--> src/main.rs:4:26
|
4 | let (tx, rx) = mpsc::channel::new(1);
| ^^^^^^^ could not find `channel` in `mpsc`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
A diagnostic along the lines of new(..)
isn't a function, but channel(..)
is would be helpful.
Meta
rustc --version --verbose
:
❯ rustc --version --verbose
rustc 1.42.0 (b8cedc004 2020-03-09)
binary: rustc
commit-hash: b8cedc00407a4c56a3bda1ed605c6fc166655447
commit-date: 2020-03-09
host: x86_64-apple-darwin
release: 1.42.0
LLVM version: 9.0
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.