Skip to main content

Module attr

Module attr 

Source
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ยง

MetaVisitor ๐Ÿ”’

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.