-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay failure on unknown type for tuple style types.
Partially solving issue #7155.
- Loading branch information
Showing
3 changed files
with
49 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#[test] | ||
fn test_enumerate_type_resolution() { | ||
// TODO(orizi): Remove "_usize" from the next line. Currently doesn't work without it, due to | ||
// `NumericLiteral` not auto suppling `Destruct` to a type implementing it. | ||
for (k, v) in array![0, 1, 2_usize].into_iter().enumerate() { | ||
assert_eq!(k, v); | ||
}; | ||
|
||
let mut iter = array![0, 1, 2].into_iter().enumerate(); | ||
while let Option::Some((k, v)) = iter.next() { | ||
assert_eq!(k, v); | ||
}; | ||
} |
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