]> git.lizzy.rs Git - rust.git/blobdiff - src/lib.rs
Update uses of `rustfmt_skip` to `rustfmt::skip`
[rust.git] / src / lib.rs
index 98983da1164a4965a7d3be4069da7417f50dda63..1045841ad0d9003cf31e838556c5e2b1e402c15f 100644 (file)
@@ -8,12 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(custom_attribute)]
+#![feature(tool_attributes)]
 #![feature(decl_macro)]
-// FIXME(cramertj) remove after match_default_bindings merges
-#![allow(stable_features)]
 #![allow(unused_attributes)]
-#![feature(match_default_bindings)]
 #![feature(type_ascription)]
 #![feature(unicode_internals)]
 
@@ -68,8 +65,6 @@
 
 pub type FmtResult<T> = std::result::Result<T, failure::Error>;
 
-pub const WRITE_MODE_LIST: &str = "[replace|overwrite|display|plain|diff|coverage|checkstyle]";
-
 #[macro_use]
 mod utils;
 
@@ -398,7 +393,7 @@ fn format_ast<F>(
     Ok((result, has_diff))
 }
 
-/// Returns true if the line with the given line number was skipped by `#[rustfmt_skip]`.
+/// Returns true if the line with the given line number was skipped by `#[rustfmt::skip]`.
 fn is_skipped_line(line_number: usize, skipped_range: &[(usize, usize)]) -> bool {
     skipped_range
         .iter()
@@ -977,7 +972,7 @@ fn test_format_snippet() {
 
     #[test]
     fn test_format_code_block_fail() {
-        #[rustfmt_skip]
+        #[rustfmt::skip]
         let code_block = "this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(x, y, z);";
         assert!(format_code_block(code_block, &Config::default()).is_none());
     }