rust/tests/ui/semicolon_outside_block.stderr
y21 65eb1ec0fb remove the semicolon for builtin macro call statements in statement_outside_block
The expansion of `asm!()` and `line!()` is not marked as from an expansion, in which case `SourceMap::stmt_span` returns the input span unchanged. So instead of using `stmt_span`, use `mac_call_stmt_semi_span` directly
2024-10-20 19:00:55 +02:00

84 lines
1.9 KiB
Plaintext

error: consider moving the `;` outside the block for consistent formatting
--> tests/ui/semicolon_outside_block.rs:41:5
|
LL | { unit_fn_block(); }
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::semicolon-outside-block` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::semicolon_outside_block)]`
help: put the `;` here
|
LL - { unit_fn_block(); }
LL + { unit_fn_block() };
|
error: consider moving the `;` outside the block for consistent formatting
--> tests/ui/semicolon_outside_block.rs:42:5
|
LL | unsafe { unit_fn_block(); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: put the `;` here
|
LL - unsafe { unit_fn_block(); }
LL + unsafe { unit_fn_block() };
|
error: consider moving the `;` outside the block for consistent formatting
--> tests/ui/semicolon_outside_block.rs:51:5
|
LL | / {
LL | | unit_fn_block();
LL | | unit_fn_block();
LL | | }
| |_____^
|
help: put the `;` here
|
LL ~ unit_fn_block()
LL ~ };
|
error: consider moving the `;` outside the block for consistent formatting
--> tests/ui/semicolon_outside_block.rs:61:5
|
LL | { m!(()); }
| ^^^^^^^^^^^
|
help: put the `;` here
|
LL - { m!(()); }
LL + { m!(()) };
|
error: consider moving the `;` outside the block for consistent formatting
--> tests/ui/semicolon_outside_block.rs:83:5
|
LL | / unsafe {
LL | | std::arch::asm!("");
LL | | }
| |_____^
|
help: put the `;` here
|
LL ~ std::arch::asm!("")
LL ~ };
|
error: consider moving the `;` outside the block for consistent formatting
--> tests/ui/semicolon_outside_block.rs:87:5
|
LL | / {
LL | | line!();
LL | | }
| |_____^
|
help: put the `;` here
|
LL ~ line!()
LL ~ };
|
error: aborting due to 6 previous errors