mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			692 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			692 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
error: invalid type for `const` operand
 | 
						|
  --> $DIR/const-refs-to-static.rs:10:19
 | 
						|
   |
 | 
						|
LL | global_asm!("{}", const addr_of!(FOO));
 | 
						|
   |                   ^^^^^^-------------
 | 
						|
   |                         |
 | 
						|
   |                         is a `*const u8`
 | 
						|
   |
 | 
						|
   = help: `const` operands must be of an integer type
 | 
						|
 | 
						|
error: invalid type for `const` operand
 | 
						|
  --> $DIR/const-refs-to-static.rs:15:25
 | 
						|
   |
 | 
						|
LL |     unsafe { asm!("{}", const addr_of!(FOO)) };
 | 
						|
   |                         ^^^^^^-------------
 | 
						|
   |                               |
 | 
						|
   |                               is a `*const u8`
 | 
						|
   |
 | 
						|
   = help: `const` operands must be of an integer type
 | 
						|
 | 
						|
error: aborting due to 2 previous errors
 | 
						|
 |