]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/cstring.stderr
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / cstring.stderr
index 0e90f6963574100590f9d7b32c2e803037bcb0cc..d2968eb9d180e7447bf5efc1fdbc1f9be7eacfef 100644 (file)
@@ -1,16 +1,16 @@
 error: you are getting the inner pointer of a temporary `CString`
--> $DIR/cstring.rs:7:5
-  |
-7 |     CString::new("foo").unwrap().as_ptr();
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  |
-  = note: #[deny(temporary_cstring_as_ptr)] on by default
-  = note: that pointer will be invalid outside this expression
 --> $DIR/cstring.rs:16:5
+   |
+LL |     CString::new("foo").unwrap().as_ptr();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: #[deny(clippy::temporary_cstring_as_ptr)] on by default
+   = note: that pointer will be invalid outside this expression
 help: assign the `CString` to a variable to extend its lifetime
--> $DIR/cstring.rs:7:5
-  |
-7 |     CString::new("foo").unwrap().as_ptr();
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 --> $DIR/cstring.rs:16:5
+   |
+LL |     CString::new("foo").unwrap().as_ptr();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error