File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ impl<'a> Resolver<'a> {
316316 // use foo::bar::self as abc -> foo::bar as abc
317317 err. span_suggestion (
318318 span,
319- "Remove `::self`.. " ,
319+ "consider importing the module directly " ,
320320 "" . to_string ( ) ,
321321 Applicability :: MachineApplicable ,
322322 ) ;
@@ -328,7 +328,7 @@ impl<'a> Resolver<'a> {
328328 ( span_with_rename. shrink_to_hi( ) , "}" . to_string( ) ) ,
329329 ] ;
330330 err. multipart_suggestion (
331- "..or add braces around `self`" ,
331+ "alternatively, use the multi-path `use` syntax to import `self`" ,
332332 braces,
333333 Applicability :: MachineApplicable ,
334334 ) ;
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
44LL | use std::fmt::self;
55 | ^^^^^^
66 |
7- help: Remove `::self`..
7+ help: consider importing the module directly
88 |
99LL | use std::fmt;
1010 | --
11- help: ..or add braces around `self`
11+ help: alternatively, use the multi-path `use` syntax to import `self`
1212 |
1313LL | use std::fmt::{self};
1414 | ^ ^
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ error[E0429]: `self` imports are only allowed within a { } list
1010LL | use foo::self;
1111 | ^^^^^^
1212 |
13- help: Remove `::self`..
13+ help: consider importing the module directly
1414 |
1515LL | use foo;
1616 | --
17- help: ..or add braces around `self`
17+ help: alternatively, use the multi-path `use` syntax to import `self`
1818 |
1919LL | use foo::{self};
2020 | ^ ^
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
44LL | use foo::self;
55 | ^^^^^^
66 |
7- help: Remove `::self`..
7+ help: consider importing the module directly
88 |
99LL | use foo;
1010 | --
11- help: ..or add braces around `self`
11+ help: alternatively, use the multi-path `use` syntax to import `self`
1212 |
1313LL | use foo::{self};
1414 | ^ ^
@@ -19,11 +19,11 @@ error[E0429]: `self` imports are only allowed within a { } list
1919LL | use std::mem::self;
2020 | ^^^^^^
2121 |
22- help: Remove `::self`..
22+ help: consider importing the module directly
2323 |
2424LL | use std::mem;
2525 | --
26- help: ..or add braces around `self`
26+ help: alternatively, use the multi-path `use` syntax to import `self`
2727 |
2828LL | use std::mem::{self};
2929 | ^ ^
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
44LL | use foo::bar::self;
55 | ^^^^^^
66 |
7- help: Remove `::self`..
7+ help: consider importing the module directly
88 |
99LL | use foo::bar;
1010 | --
11- help: ..or add braces around `self`
11+ help: alternatively, use the multi-path `use` syntax to import `self`
1212 |
1313LL | use foo::bar::{self};
1414 | ^ ^
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ error[E0429]: `self` imports are only allowed within a { } list
44LL | use foo::bar::self as abc;
55 | ^^^^^^
66 |
7- help: Remove `::self`..
7+ help: consider importing the module directly
88 |
99LL | use foo::bar as abc;
1010 | --
11- help: ..or add braces around `self`
11+ help: alternatively, use the multi-path `use` syntax to import `self`
1212 |
1313LL | use foo::bar::{self as abc};
1414 | ^ ^
You can’t perform that action at this time.
0 commit comments