Rollup merge of #57635 - euclio:path-separators, r=michaelwoerister
use structured macro and path resolve suggestions
This commit is contained in:
commit
f63e3d2ef4
4 changed files with 44 additions and 20 deletions
|
|
@ -2,7 +2,7 @@ error[E0423]: expected function, found macro `assert`
|
|||
--> $DIR/resolve-hint-macro.rs:2:5
|
||||
|
|
||||
LL | assert(true);
|
||||
| ^^^^^^ did you mean `assert!(...)`?
|
||||
| ^^^^^^ help: use `!` to invoke the macro: `assert!`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@ error[E0423]: expected value, found module `a`
|
|||
LL | a.I
|
||||
| ^--
|
||||
| |
|
||||
| did you mean `a::I`?
|
||||
| help: use the path separator to refer to an item: `a::I`
|
||||
|
||||
error[E0423]: expected value, found module `a`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:22:5
|
||||
|
|
||||
LL | a.g()
|
||||
| ^----
|
||||
| ^--
|
||||
| |
|
||||
| did you mean `a::g(...)`?
|
||||
| help: use the path separator to refer to an item: `a::g`
|
||||
|
||||
error[E0423]: expected value, found module `a`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:27:5
|
||||
|
|
@ -20,16 +20,21 @@ error[E0423]: expected value, found module `a`
|
|||
LL | a.b.J
|
||||
| ^--
|
||||
| |
|
||||
| did you mean `a::b`?
|
||||
| help: use the path separator to refer to an item: `a::b`
|
||||
|
||||
error[E0423]: expected value, found module `a::b`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:32:5
|
||||
|
|
||||
LL | a::b.J
|
||||
| ^^^---
|
||||
| | |
|
||||
| | help: a constant with a similar name exists: `I`
|
||||
| did you mean `a::b::J`?
|
||||
| ^^^^
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL | a::I.J
|
||||
| ^
|
||||
help: use the path separator to refer to an item
|
||||
|
|
||||
LL | a::b::J
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found module `a`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:37:5
|
||||
|
|
@ -37,7 +42,7 @@ error[E0423]: expected value, found module `a`
|
|||
LL | a.b.f();
|
||||
| ^--
|
||||
| |
|
||||
| did you mean `a::b`?
|
||||
| help: use the path separator to refer to an item: `a::b`
|
||||
|
||||
error[E0423]: expected value, found module `a::b`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:40:12
|
||||
|
|
@ -51,10 +56,15 @@ error[E0423]: expected value, found module `a::b`
|
|||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:45:5
|
||||
|
|
||||
LL | a::b.f()
|
||||
| ^^^-----
|
||||
| | |
|
||||
| | help: a constant with a similar name exists: `I`
|
||||
| did you mean `a::b::f(...)`?
|
||||
| ^^^^
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL | a::I.f()
|
||||
| ^
|
||||
help: use the path separator to refer to an item
|
||||
|
|
||||
LL | a::b::f()
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0423]: expected value, found module `a::b`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:50:5
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ error[E0574]: expected struct, variant or union type, found macro `try`
|
|||
--> $DIR/try-block-in-edition2015.rs:4:33
|
||||
|
|
||||
LL | let try_result: Option<_> = try {
|
||||
| ^^^ did you mean `try!(...)`?
|
||||
| ^^^ help: use `!` to invoke the macro: `try!`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue