mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			380 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			380 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
#[used]
 | 
						|
static FOO: u32 = 0; // OK
 | 
						|
 | 
						|
#[used] //~ ERROR attribute must be applied to a `static` variable
 | 
						|
fn foo() {}
 | 
						|
 | 
						|
#[used] //~ ERROR attribute must be applied to a `static` variable
 | 
						|
struct Foo {}
 | 
						|
 | 
						|
#[used] //~ ERROR attribute must be applied to a `static` variable
 | 
						|
trait Bar {}
 | 
						|
 | 
						|
#[used] //~ ERROR attribute must be applied to a `static` variable
 | 
						|
impl Bar for Foo {}
 | 
						|
 | 
						|
fn main() {}
 |