Skip to content

Commit

Permalink
Fix rustfmt error / Add comment for tab character
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch committed Apr 10, 2021
1 parent dde46c9 commit 8b9331b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
5 changes: 3 additions & 2 deletions tests/ui/crashes/ice-5835.rs
@@ -1,7 +1,8 @@
#![rustfmt::skip]

#[rustfmt::skip]
pub struct Foo {
/// 位
/// ^ Do not remove this tab character.
/// It was required to trigger the ICE.
pub bar: u8,
}

Expand Down
14 changes: 2 additions & 12 deletions tests/ui/crashes/ice-5835.stderr
@@ -1,20 +1,10 @@
error[E0658]: custom inner attributes are unstable
--> $DIR/ice-5835.rs:1:4
|
LL | #![rustfmt::skip]
| ^^^^^^^^^^^^^
|
= note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
= help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable

error: using tabs in doc comments is not recommended
--> $DIR/ice-5835.rs:4:10
--> $DIR/ice-5835.rs:3:10
|
LL | /// 位
| ^^^^ help: consider using four spaces per tab
|
= note: `-D clippy::tabs-in-doc-comments` implied by `-D warnings`

error: aborting due to 2 previous errors
error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.

0 comments on commit 8b9331b

Please sign in to comment.