File tree Expand file tree Collapse file tree
compiler/rustc_feature/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,23 +135,23 @@ impl AttributeTemplate {
135135
136136 if self . word {
137137 debug_assert ! ( macro_call. is_empty( ) , "Macro suggestions use list style" ) ;
138- suggestions. push ( format ! ( "{maybe_unsafe_start}{start }{name}{end}{maybe_unsafe_end }" ) ) ;
138+ suggestions. push ( format ! ( "{start}{maybe_unsafe_start }{name}{maybe_unsafe_end}{end }" ) ) ;
139139 }
140140 if let Some ( descr) = self . list {
141141 for descr in descr {
142142 suggestions. push ( format ! (
143- "{maybe_unsafe_start}{start }{name}{macro_call}({descr}){end}{maybe_unsafe_end }"
143+ "{start}{maybe_unsafe_start }{name}{macro_call}({descr}){maybe_unsafe_end}{end }"
144144 ) ) ;
145145 }
146146 }
147147 suggestions. extend ( self . one_of . iter ( ) . map ( |& word| {
148- format ! ( "{maybe_unsafe_start}{start }{name}({word}){end}{maybe_unsafe_end }" )
148+ format ! ( "{start}{maybe_unsafe_start }{name}({word}){maybe_unsafe_end}{end }" )
149149 } ) ) ;
150150 if let Some ( descr) = self . name_value_str {
151151 debug_assert ! ( macro_call. is_empty( ) , "Macro suggestions use list style" ) ;
152152 for descr in descr {
153153 suggestions. push ( format ! (
154- "{maybe_unsafe_start}{start }{name} = \" {descr}\" {end}{maybe_unsafe_end }"
154+ "{start}{maybe_unsafe_start }{name} = \" {descr}\" {maybe_unsafe_end}{end }"
155155 ) ) ;
156156 }
157157 }
Original file line number Diff line number Diff line change @@ -159,9 +159,8 @@ LL | #[unsafe(export_name)]
159159 |
160160help: must be of the form
161161 |
162- LL - #[unsafe(export_name)]
163- LL + #[export_name = "name"]
164- |
162+ LL | #[unsafe(export_name = "name")]
163+ | ++++++++
165164
166165error: `rustc_allow_const_fn_unstable` expects a list of feature names
167166 --> $DIR/malformed-attrs.rs:31:1
@@ -330,7 +329,7 @@ LL | #[unsafe(naked())]
330329help: must be of the form
331330 |
332331LL - #[unsafe(naked())]
333- LL + #[naked]
332+ LL + #[unsafe( naked) ]
334333 |
335334
336335error[E0565]: malformed `track_caller` attribute input
@@ -651,7 +650,7 @@ LL | #[unsafe(ffi_pure = 1)]
651650help: must be of the form
652651 |
653652LL - #[unsafe(ffi_pure = 1)]
654- LL + #[ffi_pure]
653+ LL + #[unsafe( ffi_pure) ]
655654 |
656655
657656error[E0539]: malformed `link_ordinal` attribute input
@@ -677,7 +676,7 @@ LL | #[unsafe(ffi_const = 1)]
677676help: must be of the form
678677 |
679678LL - #[unsafe(ffi_const = 1)]
680- LL + #[ffi_const]
679+ LL + #[unsafe( ffi_const) ]
681680 |
682681
683682error[E0539]: malformed `linkage` attribute input
You can’t perform that action at this time.
0 commit comments