File tree Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,13 @@ impl AttributeExt for Attribute {
217
217
_ => None ,
218
218
}
219
219
}
220
+ }
220
221
221
- fn style ( & self ) -> AttrStyle {
222
+ impl Attribute {
223
+ pub fn style ( & self ) -> AttrStyle {
222
224
self . style
223
225
}
224
- }
225
226
226
- impl Attribute {
227
227
pub fn may_have_doc_links ( & self ) -> bool {
228
228
self . doc_str ( ) . is_some_and ( |s| comments:: may_have_doc_links ( s. as_str ( ) ) )
229
229
}
@@ -826,8 +826,6 @@ pub trait AttributeExt: Debug {
826
826
/// commented module (for inner doc) vs within its parent module (for outer
827
827
/// doc).
828
828
fn doc_resolution_scope ( & self ) -> Option < AttrStyle > ;
829
-
830
- fn style ( & self ) -> AttrStyle ;
831
829
}
832
830
833
831
// FIXME(fn_delegation): use function delegation instead of manually forwarding
@@ -902,8 +900,4 @@ impl Attribute {
902
900
pub fn doc_str_and_comment_kind ( & self ) -> Option < ( Symbol , CommentKind ) > {
903
901
AttributeExt :: doc_str_and_comment_kind ( self )
904
902
}
905
-
906
- pub fn style ( & self ) -> AttrStyle {
907
- AttributeExt :: style ( self )
908
- }
909
903
}
Original file line number Diff line number Diff line change @@ -1207,6 +1207,14 @@ pub enum Attribute {
1207
1207
}
1208
1208
1209
1209
impl Attribute {
1210
+ pub fn style ( & self ) -> AttrStyle {
1211
+ match & self {
1212
+ Attribute :: Unparsed ( u) => u. style ,
1213
+ Attribute :: Parsed ( AttributeKind :: DocComment { style, .. } ) => * style,
1214
+ _ => panic ! ( ) ,
1215
+ }
1216
+ }
1217
+
1210
1218
pub fn get_normal_item ( & self ) -> & AttrItem {
1211
1219
match & self {
1212
1220
Attribute :: Unparsed ( normal) => & normal,
@@ -1355,15 +1363,6 @@ impl AttributeExt for Attribute {
1355
1363
_ => None ,
1356
1364
}
1357
1365
}
1358
-
1359
- #[ inline]
1360
- fn style ( & self ) -> AttrStyle {
1361
- match & self {
1362
- Attribute :: Unparsed ( u) => u. style ,
1363
- Attribute :: Parsed ( AttributeKind :: DocComment { style, .. } ) => * style,
1364
- _ => panic ! ( ) ,
1365
- }
1366
- }
1367
1366
}
1368
1367
1369
1368
// FIXME(fn_delegation): use function delegation instead of manually forwarding
@@ -1452,11 +1451,6 @@ impl Attribute {
1452
1451
pub fn doc_str_and_comment_kind ( & self ) -> Option < ( Symbol , CommentKind ) > {
1453
1452
AttributeExt :: doc_str_and_comment_kind ( self )
1454
1453
}
1455
-
1456
- #[ inline]
1457
- pub fn style ( & self ) -> AttrStyle {
1458
- AttributeExt :: style ( self )
1459
- }
1460
1454
}
1461
1455
1462
1456
/// Attributes owned by a HIR owner.
You can’t perform that action at this time.
0 commit comments