rust/tests/ui/useful_asref.rs
2019-01-08 21:46:39 +01:00

14 lines
179 B
Rust

#![deny(clippy::useless_asref)]
trait Trait {
fn as_ptr(&self);
}
impl<'a> Trait for &'a [u8] {
fn as_ptr(&self) {
self.as_ref().as_ptr();
}
}
fn main() {}