File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
compiler/rustc_expand/src/mbe Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -739,11 +739,8 @@ pub fn compile_declarative_macro(
739739 . emit ( ) ;
740740 }
741741 if unsafe_rule {
742- let err = sess. dcx ( ) . struct_span_err (
743- unsafe_keyword_span,
744- "`unsafe` is only supported on `attr` rules" ,
745- ) ;
746- return dummy_syn_ext ( err. emit ( ) ) ;
742+ sess. dcx ( )
743+ . span_err ( unsafe_keyword_span, "`unsafe` is only supported on `attr` rules" ) ;
747744 }
748745 if let Some ( guar) = check_no_eof ( sess, & p, "expected `()` after `derive`" ) {
749746 return dummy_syn_ext ( guar) ;
@@ -771,11 +768,8 @@ pub fn compile_declarative_macro(
771768 } else {
772769 kinds |= MacroKinds :: BANG ;
773770 if unsafe_rule {
774- let err = sess. dcx ( ) . struct_span_err (
775- unsafe_keyword_span,
776- "`unsafe` is only supported on `attr` rules" ,
777- ) ;
778- return dummy_syn_ext ( err. emit ( ) ) ;
771+ sess. dcx ( )
772+ . span_err ( unsafe_keyword_span, "`unsafe` is only supported on `attr` rules" ) ;
779773 }
780774 ( None , false )
781775 } ;
You can’t perform that action at this time.
0 commit comments