We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
use super as some_name
I tried this code (playground):
pub mod mod1 { pub const thing: bool = true; pub mod mod2 { use super as my_super; pub fn print() { println!("{}", my_super::thing); } } } fn main() { mod1::mod2::print(); }
I expected to see this happen: It should compile and run.
Instead, this happened: It fails with
error[E0432]: unresolved import `super` --> mytest.rs:4:13 | 4 | use super as my_super; | ^^^^^^^^^^^^^^^^^ no `super` in the root
Looking at the relevant part of the reference, it seems the above is at least grammatically correct.
I would love for this to work. However, if this is supposed to not work, a better error message would be great.
rustc --version --verbose:
rustc --version --verbose
rustc 1.44.1 (c7087fe00 2020-06-17) binary: rustc commit-hash: c7087fe00d2ba919df1d813c040a5d47e43b0fe7 commit-date: 2020-06-17 host: x86_64-unknown-linux-gnu release: 1.44.1 LLVM version: 9.0
The text was updated successfully, but these errors were encountered:
Duplicate of #35612 #29036 #37156
Sorry, something went wrong.
No branches or pull requests
I tried this code (playground):
I expected to see this happen: It should compile and run.
Instead, this happened: It fails with
Looking at the relevant part of the reference, it seems the above is at least grammatically correct.
I would love for this to work. However, if this is supposed to not work, a better error message would be great.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: