File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
compiler/rustc_attr_parsing/src/attributes Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,9 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcClassParser {
169169 return None ;
170170 } ;
171171 let Some ( classname) = nv. value_as_str ( ) else {
172+ // `#[rustc_objc_class = ...]` is expected to be used as an implementatioin detail
173+ // inside a standard library macro, but `cx.expected_string_literal` exposes too much.
174+ // Use a custom error message instead.
172175 cx. emit_err ( ObjcClassExpectedStringLiteral { span : nv. value_span } ) ;
173176 return None ;
174177 } ;
@@ -198,6 +201,9 @@ impl<S: Stage> SingleAttributeParser<S> for ObjcSelectorParser {
198201 return None ;
199202 } ;
200203 let Some ( methname) = nv. value_as_str ( ) else {
204+ // `#[rustc_objc_selector = ...]` is expected to be used as an implementatioin detail
205+ // inside a standard library macro, but `cx.expected_string_literal` exposes too much.
206+ // Use a custom error message instead.
201207 cx. emit_err ( ObjcSelectorExpectedStringLiteral { span : nv. value_span } ) ;
202208 return None ;
203209 } ;
You can’t perform that action at this time.
0 commit comments