Skip to content

Commit 15f8ffe

Browse files
committed
Fix formatting
1 parent 8aa2553 commit 15f8ffe

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

Diff for: 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
}

Diff for: 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
};

Diff for: compiler/rustc_expand/src/build.rs

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

680687
// Builds `#[outer(inner)]`.
681688
pub fn attr_nested_word(&self, outer: Symbol, inner: Symbol, span: Span) -> ast::Attribute {
682689
let g = &self.sess.psess.attr_id_generator;
683-
attr::mk_attr_nested_word(g, ast::AttrStyle::Outer, ast::Safety::Default, outer, inner, span)
690+
attr::mk_attr_nested_word(
691+
g,
692+
ast::AttrStyle::Outer,
693+
ast::Safety::Default,
694+
outer,
695+
inner,
696+
span,
697+
)
684698
}
685699
}

Diff for: 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() {

Diff for: 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)