-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to returned refs from
MethodCall
- Loading branch information
1 parent
4f6eafe
commit be50a5f
Showing
3 changed files
with
83 additions
and
46 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
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
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 |
---|---|---|
@@ -1,94 +1,106 @@ | ||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:64:9 | ||
--> $DIR/redundant_type_annotations.rs:81:9 | ||
| | ||
LL | let v: u32 = self.return_an_int(); // Should lint | ||
LL | let v: u32 = self.return_an_int(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::redundant-type-annotations` implied by `-D warnings` | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:121:5 | ||
--> $DIR/redundant_type_annotations.rs:82:9 | ||
| | ||
LL | let v: &u32 = self.return_a_ref(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:83:9 | ||
| | ||
LL | let v: &Slice = self.return_a_ref_to_struct(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:143:5 | ||
| | ||
LL | let _return: String = return_a_string(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:123:5 | ||
--> $DIR/redundant_type_annotations.rs:145:5 | ||
| | ||
LL | let _return: Pie = return_a_struct(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:125:5 | ||
--> $DIR/redundant_type_annotations.rs:147:5 | ||
| | ||
LL | let _return: Pizza = return_an_enum(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:127:5 | ||
--> $DIR/redundant_type_annotations.rs:149:5 | ||
| | ||
LL | let _return: u32 = return_an_int(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:129:5 | ||
--> $DIR/redundant_type_annotations.rs:151:5 | ||
| | ||
LL | let _return: String = String::new(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:131:5 | ||
--> $DIR/redundant_type_annotations.rs:153:5 | ||
| | ||
LL | let new_pie: Pie = Pie::new(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:133:5 | ||
--> $DIR/redundant_type_annotations.rs:155:5 | ||
| | ||
LL | let _return: u32 = new_pie.return_an_int(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:137:5 | ||
--> $DIR/redundant_type_annotations.rs:157:5 | ||
| | ||
LL | let _return: u32 = Pie::associated_return_an_int(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:139:5 | ||
--> $DIR/redundant_type_annotations.rs:159:5 | ||
| | ||
LL | let _return: String = Pie::associated_return_a_string(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:143:5 | ||
--> $DIR/redundant_type_annotations.rs:165:5 | ||
| | ||
LL | let _var: u32 = u32::MAX; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:146:5 | ||
--> $DIR/redundant_type_annotations.rs:167:5 | ||
| | ||
LL | let _var: u32 = 5_u32; | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:149:5 | ||
--> $DIR/redundant_type_annotations.rs:169:5 | ||
| | ||
LL | let _var: &str = "test"; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:152:5 | ||
--> $DIR/redundant_type_annotations.rs:171:5 | ||
| | ||
LL | let _var: &[u8] = b"test"; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: redundant type annotation | ||
--> $DIR/redundant_type_annotations.rs:155:5 | ||
--> $DIR/redundant_type_annotations.rs:173:5 | ||
| | ||
LL | let _var: bool = false; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 15 previous errors | ||
error: aborting due to 17 previous errors | ||
|