diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index ef31c8c5f3c..daa5312229e 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -810,7 +810,7 @@ impl Vid for TyVid { } impl ToStr for TyVid { - fn to_str(&self) -> ~str { format!("", self.to_uint()) } + fn to_str(&self) -> ~str { format!("", self.to_uint()) } } impl Vid for IntVid { @@ -818,7 +818,7 @@ impl Vid for IntVid { } impl ToStr for IntVid { - fn to_str(&self) -> ~str { format!("", self.to_uint()) } + fn to_str(&self) -> ~str { format!("", self.to_uint()) } } impl Vid for FloatVid { @@ -826,7 +826,7 @@ impl Vid for FloatVid { } impl ToStr for FloatVid { - fn to_str(&self) -> ~str { format!("", self.to_uint()) } + fn to_str(&self) -> ~str { format!("", self.to_uint()) } } impl Vid for RegionVid { diff --git a/src/test/compile-fail/issue-3680.rs b/src/test/compile-fail/issue-3680.rs index b453384c0c8..de2165ff633 100644 --- a/src/test/compile-fail/issue-3680.rs +++ b/src/test/compile-fail/issue-3680.rs @@ -10,6 +10,6 @@ fn main() { match None { - Err(_) => () //~ ERROR mismatched types: expected `std::option::Option<>` but found `std::result::Result<,>` + Err(_) => () //~ ERROR mismatched types: expected `std::option::Option<>` but found `std::result::Result<,>` } } diff --git a/src/test/compile-fail/issue-4968.rs b/src/test/compile-fail/issue-4968.rs index 700d8a61c3a..5739f3dc46b 100644 --- a/src/test/compile-fail/issue-4968.rs +++ b/src/test/compile-fail/issue-4968.rs @@ -12,5 +12,5 @@ static A: (int,int) = (4,2); fn main() { - match 42 { A => () } //~ ERROR mismatched types: expected `` but found `(int,int)` (expected integral variable but found tuple) + match 42 { A => () } //~ ERROR mismatched types: expected `` but found `(int,int)` (expected integral variable but found tuple) } diff --git a/src/test/compile-fail/slightly-nice-generic-literal-messages.rs b/src/test/compile-fail/slightly-nice-generic-literal-messages.rs new file mode 100644 index 00000000000..6e5dc7cc102 --- /dev/null +++ b/src/test/compile-fail/slightly-nice-generic-literal-messages.rs @@ -0,0 +1,19 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +struct Foo(T); + +fn main() { + match Foo(1.1) { + 1 => {} + //~^ ERROR expected `Foo<,>` but found `` + } + +}