mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			560 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			560 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// run-rustfix
 | 
						|
 | 
						|
#![allow(dead_code)]
 | 
						|
#![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() {}
 |