summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-113808-invalid-unused-qualifications-suggestion.rs
blob: 641c892e3de9a3265b015af38b98c784d07e72a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// run-rustfix

#![deny(unused_qualifications)]
#![feature(unsized_fn_params)]

#[allow(unused_imports)]
use std::ops;
use std::ops::Index;

pub struct A;

impl ops::Index<str> for A {
    //~^ ERROR unnecessary qualification
    type Output = ();
    fn index(&self, _: str) -> &Self::Output {
        &()
    }
}

mod inner {
    pub trait Trait<T> {}
}

// the import needs to be here for the lint to show up
#[allow(unused_imports)]
use inner::Trait;

impl inner::Trait<u8> for () {}
//~^ ERROR unnecessary qualification

fn main() {}