mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 15:40:42 +00:00
16 lines
256 B
Rust
16 lines
256 B
Rust
#![warn(clippy::as_pointer_underscore)]
|
|
#![crate_type = "lib"]
|
|
#![no_std]
|
|
|
|
struct S;
|
|
|
|
fn f(s: &S) -> usize {
|
|
&s as *const _ as usize
|
|
//~^ as_pointer_underscore
|
|
}
|
|
|
|
fn g(s: &mut S) -> usize {
|
|
s as *mut _ as usize
|
|
//~^ as_pointer_underscore
|
|
}
|