1 error: you are getting the inner pointer of a temporary `CString`
2 --> $DIR/cstring.rs:7:5
4 LL | CString::new("foo").unwrap().as_ptr();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `#[deny(clippy::temporary_cstring_as_ptr)]` on by default
8 = note: that pointer will be invalid outside this expression
9 help: assign the `CString` to a variable to extend its lifetime
10 --> $DIR/cstring.rs:7:5
12 LL | CString::new("foo").unwrap().as_ptr();
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: aborting due to previous error