diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 4045053283e9..398d2f04d0f0 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -648,8 +648,8 @@ impl<'a> Parser<'a> { let cm = self.sess.codemap(); match (cm.lookup_line(self.span.lo()), cm.lookup_line(sp.lo())) { (Ok(ref a), Ok(ref b)) if a.line == b.line => { - // When the spans are in the same line, it means that the only content between - // them is whitespace, point only at the found token. + // When the spans are in the same line, it means that the only content + // between them is whitespace, point only at the found token. err.span_label(self.span, label_exp); } _ => { diff --git a/src/test/compile-fail/associated-types-unsized.rs b/src/test/compile-fail/associated-types-unsized.rs index 8c0ce26b294d..29aa96147459 100644 --- a/src/test/compile-fail/associated-types-unsized.rs +++ b/src/test/compile-fail/associated-types-unsized.rs @@ -14,7 +14,7 @@ trait Get { } fn foo(t: T) { - let x = t.get(); //~ ERROR `::Value` does not have a constant size known at compile-time + let x = t.get(); //~ ERROR `::Value` does not have a constant size known at } fn main() { diff --git a/src/test/compile-fail/issue-24446.rs b/src/test/compile-fail/issue-24446.rs index 5f36bbcf5fd6..cef68dd811bc 100644 --- a/src/test/compile-fail/issue-24446.rs +++ b/src/test/compile-fail/issue-24446.rs @@ -11,7 +11,7 @@ fn main() { static foo: Fn() -> u32 = || -> u32 { //~^ ERROR: mismatched types - //~| ERROR: `std::ops::Fn() -> u32 + 'static` does not have a constant size known at compile-time + //~| ERROR: `std::ops::Fn() -> u32 + 'static` does not have a constant size known at 0 }; } diff --git a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs index effee4a70f34..fbf233573939 100644 --- a/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs +++ b/src/test/compile-fail/trait-bounds-not-on-bare-trait.rs @@ -15,7 +15,7 @@ trait Foo { // This should emit the less confusing error, not the more confusing one. fn foo(_x: Foo + Send) { - //~^ ERROR `Foo + std::marker::Send + 'static` does not have a constant size known at compile-time + //~^ ERROR `Foo + std::marker::Send + 'static` does not have a constant size known at } fn main() { } diff --git a/src/test/ui/mismatched_types/cast-rfc0401.rs b/src/test/ui/mismatched_types/cast-rfc0401.rs index 7ec9593d2dec..67aa8f89ddf9 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.rs +++ b/src/test/ui/mismatched_types/cast-rfc0401.rs @@ -60,7 +60,7 @@ fn main() let _ = 42usize as *const [u8]; //~ ERROR is invalid let _ = v as *const [u8]; //~ ERROR cannot cast - let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at compile-time + let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at let _ = foo as *const str; //~ ERROR is invalid let _ = foo as *mut str; //~ ERROR is invalid let _ = main as *mut str; //~ ERROR is invalid diff --git a/src/test/ui/mismatched_types/cast-rfc0401.stderr b/src/test/ui/mismatched_types/cast-rfc0401.stderr index 70914ded9609..a5992cd68027 100644 --- a/src/test/ui/mismatched_types/cast-rfc0401.stderr +++ b/src/test/ui/mismatched_types/cast-rfc0401.stderr @@ -219,7 +219,7 @@ LL | let _ = cf as *const Bar; //~ ERROR is invalid error[E0277]: `[u8]` does not have a constant size known at compile-time --> $DIR/cast-rfc0401.rs:63:13 | -LL | let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at compile-time +LL | let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at | ^^^^^ `[u8]` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `[u8]` diff --git a/src/test/ui/trivial-bounds-leak.stderr b/src/test/ui/trivial-bounds-leak.stderr index d54414110b1f..6f1f885a5068 100644 --- a/src/test/ui/trivial-bounds-leak.stderr +++ b/src/test/ui/trivial-bounds-leak.stderr @@ -5,6 +5,7 @@ LL | fn cant_return_str() -> str { //~ ERROR | ^^^ `str` does not have a constant size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `str` + = note: to learn more, visit = note: the return type of a function must have a statically known size error[E0599]: no method named `test` found for type `i32` in the current scope