Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--skip-children not working? #2796

Closed
nrc opened this issue Jun 19, 2018 · 2 comments
Closed

--skip-children not working? #2796

nrc opened this issue Jun 19, 2018 · 2 comments
Labels
bug Panic, non-idempotency, invalid code, etc.

Comments

@nrc
Copy link
Member

nrc commented Jun 19, 2018

[santiago@archlinux rust1 (diagnostic-suggest-drop-in-reverse)]$ git status
On branch diagnostic-suggest-drop-in-reverse
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   src/librustc_mir/borrow_check/error_reporting.rs
    modified:   src/librustc_mir/borrow_check/nll/explain_borrow/mod.rs

no changes added to commit (use "git add" and/or "git commit -a")
[santiago@archlinux rust1 (diagnostic-suggest-drop-in-reverse)]$ rustfmt --skip-children src/librustc/mir/mod.rs
[santiago@archlinux rust1 (diagnostic-suggest-drop-in-reverse)]$ git status
On branch diagnostic-suggest-drop-in-reverse
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   src/librustc/mir/cache.rs
    modified:   src/librustc/mir/interpret/error.rs
    modified:   src/librustc/mir/interpret/mod.rs
    modified:   src/librustc/mir/interpret/value.rs
    modified:   src/librustc/mir/mod.rs
    modified:   src/librustc/mir/mono.rs
    modified:   src/librustc/mir/tcx.rs
    modified:   src/librustc/mir/traversal.rs
    modified:   src/librustc/mir/visit.rs
    modified:   src/librustc_mir/borrow_check/error_reporting.rs
    modified:   src/librustc_mir/borrow_check/nll/explain_borrow/mod.rs

no changes added to commit (use "git add" and/or "git commit -a")
@nrc nrc added the bug Panic, non-idempotency, invalid code, etc. label Jun 19, 2018
@topecongiro
Copy link
Contributor

You need to pass --unstable-features as well.

@topecongiro
Copy link
Contributor

I think rustfmt should warn users when unstable options are passed without --unstable-features.

@nrc nrc added the p-high label Jun 24, 2018
@nrc nrc added this to the 1.0 milestone Jun 24, 2018
@nrc nrc removed the p-high label Jul 10, 2018
@nrc nrc modified the milestones: 1.0 (preview 2), 1.0 (rc) Jul 10, 2018
@nrc nrc closed this as completed in d438741 Jul 30, 2018
dwijnand added a commit to dwijnand/cargo that referenced this issue Aug 9, 2018
rustfmt's --skip-children is now behind --unstable-features
(rust-lang/rustfmt#2796) which only works on nightly rustfmt, so
change the install instructions too.
bors added a commit to rust-lang/cargo that referenced this issue Aug 10, 2018
Fix rustfmt instructions in CONTRIBUTING.md

rustfmt's --skip-children is now behind --unstable-features
(rust-lang/rustfmt#2796) which only works on nightly rustfmt, so
change the install instructions too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

2 participants