Skip to main content

Module header

Module header 

Source
Expand description

headers are sets of consecutive keywords and tokens, such as pub const unsafe fn foo and pub(crate) unsafe trait Bar.

This module contains general logic for formatting such headers, where they are always placed on a single line except when there are comments between parts of the header.

Re-exportsยง

use std::borrow::Cow; ๐Ÿ”’
use rustc_ast as ast; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_span::symbol::Ident; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use crate::comment::combine_strs_with_missing_comments; ๐Ÿ”’
use crate::comment::contains_comment; ๐Ÿ”’
use crate::rewrite::RewriteContext; ๐Ÿ”’
use crate::shape::Shape; ๐Ÿ”’
use crate::utils::rewrite_ident; ๐Ÿ”’

Structsยง

HeaderPart ๐Ÿ”’

Functionsยง

format_header ๐Ÿ”’