mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 20:17:50 +00:00
14 lines
315 B
Rust
14 lines
315 B
Rust
//@ check-pass
|
|
|
|
#![deny(temporary_cstring_as_ptr)]
|
|
//~^ WARNING lint `temporary_cstring_as_ptr` has been renamed to `dangling_pointers_from_temporaries`
|
|
|
|
use std::ffi::CString;
|
|
use std::os::raw::c_char;
|
|
|
|
fn some_function(data: *const c_char) {}
|
|
|
|
fn main() {
|
|
some_function(CString::new("").unwrap().as_ptr());
|
|
}
|