]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-temporary-cstring-as-param.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[rust.git] / src / test / ui / lint / lint-temporary-cstring-as-param.rs
1 #![deny(temporary_cstring_as_ptr)]
2
3 use std::ffi::CString;
4 use std::os::raw::c_char;
5
6 fn some_function(data: *const c_char) {}
7
8 fn main() {
9     some_function(CString::new("").unwrap().as_ptr());
10     //~^ ERROR getting the inner pointer of a temporary `CString`
11 }