Expand description
Format attributes and meta items.
Re-exportsยง
use rustc_ast::HasAttrs;๐use rustc_ast::ast;๐use rustc_span::Span;๐use rustc_span::symbol::sym;๐use tracing::debug;๐use self::doc_comment::DocCommentFormatter;๐use crate::comment::CommentStyle;๐use crate::comment::contains_comment;๐use crate::comment::rewrite_doc_comment;๐use crate::config::IndentStyle;๐use crate::expr::rewrite_literal;๐use crate::lists::ListFormatting;๐use crate::lists::Separator;๐use crate::lists::definitive_tactic;๐use crate::lists::itemize_list;๐use crate::lists::write_list;๐use crate::overflow;๐use crate::rewrite::Rewrite;๐use crate::rewrite::RewriteContext;๐use crate::rewrite::RewriteError;๐use crate::rewrite::RewriteErrorExt;๐use crate::rewrite::RewriteResult;๐use crate::shape::Shape;๐use crate::source_map::SpanUtils;๐use crate::types::PathContext;๐use crate::types::rewrite_path;๐use crate::utils::count_newlines;๐use crate::utils::mk_sp;๐use crate::config::lists::*;๐
Modulesยง
- doc_
comment ๐
Traitsยง
- Meta
Visitor ๐
Functionsยง
- argument_
shape ๐ - attr_
prefix ๐ - filter_
inline_ ๐attrs - Returns attributes that are within
outer_span. - format_
derive ๐ - get_
attrs_ ๐from_ stmt - Returns attributes on the given statement.
- get_
span_ ๐without_ attrs - has_
newlines_ ๐before_ after_ comment - is_
derive ๐ - rewrite_
initial_ ๐doc_ comments - Rewrite the any doc comments which come before any other attributes.
- take_
while_ ๐with_ pred - Returns the first group of attributes that fills the given predicate. We consider two doc comments are in different group if they are separated by normal comments.