From 266c41707147ea66f06b0ef8e3086c01f9791447 Mon Sep 17 00:00:00 2001 From: srinivasreddy Date: Fri, 11 Mar 2016 00:41:25 +0530 Subject: [PATCH] removed integer constants in librustc_typeck --- src/librustc_typeck/diagnostics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index cfe76206b0290..f376b42fbf968 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -379,7 +379,7 @@ impl Test { fn main() { let x = Test; - let v = &[0i32]; + let v = &[0]; x.method::(v); // error: only one type parameter is expected! } @@ -398,7 +398,7 @@ impl Test { fn main() { let x = Test; - let v = &[0i32]; + let v = &[0]; x.method::(v); // OK, we're good! } @@ -901,7 +901,7 @@ Example of erroneous code: ```compile_fail enum Foo { FirstValue(i32) }; -let u = Foo::FirstValue { value: 0i32 }; // error: Foo::FirstValue +let u = Foo::FirstValue { value: 0 }; // error: Foo::FirstValue // isn't a structure! // or even simpler, if the name doesn't refer to a structure at all. let t = u32 { value: 4 }; // error: `u32` does not name a structure.