Rollup merge of #48403 - lukaslueg:casted, r=steveklabnik

Fix spelling s/casted/cast/

r? @GuillaumeGomez
This commit is contained in:
kennytm 2018-03-06 16:25:28 +08:00 committed by GitHub
commit 43de95ca5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 18 deletions

View file

@ -12,9 +12,9 @@
fn main() {
const XYZ: char = 0x1F888 as char;
//~^ ERROR only u8 can be casted into char
//~^ ERROR only u8 can be cast into char
const XY: char = 129160 as char;
//~^ ERROR only u8 can be casted into char
//~^ ERROR only u8 can be cast into char
const ZYX: char = '\u{01F888}';
println!("{}", XYZ);
}

View file

@ -1,4 +1,4 @@
error: only u8 can be casted into char
error: only u8 can be cast into char
--> $DIR/cast_char.rs:14:23
|
LL | const XYZ: char = 0x1F888 as char;
@ -10,7 +10,7 @@ note: lint level defined here
LL | #![deny(overflowing_literals)]
| ^^^^^^^^^^^^^^^^^^^^
error: only u8 can be casted into char
error: only u8 can be cast into char
--> $DIR/cast_char.rs:16:22
|
LL | const XY: char = 129160 as char;

View file

@ -5,7 +5,7 @@ LL | println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as
| ---------- ^ --------- interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the casted value: `(a as usize)`
| help: try comparing the cast value: `(a as usize)`
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:17:33
@ -14,7 +14,7 @@ LL | println!("{}{}", a as usize < long_name, long_name);
| ---------- ^ -------------------- interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the casted value: `(a as usize)`
| help: try comparing the cast value: `(a as usize)`
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:19:31
@ -23,7 +23,7 @@ LL | println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start
| ---------- ^ - interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the casted value: `(a as usize)`
| help: try comparing the cast value: `(a as usize)`
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:21:31
@ -32,7 +32,7 @@ LL | println!("{}{}", a: usize < long_name, long_name);
| -------- ^ -------------------- interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the casted value: `(a: usize)`
| help: try comparing the cast value: `(a: usize)`
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:23:29
@ -41,7 +41,7 @@ LL | println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start o
| -------- ^ - interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the casted value: `(a: usize)`
| help: try comparing the cast value: `(a: usize)`
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
--> $DIR/issue-22644.rs:28:20
@ -50,7 +50,7 @@ LL | < //~ ERROR `<` is interpreted as a start of generic
| ^ not interpreted as comparison
LL | 4);
| - interpreted as generic arguments
help: try comparing the casted value
help: try comparing the cast value
|
LL | println!("{}", (a
LL | as
@ -64,7 +64,7 @@ LL | < //~ ERROR `<` is interpreted as a start of generic
| ^ not interpreted as comparison
LL | 5);
| - interpreted as generic arguments
help: try comparing the casted value
help: try comparing the cast value
|
LL | println!("{}", (a
LL |
@ -81,7 +81,7 @@ LL | println!("{}", a as usize << long_name); //~ ERROR `<` is interpreted a
| ---------- ^^ --------- interpreted as generic arguments
| | |
| | not interpreted as shift
| help: try shifting the casted value: `(a as usize)`
| help: try shifting the cast value: `(a as usize)`
error: expected type, found `4`
--> $DIR/issue-22644.rs:42:28

View file

@ -5,7 +5,7 @@ LL | $i as u32 < 0 //~ `<` is interpreted as a start of generic argument
| --------- ^ - interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the casted value: `($i as u32)`
| help: try comparing the cast value: `($i as u32)`
...
LL | is_plainly_printable!(c);
| ------------------------- in this macro invocation