]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-temporary-cstring-as-ptr.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / lint / lint-temporary-cstring-as-ptr.rs
1 // this program is not technically incorrect, but is an obscure enough style to be worth linting
2 #![deny(temporary_cstring_as_ptr)]
3
4 use std::ffi::CString;
5
6 fn main() {
7     let s = CString::new("some text").unwrap().as_ptr();
8     //~^ ERROR getting the inner pointer of a temporary `CString`
9 }