Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl Test {

fn main() {
let x = Test;
let v = &[0i32];
let v = &[0];

x.method::<i32, i32>(v); // error: only one type parameter is expected!
}
Expand All @@ -398,7 +398,7 @@ impl Test {

fn main() {
let x = Test;
let v = &[0i32];
let v = &[0];

x.method::<i32>(v); // OK, we're good!
}
Expand Down Expand Up @@ -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.
Expand Down