Commit Graph

4400 Commits

Author SHA1 Message Date
rchaser53
bbbc1e86eb refrect topecongiro reviews
- &Vec<syntax::ast::PathSegment> => &[ast::PathSegment]
    - remove unnecessary implements
    - transfer skip logic to inside rewrite_macro
    - fix test
    - use util methods in libsyntax
    - use meta_item_list directly
    - avoid no_entry.rs for test using module system
    - add logic to skip rustfmt::skip::macros only
    - remove base_skip_macro_names
    - remove Rc
    - use clone to append skip_macro_names
2019-03-21 21:45:39 +09:00
topecongiro
b6dac248ec Release 1.1.1 2019-03-21 20:33:47 +09:00
Seiichi Uchida
94b381f1cc
Merge pull request #3464 from topecongiro/issue-3463
Avoid duplication on the presence of spaces between macro name and !
2019-03-21 20:32:29 +09:00
topecongiro
017e491a17 Avoid duplication on the presence of spaces between macro name and ! 2019-03-21 15:58:39 +09:00
Seiichi Uchida
0732cd69b9
Merge pull request #3462 from stjepang/fix-async-formatting
Fix formatting of async blocks
2019-03-21 15:37:25 +09:00
Stjepan Glavina
1fa06ecf1e Fix formatting of async blocks 2019-03-20 18:18:02 +01:00
rchaser53
558a2c3512 add explanation for rustfmt::skip::macros 2019-03-21 00:19:52 +09:00
rchaser53
f493a59783 use RefCell and Rc 2019-03-21 00:19:52 +09:00
rchaser53
1f8553d66f add new attribute rustfmt::skip::macros
add test for function not having attribute
2019-03-21 00:18:51 +09:00
Seiichi Uchida
393d7217ae
Merge pull request #3460 from scampi/ci-integration-head
show the HEAD of the integration branch to faciliate reproducing an error with rustfmt
2019-03-20 21:37:10 +09:00
Stéphane Campinas
ee90de5746
show the HEAD of the integration branch to faciliate reproducing an error with rustfmt 2019-03-20 10:16:41 +01:00
Stéphane Campinas
54262daff2
Merge pull request #3458 from topecongiro/issue-3457
Avoid panic on macro inside deeply nested block
2019-03-19 22:13:08 +01:00
Stéphane Campinas
cdd08da27b
fix line numbering in missed spans and handle file_lines in edge cases
- a leading/trailing newline character in missed spans was throwing off the
  start/end of ranges used to compare against file_lines
- fix handling of file_lines when closing a block

Close #3442
2019-03-19 10:19:45 +01:00
Seiichi Uchida
c9479de9a7 Avoid panic on macro inside deeply nested block
Closes #3457.
2019-03-19 10:50:44 +09:00
topecongiro
1427e4c20b Release 1.1.0 2019-03-17 14:06:23 +09:00
Seiichi Uchida
f048fc0fde
Merge pull request #3448 from topecongiro/use-new_sub_parser_from_file
Support path clarity module even when we start from internal module
2019-03-17 14:04:11 +09:00
Seiichi Uchida
ad6d89842a
Merge pull request #3453 from scampi/issue-3423
remove trailing whitespaces in missing spans
2019-03-17 14:01:49 +09:00
Stéphane Campinas
be0ada27f4 Add comment which refers to an issue on nightly-only test
Co-Authored-By: topecongiro <seuchida@gmail.com>
2019-03-17 12:33:18 +09:00
topecongiro
7fc4e418bf Tweak test settings 2019-03-17 12:33:18 +09:00
topecongiro
d0e96ed331 Do not look for external modules when the input is from stdin 2019-03-17 12:33:18 +09:00
topecongiro
92f57211c1 Support path-clarity submodule 2019-03-17 12:33:13 +09:00
topecongiro
bde77714e6 Disable self_tests on beta channel 2019-03-17 12:21:57 +09:00
topecongiro
9d281b44c3 Add a test for #3427 2019-03-17 12:21:21 +09:00
Stéphane Campinas
2d5bc69475
remove trailing whitespaces in missing spans 2019-03-16 12:23:02 +01:00
Seiichi Uchida
ce5cccc32c
Update rustc-ap-* crates to 407.0.0 (#3447) 2019-03-14 22:50:53 +09:00
Seiichi Uchida
331a0500ce
Merge pull request #3441 from rchaser53/const-generics
implement for const generics
2019-03-14 22:50:20 +09:00
Stéphane Campinas
be5ffc3abe
Merge pull request #3444 from daxpedda/patch-1
Additional info to default value of edition.
2019-03-13 21:42:41 +01:00
daxpedda
cfd1811a24
Additional info to default value of edition. 2019-03-13 15:46:34 +01:00
rchaser53
f0c861bfa9 implement for const generics 2019-03-13 03:58:23 +09:00
Seiichi Uchida
5f3dfe6c51
Format the if expression at the end of the block in a single line (#3338) 2019-03-11 23:18:43 +09:00
Seiichi Uchida
4f3a353278
Merge pull request #3440 from rchaser53/issue-3439
fix 'Ident of macro+ident gets duplicated' error
2019-03-10 23:29:29 +09:00
rchaser53
40ff078abf fix 'Ident of macro+ident gets duplicated' error 2019-03-10 22:58:34 +09:00
Seiichi Uchida
06fc39f905
Merge pull request #3424 from Xanewok/modified-lines-for-stdin
Support EmitMode::ModifiedLines with stdin input
2019-03-05 20:54:50 +09:00
Seiichi Uchida
a4da1e9466
Merge pull request #3430 from rchaser53/no-arg-with-comment
fix not to remove comment in the case of no arg
2019-03-05 20:43:11 +09:00
Igor Matuszewski
fbfda614be Remove redundant closure 2019-03-04 18:32:58 +01:00
Igor Matuszewski
6b993c8b8b Fix stdin_works... test on Windows 2019-03-04 18:28:25 +01:00
Igor Matuszewski
8aa0f44d15 Remove eprintln 2019-03-04 18:19:30 +01:00
Igor Matuszewski
b3c28dba83 Expose ModifiedLines and implement parsing data from the string output
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-04 18:19:30 +01:00
Igor Matuszewski
0437bf7a7d Allow for stdin input in EmitMode::ModifiedLines 2019-03-04 18:19:30 +01:00
rchaser53
8e3ef3e3a9 fix not to remove comment in the case of no arg 2019-03-05 00:18:33 +09:00
Seiichi Uchida
51af195473
Merge pull request #3415 from rchaser53/issue-3198
fix the comment for self are swallowed
2019-03-04 21:01:30 +09:00
Stéphane Campinas
51778090fc
Merge pull request #3425 from scampi/futures-rs
move futures-rs repo back into the required tests
2019-03-04 10:46:32 +01:00
rchaser53
dec3902076 leave post comment for self 2019-03-02 17:33:43 +09:00
Stéphane Campinas
c3fcebf3e4
move futures-rs integration back into required tests 2019-03-01 10:23:27 +01:00
Nick Cameron
693d2d9ca0
Update README.md
Update the Appveyor badge
2019-02-28 08:44:59 +13:00
rchaser53
ae7330eea4 leave pre comment for self 2019-02-24 22:05:08 +09:00
Stéphane Campinas
6a75feedac
Merge pull request #3409 from rchaser53/issue-3343
add config inline_attribute_width
2019-02-23 13:16:23 +01:00
rchaser53
be7b3ba2e2 apply inline_attribute_width for extern crate 2019-02-23 13:46:41 +09:00
rchaser53
e68044f8bc add a section to Configuration.md
- attributes => attribute
2019-02-23 13:46:32 +09:00
rchaser53
0e408bf83c add config inline_attribute_width
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-23 13:40:11 +09:00