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:
parent
bd9563aa38
commit
a5bb0a3a45
338 changed files with 1148 additions and 1146 deletions
|
@ -3424,7 +3424,7 @@ mod tests {
|
|||
hash_map.insert("a".to_string(), 1i);
|
||||
hash_map.insert("b".to_string(), 2);
|
||||
assert_eq!(hash_map.to_json(), object);
|
||||
assert_eq!(Some(15i).to_json(), Number(15 as f64));
|
||||
assert_eq!(Some(15i).to_json(), Number(15f64));
|
||||
assert_eq!(None::<int>.to_json(), Null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue