1 2 3 4 5 6 7 8 9 10 11 12 13
#![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() {}