Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve suggestions output and add ui test
- Loading branch information
1 parent
eaa2ddb
commit b568642
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/coerce-suggestions.rs:17:20 | ||
| | ||
17 | let x: usize = String::new(); | ||
| ^^^^^^^^^^^^^ expected usize, found struct `std::string::String` | ||
| | ||
= note: expected type `usize` | ||
= note: found type `std::string::String` | ||
= help: here are some functions which might fulfill your needs: | ||
- .capacity() | ||
- .len() | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/coerce-suggestions.rs:23:19 | ||
| | ||
23 | let x: &str = String::new(); | ||
| ^^^^^^^^^^^^^ expected &str, found struct `std::string::String` | ||
| | ||
= note: expected type `&str` | ||
= note: found type `std::string::String` | ||
= help: try with `&String::new()` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/coerce-suggestions.rs:30:10 | ||
| | ||
30 | test(&y); | ||
| ^^ types differ in mutability | ||
| | ||
= note: expected type `&mut std::string::String` | ||
= note: found type `&std::string::String` | ||
= help: try with `&mut y` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/coerce-suggestions.rs:36:11 | ||
| | ||
36 | test2(&y); | ||
| ^^ types differ in mutability | ||
| | ||
= note: expected type `&mut i32` | ||
= note: found type `&std::string::String` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/coerce-suggestions.rs:42:9 | ||
| | ||
42 | f = box f; | ||
| ^^^^^ cyclic type of infinite size | ||
| | ||
= note: expected type `_` | ||
= note: found type `Box<_>` | ||
|
||
error: aborting due to 5 previous errors | ||
|