Increase verbosity when suggesting subtle code changes
This commit is contained in:
parent
5ae85f43f4
commit
52fbd3e569
32 changed files with 360 additions and 239 deletions
|
|
@ -2,7 +2,12 @@ error[E0615]: attempted to take value of method `get` on type `std::boxed::Box<(
|
|||
--> $DIR/issue-13853-2.rs:5:43
|
||||
|
|
||||
LL | fn foo(res : Box<dyn ResponseHook>) { res.get }
|
||||
| ^^^ help: use parentheses to call the method: `get()`
|
||||
| ^^^
|
||||
|
|
||||
help: use parentheses to call the method
|
||||
|
|
||||
LL | fn foo(res : Box<dyn ResponseHook>) { res.get() }
|
||||
| ^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@ error[E0616]: field `len` of struct `sub::S` is private
|
|||
--> $DIR/issue-26472.rs:11:13
|
||||
|
|
||||
LL | let v = s.len;
|
||||
| ^^---
|
||||
| |
|
||||
| help: a method `len` also exists, call it with parentheses: `len()`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a method `len` also exists, call it with parentheses
|
||||
|
|
||||
LL | let v = s.len();
|
||||
| ^^
|
||||
|
||||
error[E0616]: field `len` of struct `sub::S` is private
|
||||
--> $DIR/issue-26472.rs:12:5
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@ LL | struct Foo(u32);
|
|||
| ---------------- fn(u32) -> Foo {Foo} defined here
|
||||
LL |
|
||||
LL | fn test() -> Foo { Foo }
|
||||
| --- ^^^
|
||||
| | |
|
||||
| | expected struct `Foo`, found fn item
|
||||
| | help: use parentheses to instantiate this tuple struct: `Foo(_)`
|
||||
| --- ^^^ expected struct `Foo`, found fn item
|
||||
| |
|
||||
| expected `Foo` because of return type
|
||||
|
|
||||
= note: expected struct `Foo`
|
||||
found fn item `fn(u32) -> Foo {Foo}`
|
||||
help: use parentheses to instantiate this tuple struct
|
||||
|
|
||||
LL | fn test() -> Foo { Foo(_) }
|
||||
| ^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue