Create for-loop-unconstrained-element-type-i32-fallback.rs
This commit is contained in:
parent
b568ab6abb
commit
202263d7dc
1 changed files with 4 additions and 0 deletions
|
|
@ -8,6 +8,10 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Test that the type of `sum` falls back to `i32` here,
|
||||
// and that the for loop desugaring doesn't inferfere with
|
||||
// that.
|
||||
|
||||
fn main() {
|
||||
let mut sum = 0;
|
||||
for i in Vec::new() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue