-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error message about [T] as a bare type (and in general) #12347
Comments
This sounds like #12144. |
It’s related to #12144 (the suggestions of how to fix a problem could be given by |
Edited as I used an outdated rustc. Now with DST, cc #12938
Which still could be improved. |
It's now a valid bare type and the error message is fine:
|
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 25, 2022
fix(extract_module) resolving import panics and improve import resolution - Should solve rust-lang#11766 - While adding a test case for this issue, I observed another issue: For this test case: ```rust mod x { pub struct Foo; pub struct Bar; } use x::{Bar, Foo}; $0type A = (Foo, Bar);$0 ``` extract module should yield this: ```rust mod x { pub struct Foo; pub struct Bar; } use x::{}; mod modname { use super::x::Bar; use super::x::Foo; pub(crate) type A = (Foo, Bar); } ``` instead it gave: ```rust mod x { pub struct Foo; pub struct Bar; } use x::{}; mod modname { use x::Bar; use x::Foo; pub(crate) type A = (Foo, Bar); } ``` So fixed this problem with second commit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From twitter:
https://twitter.com/alex_gaynor/status/435446756264779777
https://twitter.com/alex_gaynor/status/435446869452263424
This bug is not only about giving a better error message for this specific case, but also about giving suggestions in general.
The text was updated successfully, but these errors were encountered: