File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 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() {
1414
1515    let strify = stringify!(foobar).as_bytes();
1616
17+     let current_version = env!("CARGO_PKG_VERSION").as_bytes();
18+ 
1719    let includestr = include_bytes!("entry_unfixable.rs");
1820
1921    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() {
1414
1515    let  strify = stringify ! ( foobar) . as_bytes ( ) ; 
1616
17+     let  current_version = env ! ( "CARGO_PKG_VERSION" ) . as_bytes ( ) ; 
18+ 
1719    let  includestr = include_str ! ( "entry_unfixable.rs" ) . as_bytes ( ) ; 
1820
1921    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();
1313   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `br###"raw string with 3# plus " ""###`
1414
1515error: calling `as_bytes()` on `include_str!(..)`
16-   --> $DIR/string_lit_as_bytes.rs:17 :22
16+   --> $DIR/string_lit_as_bytes.rs:19 :22
1717   |
1818LL |     let includestr = include_str!("entry_unfixable.rs").as_bytes();
1919   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `include_bytes!(..)` instead: `include_bytes!("entry_unfixable.rs")`
2020
2121error: 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
2323   |
2424LL |     let _ = "string with newline/t/n".as_bytes();
2525   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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