File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed 
compiler/rustc_passes/src 
tests/ui/rfcs/rfc-2091-track-caller Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -722,9 +722,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
722722            // erroneously allowed it and some crates used it accidentally, to be compatible 
723723            // with crates depending on them, we can't throw an error here. 
724724            Target :: Field  | Target :: Arm  | Target :: MacroDef  => { 
725-                 for  attr in  attrs { 
726-                     self . inline_attr_str_error_with_macro_def ( hir_id,  attr. span ( ) ,  "track_caller" ) ; 
727-                 } 
725+                 self . inline_attr_str_error_with_macro_def ( hir_id,  attr_span,  "track_caller" ) ; 
728726            } 
729727            _ => { 
730728                self . dcx ( ) . emit_err ( errors:: TrackedCallerWrongLocation  { 
Original file line number Diff line number Diff line change 1- error: malformed `track_caller` attribute input
1+ error[E0565] : malformed `track_caller` attribute input
22  --> $DIR/error-odd-syntax.rs:1:1
33   |
44LL | #[track_caller(1)]
5-    | ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[track_caller]`
5+    | ^^^^^^^^^^^^^^---^
6+    | |             |
7+    | |             didn't expect any arguments here
8+    | help: must be of the form: `#[track_caller]`
69
710error: aborting due to 1 previous error
811
12+ For more information about this error, try `rustc --explain E0565`.
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments