]> git.lizzy.rs Git - rust.git/commitdiff
Fix rustfmt error / Add comment for tab character
authorPhilipp Hansch <dev@phansch.net>
Sat, 10 Apr 2021 12:43:52 +0000 (14:43 +0200)
committerPhilipp Hansch <dev@phansch.net>
Sat, 10 Apr 2021 12:43:52 +0000 (14:43 +0200)
tests/ui/crashes/ice-5835.rs
tests/ui/crashes/ice-5835.stderr

index 209a5b1eb095661071d60c1ab721afc549bc81a8..5e99cb432b6e2f2232fa20462aa0fd93dbcb65b6 100644 (file)
@@ -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,
 }
 
index e286bc580adb459bc59207924c908e1b34b44643..c972bcb60a0cdba58c021f22479930ed7ba4f786 100644 (file)
@@ -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`.