summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/useful_asref.rs
blob: a9f0170a79cd90d27b1ace750d7ea945d50e2d39 (plain)
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() {}