Skip to content

Commit a1dc57a

Browse files
chore: apply AST HasAttrs->AstLike changes
1 parent 83cbdf6 commit a1dc57a

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ version = "709.0.0"
7272
package = "rustc-ap-rustc_ast_pretty"
7373
version = "709.0.0"
7474

75-
[dependencies.rustc_attr]
76-
package = "rustc-ap-rustc_attr"
77-
version = "708.0.0"
75+
# [dependencies.rustc_attr]
76+
# package = "rustc-ap-rustc_attr"
77+
# version = "708.0.0"
7878

7979
[dependencies.rustc_data_structures]
8080
package = "rustc-ap-rustc_data_structures"

src/attr.rs

Lines changed: 1 addition & 1 deletion
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 self::doc_comment::DocCommentFormatter;

src/formatting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashMap;
44
use std::io::{self, Write};
55
use std::time::{Duration, Instant};
66

7-
use rustc_ast::ast;
7+
use rustc_ast::{ast, AstLike};
88
use rustc_span::Span;
99

1010
use self::newline_style::apply_newline_style;

src/modules.rs

Lines changed: 2 additions & 2 deletions
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;
@@ -54,7 +54,7 @@ impl<'a> Module<'a> {
5454
}
5555
}
5656

57-
impl<'a> HasAttrs for Module<'a> {
57+
impl<'a> AstLike for Module<'a> {
5858
fn attrs(&self) -> &[ast::Attribute] {
5959
&self.inner_attr
6060
}

src/visitor.rs

Lines changed: 1 addition & 1 deletion
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::attr::*;

0 commit comments

Comments
 (0)