mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
chore: apply AST HasAttrs->AstLike changes
This commit is contained in:
parent
83cbdf64be
commit
a1dc57ace1
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1285,7 +1285,6 @@ dependencies = [
|
||||
"regex",
|
||||
"rustc-ap-rustc_ast",
|
||||
"rustc-ap-rustc_ast_pretty",
|
||||
"rustc-ap-rustc_attr",
|
||||
"rustc-ap-rustc_data_structures",
|
||||
"rustc-ap-rustc_errors",
|
||||
"rustc-ap-rustc_expand",
|
||||
|
@ -72,9 +72,9 @@ version = "709.0.0"
|
||||
package = "rustc-ap-rustc_ast_pretty"
|
||||
version = "709.0.0"
|
||||
|
||||
[dependencies.rustc_attr]
|
||||
package = "rustc-ap-rustc_attr"
|
||||
version = "708.0.0"
|
||||
# [dependencies.rustc_attr]
|
||||
# package = "rustc-ap-rustc_attr"
|
||||
# version = "708.0.0"
|
||||
|
||||
[dependencies.rustc_data_structures]
|
||||
package = "rustc-ap-rustc_data_structures"
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! Format attributes and meta items.
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::attr::HasAttrs;
|
||||
use rustc_ast::AstLike;
|
||||
use rustc_span::{symbol::sym, Span, Symbol};
|
||||
|
||||
use self::doc_comment::DocCommentFormatter;
|
||||
|
@ -4,7 +4,7 @@ use std::collections::HashMap;
|
||||
use std::io::{self, Write};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::{ast, AstLike};
|
||||
use rustc_span::Span;
|
||||
|
||||
use self::newline_style::apply_newline_style;
|
||||
|
@ -3,8 +3,8 @@ use std::collections::BTreeMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::attr::HasAttrs;
|
||||
use rustc_ast::visit::Visitor;
|
||||
use rustc_ast::AstLike;
|
||||
use rustc_span::symbol::{self, sym, Symbol};
|
||||
use rustc_span::Span;
|
||||
use thiserror::Error;
|
||||
@ -54,7 +54,7 @@ impl<'a> Module<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> HasAttrs for Module<'a> {
|
||||
impl<'a> AstLike for Module<'a> {
|
||||
fn attrs(&self) -> &[ast::Attribute] {
|
||||
&self.inner_attr
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::rc::Rc;
|
||||
|
||||
use rustc_ast::{ast, attr::HasAttrs, token::DelimToken, visit};
|
||||
use rustc_ast::{ast, token::DelimToken, visit, AstLike};
|
||||
use rustc_span::{symbol, BytePos, Pos, Span, DUMMY_SP};
|
||||
|
||||
use crate::attr::*;
|
||||
|
Loading…
Reference in New Issue
Block a user