Sign in
rust
/
rust-clippy
/
refs/heads/stable
/
.
/
tests
/
ui
/
borrow_and_ref_as_ptr.fixed
blob: b7ee4c6165a782e7b55a40269fb71a321b742249 [
file
] [
log
] [
blame
] [
edit
]
// Make sure that `ref_as_ptr` is not emitted when `borrow_as_ptr` is.
#![warn(clippy::ref_as_ptr, clippy::borrow_as_ptr)]
fn f
<
T
>(
_
:
T
)
{}
fn main
()
{
let
mut val
=
0
;
f
(&
raw
const
val
);
//~^ borrow_as_ptr
f
(&
raw mut val
);
//~^ borrow_as_ptr
}