提交 7a1df9e8 编写于 作者: M Manish Goregaokar

Rollup merge of #32180 - srinivasreddy:type_check_lib, r=steveklabnik

removed integer suffixes in librustc_typeck crate
......@@ -379,7 +379,7 @@ fn method<T>(&self, v: &[T]) -> usize {
fn main() {
let x = Test;
let v = &[0i32];
let v = &[0];
x.method::<i32, i32>(v); // error: only one type parameter is expected!
}
......@@ -398,7 +398,7 @@ fn method<T>(&self, v: &[T]) -> usize {
fn main() {
let x = Test;
let v = &[0i32];
let v = &[0];
x.method::<i32>(v); // OK, we're good!
}
......@@ -901,7 +901,7 @@ fn some_func(x: &mut i32) {
```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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册