Skip to content
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

Use statements in functions not working #5204

Closed
Nashenas88 opened this issue Jul 3, 2020 · 1 comment
Closed

Use statements in functions not working #5204

Nashenas88 opened this issue Jul 3, 2020 · 1 comment

Comments

@Nashenas88
Copy link
Contributor

The program below shows io::ErrorKind::Other as unresolved. Moving the use std::io; line to outside of the function fixes the resolution.

fn f() {
    use std::io;
    let _ = io::ErrorKind::Other;
}
@lnicola
Copy link
Member

lnicola commented Jul 3, 2020

Duplicate of #1165.

@lnicola lnicola closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants