Skip to content

Commit 88f10ef

Browse files
committed
Formatting fixes
1 parent e3c5212 commit 88f10ef

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

crates/rustc_codegen_spirv/src/attr.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,7 @@ impl CheckSpirvAttrVisitor<'_> {
369369
.sess
370370
.struct_span_err(
371371
span,
372-
&format!(
373-
"only one {category} attribute is allowed on a {target}"
374-
),
372+
&format!("only one {category} attribute is allowed on a {target}"),
375373
)
376374
.span_note(prev_span, &format!("previous {category} attribute"))
377375
.emit();

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
11791179
flags: MemFlags,
11801180
) -> Self::Value {
11811181
if flags != MemFlags::empty() {
1182-
self.err(&format!(
1183-
"store_with_flags is not supported yet: {flags:?}"
1184-
));
1182+
self.err(&format!("store_with_flags is not supported yet: {flags:?}"));
11851183
}
11861184
self.store(val, ptr, align)
11871185
}

crates/rustc_codegen_spirv/src/builder/spirv_asm.rs

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> {
6464
const SUPPORTED_OPTIONS: InlineAsmOptions = InlineAsmOptions::NORETURN;
6565
let unsupported_options = options & !SUPPORTED_OPTIONS;
6666
if !unsupported_options.is_empty() {
67-
self.err(&format!(
68-
"asm flags not supported: {unsupported_options:?}"
69-
));
67+
self.err(&format!("asm flags not supported: {unsupported_options:?}"));
7068
}
7169
// vec of lines, and each line is vec of tokens
7270
let mut tokens = vec![vec![]];
@@ -102,10 +100,9 @@ impl<'a, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'tcx> {
102100
span,
103101
} => {
104102
if let Some(modifier) = modifier {
105-
self.tcx.sess.span_err(
106-
span,
107-
format!("asm modifiers are not supported: {modifier}"),
108-
);
103+
self.tcx
104+
.sess
105+
.span_err(span, format!("asm modifiers are not supported: {modifier}"));
109106
}
110107
let line = tokens.last_mut().unwrap();
111108
let typeof_kind = line.last().and_then(|prev| match prev {
@@ -373,9 +370,7 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
373370
}
374371
AsmBlock::End(terminator) => {
375372
if op != Op::Label {
376-
self.err(&format!(
377-
"expected OpLabel after terminator {terminator:?}"
378-
));
373+
self.err(&format!("expected OpLabel after terminator {terminator:?}"));
379374
}
380375

381376
AsmBlock::Open
@@ -1146,9 +1141,7 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
11461141
}
11471142
},
11481143
Some(Token::String(_)) => {
1149-
self.err(&format!(
1150-
"expected a literal, not a string for a {kind:?}"
1151-
));
1144+
self.err(&format!("expected a literal, not a string for a {kind:?}"));
11521145
}
11531146
Some(Token::Placeholder(_, span)) => {
11541147
self.tcx.sess.span_err(
@@ -1339,24 +1332,18 @@ impl<'cx, 'tcx> Builder<'cx, 'tcx> {
13391332
Ok(x) => inst
13401333
.operands
13411334
.push(dr::Operand::RayQueryCommittedIntersectionType(x)),
1342-
Err(()) => self.err(&format!(
1343-
"unknown RayQueryCommittedIntersectionType {word}"
1344-
)),
1335+
Err(()) => self.err(&format!("unknown RayQueryCommittedIntersectionType {word}")),
13451336
},
13461337
(OperandKind::RayQueryCandidateIntersectionType, Some(word)) => match word.parse() {
13471338
Ok(x) => inst
13481339
.operands
13491340
.push(dr::Operand::RayQueryCandidateIntersectionType(x)),
1350-
Err(()) => self.err(&format!(
1351-
"unknown RayQueryCandidateIntersectionType {word}"
1352-
)),
1341+
Err(()) => self.err(&format!("unknown RayQueryCandidateIntersectionType {word}")),
13531342
},
13541343
(kind, None) => match token {
13551344
Token::Word(_) => bug!(),
13561345
Token::String(_) => {
1357-
self.err(&format!(
1358-
"expected a literal, not a string for a {kind:?}"
1359-
));
1346+
self.err(&format!("expected a literal, not a string for a {kind:?}"));
13601347
}
13611348
Token::Placeholder(_, span) => {
13621349
self.tcx.sess.span_err(

0 commit comments

Comments
 (0)