Skip to content

Commit 266c417

Browse files
committed
removed integer constants in librustc_typeck
1 parent 4b87655 commit 266c417

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_typeck/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl Test {
379379
380380
fn main() {
381381
let x = Test;
382-
let v = &[0i32];
382+
let v = &[0];
383383
384384
x.method::<i32, i32>(v); // error: only one type parameter is expected!
385385
}
@@ -398,7 +398,7 @@ impl Test {
398398
399399
fn main() {
400400
let x = Test;
401-
let v = &[0i32];
401+
let v = &[0];
402402
403403
x.method::<i32>(v); // OK, we're good!
404404
}
@@ -901,7 +901,7 @@ Example of erroneous code:
901901
```compile_fail
902902
enum Foo { FirstValue(i32) };
903903
904-
let u = Foo::FirstValue { value: 0i32 }; // error: Foo::FirstValue
904+
let u = Foo::FirstValue { value: 0 }; // error: Foo::FirstValue
905905
// isn't a structure!
906906
// or even simpler, if the name doesn't refer to a structure at all.
907907
let t = u32 { value: 4 }; // error: `u32` does not name a structure.

0 commit comments

Comments
 (0)