librustc: Remove the fallback to int for integers and f64 for
floating point numbers for real.
This will break code that looks like:
let mut x = 0;
while ... {
x += 1;
}
println!("{}", x);
Change that code to:
let mut x = 0i;
while ... {
x += 1;
}
println!("{}", x);
Closes #15201.
[breaking-change]
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
|
||||
fn main() {
|
||||
|
||||
let mut x = 0;
|
||||
let mut x = 0i;
|
||||
|
||||
loop {
|
||||
if x >= 2 {
|
||||
@@ -108,7 +108,7 @@ fn main() {
|
||||
zzz();
|
||||
sentinel();
|
||||
|
||||
let x = -987;
|
||||
let x = -987i;
|
||||
|
||||
zzz();
|
||||
sentinel();
|
||||
|
||||
Reference in New Issue
Block a user