Skip to content

Commit d0e7da1

Browse files
committed
Fix formatting
1 parent b09b33d commit d0e7da1

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

compiler/rustc_ast_pretty/src/pprust/state.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,13 @@ pub fn print_crate<'a>(
260260
// root, so this is not needed, and actually breaks things.
261261
if edition.is_rust_2015() {
262262
// `#![no_std]`
263-
let fake_attr =
264-
attr::mk_attr_word(g, ast::AttrStyle::Inner, Safety::Default, sym::no_std, DUMMY_SP);
263+
let fake_attr = attr::mk_attr_word(
264+
g,
265+
ast::AttrStyle::Inner,
266+
Safety::Default,
267+
sym::no_std,
268+
DUMMY_SP,
269+
);
265270
s.print_attribute(&fake_attr);
266271
}
267272
}

compiler/rustc_builtin_macros/src/derive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::cfg_eval::cfg_eval;
22
use crate::errors;
33

44
use rustc_ast as ast;
5-
use rustc_ast::{GenericParamKind, ItemKind, MetaItemKind, NestedMetaItem, StmtKind, Safety};
5+
use rustc_ast::{GenericParamKind, ItemKind, MetaItemKind, NestedMetaItem, Safety, StmtKind};
66
use rustc_expand::base::{
77
Annotatable, DeriveResolution, ExpandResult, ExtCtxt, Indeterminate, MultiItemModifier,
88
};

compiler/rustc_expand/src/build.rs

+16-2
Original file line numberDiff line numberDiff line change
@@ -671,12 +671,26 @@ impl<'a> ExtCtxt<'a> {
671671
// Note: `span` is used for both the identifier and the value.
672672
pub fn attr_name_value_str(&self, name: Symbol, val: Symbol, span: Span) -> ast::Attribute {
673673
let g = &self.sess.psess.attr_id_generator;
674-
attr::mk_attr_name_value_str(g, ast::AttrStyle::Outer, ast::Safety::Default, name, val, span)
674+
attr::mk_attr_name_value_str(
675+
g,
676+
ast::AttrStyle::Outer,
677+
ast::Safety::Default,
678+
name,
679+
val,
680+
span,
681+
)
675682
}
676683

677684
// Builds `#[outer(inner)]`.
678685
pub fn attr_nested_word(&self, outer: Symbol, inner: Symbol, span: Span) -> ast::Attribute {
679686
let g = &self.sess.psess.attr_id_generator;
680-
attr::mk_attr_nested_word(g, ast::AttrStyle::Outer, ast::Safety::Default, outer, inner, span)
687+
attr::mk_attr_nested_word(
688+
g,
689+
ast::AttrStyle::Outer,
690+
ast::Safety::Default,
691+
outer,
692+
inner,
693+
span,
694+
)
681695
}
682696
}

compiler/rustc_passes/src/check_attr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
312312
true
313313
}
314314

315-
316315
/// Checks if `unsafe()` is applied to an invalid attribute.
317316
fn check_unsafe_attr(&self, attr: &Attribute) {
318317
if !attr.is_doc_comment() {

src/librustdoc/clean/cfg/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22

3-
use rustc_ast::{MetaItemLit, Path, StrStyle, Safety};
3+
use rustc_ast::{MetaItemLit, Path, Safety, StrStyle};
44
use rustc_span::create_default_session_globals_then;
55
use rustc_span::symbol::{kw, Ident};
66
use rustc_span::DUMMY_SP;

0 commit comments

Comments
 (0)