File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -240,8 +240,8 @@ check_doc_attribute (const AST::Attribute &attribute)
240
240
{
241
241
rust_error_at (
242
242
attribute.get_locus (),
243
- // FIXME: Improve error message here. Rustc has a very good one
244
- " %<#[doc]%> cannot be an empty attribute " );
243
+ " valid forms for the attribute are "
244
+ " %<#[doc(hidden|inline|...) ]%> and %<#[doc = \" string \" ]%> " );
245
245
return ;
246
246
}
247
247
826
826
AttributeChecker::visit (AST::Trait &trait)
827
827
{
828
828
check_proc_macro_non_function (trait.get_outer_attrs ());
829
+ check_attributes (trait.get_outer_attrs ());
829
830
}
830
831
831
832
void
Original file line number Diff line number Diff line change
1
+ // { dg-error "valid forms for the attribute are ...doc.hidden.inline....... and ...doc = . string ..." "" { target *-*-* } .+1 }
2
+ #[ doc]
3
+ trait MyTrait { }
You can’t perform that action at this time.
0 commit comments