]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/string_lit_as_bytes.stderr
Avoid reporting string_lit_as_bytes for long strings
[rust.git] / tests / ui / string_lit_as_bytes.stderr
index f51cd71a6dc26186f75d95ba28ab59ff23bc2d89..59aaec75bd2213fc2180386182833dd0a50ad163 100644 (file)
@@ -9,11 +9,11 @@ LL |     let bs = "hello there".as_bytes();
 error: calling `as_bytes()` on a string literal
   --> $DIR/string_lit_as_bytes.rs:9:14
    |
-LL |     let bs = r###"raw string with three ### in it and some " ""###.as_bytes();
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `br###"raw string with three ### in it and some " ""###`
+LL |     let bs = r###"raw string with 3# plus " ""###.as_bytes();
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `br###"raw string with 3# plus " ""###`
 
 error: calling `as_bytes()` on `include_str!(..)`
-  --> $DIR/string_lit_as_bytes.rs:16:22
+  --> $DIR/string_lit_as_bytes.rs:17:22
    |
 LL |     let includestr = include_str!("entry.rs").as_bytes();
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `include_bytes!(..)` instead: `include_bytes!("entry.rs")`