diff --git a/src/config.rs b/src/config.rs index ecb63851417..51daa7a505a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -335,7 +335,8 @@ create_config! { verbose: bool, false, "Use verbose output"; skip_children: bool, false, "Don't reformat out of line modules"; file_lines: FileLines, FileLines::all(), - "Lines to format"; + "Lines to format; this is not supported in rustfmt.toml, and can only be specified \ + via the --file-lines option"; max_width: usize, 100, "Maximum width of each line"; ideal_width: usize, 80, "Ideal width of each line"; tab_spaces: usize, 4, "Number of spaces per tab"; diff --git a/src/file_lines.rs b/src/file_lines.rs index 9c60821a3bb..28fedad4cfd 100644 --- a/src/file_lines.rs +++ b/src/file_lines.rs @@ -181,7 +181,8 @@ impl JsonSpan { // for `FileLines`, so it will just panic instead. impl rustc_serialize::Decodable for FileLines { fn decode(_: &mut D) -> Result { - unimplemented!(); + panic!("FileLines cannot be deserialized from a project rustfmt.toml file: please \ + specify it via the `--file-lines` option instead"); } }