11error: calling `CStr::new` with a byte string literal
2- --> tests/ui/manual_c_str_literals.rs:31 :5
2+ --> tests/ui/manual_c_str_literals.rs:34 :5
33 |
44LL | CStr::from_bytes_with_nul(b"foo\0");
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo"`
@@ -8,73 +8,73 @@ LL | CStr::from_bytes_with_nul(b"foo\0");
88 = help: to override `-D warnings` add `#[allow(clippy::manual_c_str_literals)]`
99
1010error: calling `CStr::new` with a byte string literal
11- --> tests/ui/manual_c_str_literals.rs:35 :5
11+ --> tests/ui/manual_c_str_literals.rs:38 :5
1212 |
1313LL | CStr::from_bytes_with_nul(b"foo\0");
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo"`
1515
1616error: calling `CStr::new` with a byte string literal
17- --> tests/ui/manual_c_str_literals.rs:36 :5
17+ --> tests/ui/manual_c_str_literals.rs:39 :5
1818 |
1919LL | CStr::from_bytes_with_nul(b"foo\x00");
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo"`
2121
2222error: calling `CStr::new` with a byte string literal
23- --> tests/ui/manual_c_str_literals.rs:37 :5
23+ --> tests/ui/manual_c_str_literals.rs:40 :5
2424 |
2525LL | CStr::from_bytes_with_nul(b"foo\0").unwrap();
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo"`
2727
2828error: calling `CStr::new` with a byte string literal
29- --> tests/ui/manual_c_str_literals.rs:38 :5
29+ --> tests/ui/manual_c_str_literals.rs:41 :5
3030 |
3131LL | CStr::from_bytes_with_nul(b"foo\\0sdsd\0").unwrap();
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo\\0sdsd"`
3333
3434error: calling `CStr::from_ptr` with a byte string literal
35- --> tests/ui/manual_c_str_literals.rs:43 :14
35+ --> tests/ui/manual_c_str_literals.rs:46 :14
3636 |
3737LL | unsafe { CStr::from_ptr(b"foo\0".as_ptr().cast()) };
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo"`
3939
4040error: calling `CStr::from_ptr` with a byte string literal
41- --> tests/ui/manual_c_str_literals.rs:44 :14
41+ --> tests/ui/manual_c_str_literals.rs:47 :14
4242 |
4343LL | unsafe { CStr::from_ptr(b"foo\0".as_ptr() as *const _) };
4444 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use a `c""` literal: `c"foo"`
4545
4646error: manually constructing a nul-terminated string
47- --> tests/ui/manual_c_str_literals.rs:45 :23
47+ --> tests/ui/manual_c_str_literals.rs:48 :23
4848 |
4949LL | let _: *const _ = b"foo\0".as_ptr();
5050 | ^^^^^^^^ help: use a `c""` literal: `c"foo"`
5151
5252error: manually constructing a nul-terminated string
53- --> tests/ui/manual_c_str_literals.rs:46 :23
53+ --> tests/ui/manual_c_str_literals.rs:49 :23
5454 |
5555LL | let _: *const _ = "foo\0".as_ptr();
5656 | ^^^^^^^ help: use a `c""` literal: `c"foo"`
5757
5858error: manually constructing a nul-terminated string
59- --> tests/ui/manual_c_str_literals.rs:49 :23
59+ --> tests/ui/manual_c_str_literals.rs:52 :23
6060 |
6161LL | let _: *const _ = b"foo\0".as_ptr().cast::<i8>();
6262 | ^^^^^^^^ help: use a `c""` literal: `c"foo"`
6363
6464error: manually constructing a nul-terminated string
65- --> tests/ui/manual_c_str_literals.rs:52 :13
65+ --> tests/ui/manual_c_str_literals.rs:55 :13
6666 |
6767LL | let _ = "电脑\\\0".as_ptr();
6868 | ^^^^^^^^^^ help: use a `c""` literal: `c"电脑\\"`
6969
7070error: manually constructing a nul-terminated string
71- --> tests/ui/manual_c_str_literals.rs:53 :13
71+ --> tests/ui/manual_c_str_literals.rs:56 :13
7272 |
7373LL | let _ = "电脑\0".as_ptr();
7474 | ^^^^^^^^ help: use a `c""` literal: `c"电脑"`
7575
7676error: manually constructing a nul-terminated string
77- --> tests/ui/manual_c_str_literals.rs:54 :13
77+ --> tests/ui/manual_c_str_literals.rs:57 :13
7878 |
7979LL | let _ = "电脑\x00".as_ptr();
8080 | ^^^^^^^^^^ help: use a `c""` literal: `c"电脑"`
0 commit comments