File tree 3 files changed +6
-2
lines changed
3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ fn str_lit_as_bytes() {
14
14
15
15
let strify = stringify!(foobar).as_bytes();
16
16
17
+ let current_version = env!("CARGO_PKG_VERSION").as_bytes();
18
+
17
19
let includestr = include_bytes!("entry_unfixable.rs");
18
20
19
21
let _ = b"string with newline\t\n";
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ fn str_lit_as_bytes() {
14
14
15
15
let strify = stringify ! ( foobar) . as_bytes ( ) ;
16
16
17
+ let current_version = env ! ( "CARGO_PKG_VERSION" ) . as_bytes ( ) ;
18
+
17
19
let includestr = include_str ! ( "entry_unfixable.rs" ) . as_bytes ( ) ;
18
20
19
21
let _ = "string with newline\t \n " . as_bytes ( ) ;
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ LL | let bs = r###"raw string with 3# plus " ""###.as_bytes();
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `br###"raw string with 3# plus " ""###`
14
14
15
15
error: calling `as_bytes()` on `include_str!(..)`
16
- --> $DIR/string_lit_as_bytes.rs:17 :22
16
+ --> $DIR/string_lit_as_bytes.rs:19 :22
17
17
|
18
18
LL | let includestr = include_str!("entry_unfixable.rs").as_bytes();
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `include_bytes!(..)` instead: `include_bytes!("entry_unfixable.rs")`
20
20
21
21
error: calling `as_bytes()` on a string literal
22
- --> $DIR/string_lit_as_bytes.rs:19 :13
22
+ --> $DIR/string_lit_as_bytes.rs:21 :13
23
23
|
24
24
LL | let _ = "string with newline/t/n".as_bytes();
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"string with newline/t/n"`
You can’t perform that action at this time.
0 commit comments