You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
use std::{fs, io::Read};fnfoo(){letmut f = fs::File::new("hello");letmut text = String::new();
f.read_to_string(&mut test).unwrap();}
The current output is:
Standard Error
Compiling playground v0.0.1 (/playground)
error[E0423]: expected value, found attribute macro `test`
--> src/lib.rs:6:27
|
6 | f.read_to_string(&mut test).unwrap();
| ^^^^
|
help: a local variable with a similar name exists
|
6 | f.read_to_string(&mut text).unwrap();
| ^^^^
help: consider importing one of these items instead
|
1 | use crate::fs::io::sys::ext::net::raw_fd::sys_common::backtrace::backtrace_rs::symbolize::gimli::mystd::detect::bit::test;
|
1 | use crate::fs::io::sys::ext::net::raw_fd::sys_common::backtrace::backtrace_rs::symbolize::gimli::mystd::detect::cache::test;
|
The import suggestions here are kind of nonsense.
(They are only suggested if fs is imported.)
It seems like "consider importing one of these items instead" shouldn't suggest private items, at the very least in the case of external crates.
(For the current crate, maybe you wanted one of your own items to be available, but those should still probably be called out as being private items?)
A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
Activity
Rollup merge of rust-lang#84113 - SNCPlay42:suggestion-extern-crate, …
Auto merge of rust-lang#84113 - SNCPlay42:suggestion-extern-crate, r=…