You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){letmut n = 0..10;for i in n {println!("{}", i);}}
The text was updated successfully, but these errors were encountered:
mandel59
changed the title
for i in 0 .. n {} should be parsed as for i in (0 .. n) {}
range notation with for expression for i in 0 .. n {} should be parsed as for i in (0 .. n) {}Jan 11, 2015
The problem is that
for i in 0 .. n {}
is ambiguous betweenfor i in (0 .. n) {}
andfor i in 0 .. (n {})
for consistency.This code yields:
While these codes pass:
The text was updated successfully, but these errors were encountered: