about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-03-04Fix stdin_works... test on WindowsIgor Matuszewski-3/+3
2019-03-04Remove eprintlnIgor Matuszewski-2/+0
2019-03-04Expose ModifiedLines and implement parsing data from the string outputIgor Matuszewski-63/+150
This moves `Modified{Chunks,Lines}` from `src/formatting.rs` to `src/rustfmt_diff.rs` and reexports it in `src/lib.rs`. With this, a conversion from `Vec<Mismatch>` to `ModifiedLines` was implemented and now this implements complementary `Display` and `FromStr`, which simplified the previously used `output_modified` function and which allows to parse the raw data emitted with `EmitMode::ModifiedLines`.
2019-03-04Allow for stdin input in EmitMode::ModifiedLinesIgor Matuszewski-27/+80
2019-03-02leave post comment for selfrchaser53-31/+42
2019-02-24leave pre comment for selfrchaser53-2/+14
2019-02-23apply inline_attribute_width for extern craterchaser53-3/+18
2019-02-23add config inline_attribute_widthrchaser53-2/+21
If the line width is width within config width, attribute is inline. I don't want to change default rustfmt behavior, so config default value is 0. - fix description - fix test comment - remove unnecessary clone - remove unnecessary test file - fix test for β version - attributes => attribute
2019-02-19Various cosmetic improvements (#3403)Alexander Regueiro-565/+167
2019-02-15Merge pull request #3334 from rchaser53/issue-3227Stéphane Campinas-3/+5
fix Inconsistency between loop and while
2019-02-14Merge pull request #3401 from topecongiro/rustcapSeiichi Uchida-0/+3
Cargo update
2019-02-14Cargo updatetopecongiro-0/+3
Update `rustc-ap-*` crates to 373.0.0.
2019-02-14version/2: Align loop and while formattingrchaser53-3/+5
The loop and while formatting was diverting as `loop` was not being moved to a new, indented block, as `while` was. This commit fixes this inconsistency but pins it to version 2 to avoid changing existing code.
2019-02-12Format visibility on trait aliastopecongiro-1/+4
2019-02-11Merge pull request #3335 from h-michael/rust-2018Seiichi Uchida-329/+353
Rust 2018 idioms
2019-02-11Handle a macro argument with a single keywordtopecongiro-9/+94
Closes #3331.
2019-02-11Merge pull request #3326 from scampi/issue-3302Seiichi Uchida-7/+17
fix formatting of strings within a macro
2019-02-09remove unneeded Version importStéphane Campinas-1/+1
2019-02-09cargo fmtHirokazu Hata-12/+50
2019-02-09Fix rust_2018_idioms warningsHirokazu Hata-299/+299
2019-02-09deny rust_2018_idiomsHirokazu Hata-0/+2
2019-02-09cargo +nightly fix --edition-idiomsHirokazu Hata-30/+14
2019-02-08Merge pull request #3325 from topecongiro/rustcapSeiichi Uchida-45/+25
Update rustc-ap-* crates to 366.0.0
2019-02-07fix review commentsEvgenii-1/+1
2019-02-07fix formatting of strings within a macroStéphane Campinas-8/+18
2019-02-06Fix how we get span of the PathSegment separatorSeiichi Uchida-2/+8
2019-02-06Cargo updatetopecongiro-43/+17
- Update `rustc-ap-*` crates to 366.0.0 - Update the other crates to the latest stable
2019-02-06calculate statement first line properlyEvgenii-10/+30
2019-02-05Merge pull request #3318 from rchaser53/issue-3314Seiichi Uchida-1/+5
fix Removed indentation after nested comments error
2019-02-05fix Removed indentation after nested comments errorrchaser53-1/+5
2019-02-04transition to Rust 2018Evgenii-293/+310
2019-02-04Merge pull request #3308 from topecongiro/issue-2835Seiichi Uchida-42/+39
Prioritize single_line_fn and empty_item_single_line over brace_style
2019-02-04Merge pull request #3311 from rchaser53/issue-3295Seiichi Uchida-2/+6
fix "internal error: left behind trailing whitespace" with long lines
2019-02-01fix "internal error: left behind trailing whitespace" with long linesrchaser53-2/+6
2019-02-01Prioritize single_line_fn and empty_item_single_line over brace_styletopecongiro-42/+39
When either one of these two options are set to `true`, each should take precedence over the brace_style option. This commit does not introduce any formatting change to the default configuration, so no version gate is required.
2019-01-31Do not force trailing comma when using mixed layouttopecongiro-3/+0
2019-01-30Merge pull request #3298 from topecongiro/issue-3272Seiichi Uchida-6/+18
Use the same rule between function and macro
2019-01-28Use the same rule with macro and function calls with a single chaintopecongiro-0/+7
2019-01-28Avoid putting a long macro call in a single linetopecongiro-6/+11
2019-01-27Merge pull request #3293 from scampi/issue-3241Seiichi Uchida-4/+20
Keep leading colons for global paths
2019-01-27Also look in home directory for global config.Mara Bos-1/+8
2019-01-27Look for a global rustfmt.toml.Mara Bos-1/+12
If no rustfmt.toml is found in the usual way, the directory 'rustfmt' in the user's config directory is checked. - $XDG_CONFIG_HOME/rustfmt/ (or $HOME/.config/rustfmt/), or - $HOME/Library/Preferences/rustfmt/ on Mac, or - %AppData%\rustfmt\ on Windows.
2019-01-27fix glob and nested global importsStéphane Campinas-0/+9
2019-01-27Merge pull request #3294 from rchaser53/issue-3278Seiichi Uchida-5/+23
change new line point in the case of no args
2019-01-27Apply rustfmt::skip on imports (#3289)Seiichi Uchida-3/+5
2019-01-27add the version gate to the code and testrchaser53-6/+18
2019-01-27update dependenciesMatthias Krüger-1/+6
update itertools from 0.7 to 0.8 update env_logger from 0.5 to 0.6 update cargo_metadata from 0.6 to 0.7 update bytecount from 0.4 to 0.5
2019-01-26change new line point in the case of no argsrchaser53-2/+8
2019-01-23keep leading double-colon to respect the 2018 edition of rust's pathsStéphane Campinas-4/+11
2019-01-17Merge pull request #3284 from scampi/issue-3270Nick Cameron-20/+82
recognize strings inside comments in order to avoid indenting them