Skip to content

Commit 317258c

Browse files
committed
Fix tidy and remove unused method
1 parent a93f176 commit 317258c

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

src/libsyntax/parse/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ impl<'a> Parser<'a> {
648648
let cm = self.sess.codemap();
649649
match (cm.lookup_line(self.span.lo()), cm.lookup_line(sp.lo())) {
650650
(Ok(ref a), Ok(ref b)) if a.line == b.line => {
651-
// When the spans are in the same line, it means that the only content between
652-
// them is whitespace, point only at the found token.
651+
// When the spans are in the same line, it means that the only content
652+
// between them is whitespace, point only at the found token.
653653
err.span_label(self.span, label_exp);
654654
}
655655
_ => {

src/test/compile-fail/associated-types-unsized.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ trait Get {
1414
}
1515

1616
fn foo<T:Get>(t: T) {
17-
let x = t.get(); //~ ERROR `<T as Get>::Value` does not have a constant size known at compile-time
17+
let x = t.get(); //~ ERROR `<T as Get>::Value` does not have a constant size known at
1818
}
1919

2020
fn main() {

src/test/compile-fail/issue-24446.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
fn main() {
1212
static foo: Fn() -> u32 = || -> u32 {
1313
//~^ ERROR: mismatched types
14-
//~| ERROR: `std::ops::Fn() -> u32 + 'static` does not have a constant size known at compile-time
14+
//~| ERROR: `std::ops::Fn() -> u32 + 'static` does not have a constant size known at
1515
0
1616
};
1717
}

src/test/compile-fail/trait-bounds-not-on-bare-trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait Foo {
1515
// This should emit the less confusing error, not the more confusing one.
1616

1717
fn foo(_x: Foo + Send) {
18-
//~^ ERROR `Foo + std::marker::Send + 'static` does not have a constant size known at compile-time
18+
//~^ ERROR `Foo + std::marker::Send + 'static` does not have a constant size known at
1919
}
2020

2121
fn main() { }

src/test/ui/mismatched_types/cast-rfc0401.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn main()
6060

6161
let _ = 42usize as *const [u8]; //~ ERROR is invalid
6262
let _ = v as *const [u8]; //~ ERROR cannot cast
63-
let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at compile-time
63+
let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at
6464
let _ = foo as *const str; //~ ERROR is invalid
6565
let _ = foo as *mut str; //~ ERROR is invalid
6666
let _ = main as *mut str; //~ ERROR is invalid

src/test/ui/mismatched_types/cast-rfc0401.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ LL | let _ = cf as *const Bar; //~ ERROR is invalid
219219
error[E0277]: `[u8]` does not have a constant size known at compile-time
220220
--> $DIR/cast-rfc0401.rs:63:13
221221
|
222-
LL | let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at compile-time
222+
LL | let _ = fat_v as *const Foo; //~ ERROR `[u8]` does not have a constant size known at
223223
| ^^^^^ `[u8]` does not have a constant size known at compile-time
224224
|
225225
= help: the trait `std::marker::Sized` is not implemented for `[u8]`

src/test/ui/trivial-bounds-leak.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ LL | fn cant_return_str() -> str { //~ ERROR
55
| ^^^ `str` does not have a constant size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `str`
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized>
89
= note: the return type of a function must have a statically known size
910

1011
error[E0599]: no method named `test` found for type `i32` in the current scope

0 commit comments

Comments
 (0)