rust/tests/ui/useful_asref.rs
2024-09-25 13:52:12 -04:00

15 lines
217 B
Rust

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