Alter wording for use foo::self
help
This commit is contained in:
parent
d190e10f74
commit
aaeea7ffc3
6 changed files with 14 additions and 14 deletions
|
@ -316,7 +316,7 @@ impl<'a> Resolver<'a> {
|
||||||
// use foo::bar::self as abc -> foo::bar as abc
|
// use foo::bar::self as abc -> foo::bar as abc
|
||||||
err.span_suggestion(
|
err.span_suggestion(
|
||||||
span,
|
span,
|
||||||
"Remove `::self`..",
|
"consider importing the module directly",
|
||||||
"".to_string(),
|
"".to_string(),
|
||||||
Applicability::MachineApplicable,
|
Applicability::MachineApplicable,
|
||||||
);
|
);
|
||||||
|
@ -328,7 +328,7 @@ impl<'a> Resolver<'a> {
|
||||||
(span_with_rename.shrink_to_hi(), "}".to_string()),
|
(span_with_rename.shrink_to_hi(), "}".to_string()),
|
||||||
];
|
];
|
||||||
err.multipart_suggestion(
|
err.multipart_suggestion(
|
||||||
"..or add braces around `self`",
|
"alternatively, use the multi-path `use` syntax to import `self`",
|
||||||
braces,
|
braces,
|
||||||
Applicability::MachineApplicable,
|
Applicability::MachineApplicable,
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
|
||||||
LL | use std::fmt::self;
|
LL | use std::fmt::self;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
help: Remove `::self`..
|
help: consider importing the module directly
|
||||||
|
|
|
|
||||||
LL | use std::fmt;
|
LL | use std::fmt;
|
||||||
| --
|
| --
|
||||||
help: ..or add braces around `self`
|
help: alternatively, use the multi-path `use` syntax to import `self`
|
||||||
|
|
|
|
||||||
LL | use std::fmt::{self};
|
LL | use std::fmt::{self};
|
||||||
| ^ ^
|
| ^ ^
|
||||||
|
|
|
@ -10,11 +10,11 @@ error[E0429]: `self` imports are only allowed within a { } list
|
||||||
LL | use foo::self;
|
LL | use foo::self;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
help: Remove `::self`..
|
help: consider importing the module directly
|
||||||
|
|
|
|
||||||
LL | use foo;
|
LL | use foo;
|
||||||
| --
|
| --
|
||||||
help: ..or add braces around `self`
|
help: alternatively, use the multi-path `use` syntax to import `self`
|
||||||
|
|
|
|
||||||
LL | use foo::{self};
|
LL | use foo::{self};
|
||||||
| ^ ^
|
| ^ ^
|
||||||
|
|
|
@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
|
||||||
LL | use foo::self;
|
LL | use foo::self;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
help: Remove `::self`..
|
help: consider importing the module directly
|
||||||
|
|
|
|
||||||
LL | use foo;
|
LL | use foo;
|
||||||
| --
|
| --
|
||||||
help: ..or add braces around `self`
|
help: alternatively, use the multi-path `use` syntax to import `self`
|
||||||
|
|
|
|
||||||
LL | use foo::{self};
|
LL | use foo::{self};
|
||||||
| ^ ^
|
| ^ ^
|
||||||
|
@ -19,11 +19,11 @@ error[E0429]: `self` imports are only allowed within a { } list
|
||||||
LL | use std::mem::self;
|
LL | use std::mem::self;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
help: Remove `::self`..
|
help: consider importing the module directly
|
||||||
|
|
|
|
||||||
LL | use std::mem;
|
LL | use std::mem;
|
||||||
| --
|
| --
|
||||||
help: ..or add braces around `self`
|
help: alternatively, use the multi-path `use` syntax to import `self`
|
||||||
|
|
|
|
||||||
LL | use std::mem::{self};
|
LL | use std::mem::{self};
|
||||||
| ^ ^
|
| ^ ^
|
||||||
|
|
|
@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
|
||||||
LL | use foo::bar::self;
|
LL | use foo::bar::self;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
help: Remove `::self`..
|
help: consider importing the module directly
|
||||||
|
|
|
|
||||||
LL | use foo::bar;
|
LL | use foo::bar;
|
||||||
| --
|
| --
|
||||||
help: ..or add braces around `self`
|
help: alternatively, use the multi-path `use` syntax to import `self`
|
||||||
|
|
|
|
||||||
LL | use foo::bar::{self};
|
LL | use foo::bar::{self};
|
||||||
| ^ ^
|
| ^ ^
|
||||||
|
|
|
@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
|
||||||
LL | use foo::bar::self as abc;
|
LL | use foo::bar::self as abc;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
help: Remove `::self`..
|
help: consider importing the module directly
|
||||||
|
|
|
|
||||||
LL | use foo::bar as abc;
|
LL | use foo::bar as abc;
|
||||||
| --
|
| --
|
||||||
help: ..or add braces around `self`
|
help: alternatively, use the multi-path `use` syntax to import `self`
|
||||||
|
|
|
|
||||||
LL | use foo::bar::{self as abc};
|
LL | use foo::bar::{self as abc};
|
||||||
| ^ ^
|
| ^ ^
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue