diff options
| author | David Tolnay <dtolnay@gmail.com> | 2025-06-20 11:52:24 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2025-06-21 11:09:13 -0700 |
| commit | 86f40acce3ba62845642fb972e5a28191eb27c8a (patch) | |
| tree | 1f970357556d5368b39dabe53313ddbcd170a8c3 /compiler/rustc_ast/src | |
| parent | e51c37c34c3f576a2e1b7b3d5f0bd5d993c87d24 (diff) | |
| download | rust-86f40acce3ba62845642fb972e5a28191eb27c8a.tar.gz rust-86f40acce3ba62845642fb972e5a28191eb27c8a.zip | |
Remove style() from AttributeExt trait
Diffstat (limited to 'compiler/rustc_ast/src')
| -rw-r--r-- | compiler/rustc_ast/src/attr/mod.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/compiler/rustc_ast/src/attr/mod.rs b/compiler/rustc_ast/src/attr/mod.rs index 755bd3577ea..44865c493b3 100644 --- a/compiler/rustc_ast/src/attr/mod.rs +++ b/compiler/rustc_ast/src/attr/mod.rs @@ -217,13 +217,13 @@ impl AttributeExt for Attribute { _ => None, } } +} - fn style(&self) -> AttrStyle { +impl Attribute { + pub fn style(&self) -> AttrStyle { self.style } -} -impl Attribute { pub fn may_have_doc_links(&self) -> bool { self.doc_str().is_some_and(|s| comments::may_have_doc_links(s.as_str())) } @@ -826,8 +826,6 @@ pub trait AttributeExt: Debug { /// commented module (for inner doc) vs within its parent module (for outer /// doc). fn doc_resolution_scope(&self) -> Option<AttrStyle>; - - fn style(&self) -> AttrStyle; } // FIXME(fn_delegation): use function delegation instead of manually forwarding @@ -902,8 +900,4 @@ impl Attribute { pub fn doc_str_and_comment_kind(&self) -> Option<(Symbol, CommentKind)> { AttributeExt::doc_str_and_comment_kind(self) } - - pub fn style(&self) -> AttrStyle { - AttributeExt::style(self) - } } |
