Skip to content

Commit 0b9ccce

Browse files
chore: apply AST HasAttrs->AstLike changes
1 parent afb3c67 commit 0b9ccce

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/formatting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use std::time::{Duration, Instant};
44

5-
use rustc_ast::{ast, attr::HasAttrs};
5+
use rustc_ast::{ast, AstLike};
66
use rustc_span::symbol;
77

88
pub(crate) use syntux::session::ParseSess;

src/formatting/attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Format attributes and meta items.
22
33
use rustc_ast::ast;
4-
use rustc_ast::attr::HasAttrs;
4+
use rustc_ast::AstLike;
55
use rustc_span::{symbol::sym, Span, Symbol};
66

77
use crate::config::{lists::*, IndentStyle};

src/formatting/modules.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::collections::BTreeMap;
33
use std::path::{Path, PathBuf};
44

55
use rustc_ast::ast;
6-
use rustc_ast::attr::HasAttrs;
76
use rustc_ast::visit::Visitor;
7+
use rustc_ast::AstLike;
88
use rustc_span::symbol::{self, sym, Symbol};
99
use rustc_span::Span;
1010
use thiserror::Error;
@@ -97,7 +97,7 @@ impl<'a> Module<'a> {
9797
}
9898
}
9999

100-
impl<'a> HasAttrs for Module<'a> {
100+
impl<'a> AstLike for Module<'a> {
101101
fn attrs(&self) -> &[ast::Attribute] {
102102
&self.inner_attr
103103
}

src/formatting/visitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::cell::{Cell, RefCell};
22
use std::rc::Rc;
33

4-
use rustc_ast::{ast, attr::HasAttrs, token::DelimToken, visit};
4+
use rustc_ast::{ast, token::DelimToken, visit, AstLike};
55
use rustc_span::{symbol, BytePos, Pos, Span, DUMMY_SP};
66

77
use crate::config::{BraceStyle, Config};

0 commit comments

Comments
 (0)