mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Auto merge of #32367 - tiehuis:tiehuis-E0412-help, r=nagisa
Alter E0412 help message wording The initial wording does not make sense due to an extra 'to'. There are two potential candidates we can change this to: - 'you can import it into scope' - 'to import it into scope' In keeping the changes minimal, we choose the first, as this is more in line with the grammar of the extended candidates help message.
This commit is contained in:
commit
173676efdc
@ -3625,7 +3625,7 @@ fn show_candidates(session: &mut DiagnosticBuilder,
|
||||
if paths.len() == 1 {
|
||||
session.fileline_help(
|
||||
span,
|
||||
&format!("you can to import it into scope: `use {};`.",
|
||||
&format!("you can import it into scope: `use {};`.",
|
||||
&path_strings[0]),
|
||||
);
|
||||
} else {
|
||||
|
@ -27,5 +27,5 @@ pub mod baz {
|
||||
struct Foo;
|
||||
impl T for Foo { }
|
||||
//~^ ERROR trait `T` is not in scope
|
||||
//~| HELP you can to import it into scope: `use foo::bar::T;`.
|
||||
//~| HELP you can import it into scope: `use foo::bar::T;`.
|
||||
//~| HELP run `rustc --explain E0405` to see a detailed explanation
|
||||
|
@ -24,7 +24,7 @@ struct Foo;
|
||||
// are hidden from the view.
|
||||
impl OuterTrait for Foo {}
|
||||
//~^ ERROR trait `OuterTrait` is not in scope
|
||||
//~| HELP you can to import it into scope: `use issue_21221_3::outer::OuterTrait;`.
|
||||
//~| HELP you can import it into scope: `use issue_21221_3::outer::OuterTrait;`.
|
||||
//~| HELP run `rustc --explain E0405` to see a detailed explanation
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
|
@ -19,7 +19,7 @@ struct Foo;
|
||||
|
||||
impl T for Foo {}
|
||||
//~^ ERROR trait `T` is not in scope
|
||||
//~| HELP you can to import it into scope: `use issue_21221_4::T;`.
|
||||
//~| HELP you can import it into scope: `use issue_21221_4::T;`.
|
||||
//~| HELP run `rustc --explain E0405` to see a detailed explanation
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user