-
-
Notifications
You must be signed in to change notification settings - Fork 14.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.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
If I do:
extern crate regex;
fn main() {
let s: String = regex::Regex::new("...").unwrap();
}
I get (as expected) an error (E0308 mismatched types) saying ... found type regex::Regex.
However, if I instead do:
use regex;
fn main() {
let s: String = regex::Regex::new("...").unwrap();
}
I get an error saying ... found type regex::re_unicode::Regex.
But regex::re_unicode is private.
Observed with rustc 1.32.0-nightly (2018-11-15) with edition = "2018" and dependency of regex = "1.0".regex = "1.0"
#21934 is tracking work on not exposing private types. Feel free to dupe against that if you like, but I thought I'd raise this separately since although not technically a regression (I was using the same compiler), it feels like the experience of using the newer 2018 style is worse for this particular case.
Reactions are currently unavailable
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.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.