-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove redundent "<>" for ty::Slice with reference type
this fix #103271
- Loading branch information
Yiming Lei
committed
Nov 10, 2022
1 parent
73c9eaf
commit 0b6934d
Showing
4 changed files
with
74 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
fn main() { | ||
let iter_fun = <&[u32]>::iter; | ||
//~^ ERROR no function or associated item named `iter` found for reference `&[u32]` in the current scope [E0599] | ||
//~| function or associated item not found in `&[u32]` | ||
//~| HELP the function `iter` is implemented on `[u32]` | ||
for item in iter_fun(&[1,1]) { | ||
let x: &u32 = item; | ||
assert_eq!(x, &1); | ||
} | ||
} |
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,14 @@ | ||
error[E0599]: no function or associated item named `iter` found for reference `&[u32]` in the current scope | ||
--> $DIR/issue-103271.rs:2:30 | ||
| | ||
LL | let iter_fun = <&[u32]>::iter; | ||
| ^^^^ function or associated item not found in `&[u32]` | ||
| | ||
help: the function `iter` is implemented on `[u32]` | ||
| | ||
LL | let iter_fun = <[u32]>::iter; | ||
| ~~~~~ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0599`. |