1
Fork 0

Fix tidy and remove unused method

This commit is contained in:
Esteban Küber 2018-06-09 19:00:32 -07:00
parent a93f176b74
commit 317258c1ce
7 changed files with 8 additions and 7 deletions

View file

@ -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);
}
_ => {

View file

@ -14,7 +14,7 @@ trait Get {
}
fn foo<T:Get>(t: T) {
let x = t.get(); //~ ERROR `<T as Get>::Value` does not have a constant size known at compile-time
let x = t.get(); //~ ERROR `<T as Get>::Value` does not have a constant size known at
}
fn main() {

View file

@ -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
};
}

View file

@ -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() { }

View file

@ -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

View file

@ -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]`

View file

@ -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 <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
= 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