Skip to content

Impl only use #2951

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

Merged
merged 6 commits into from
Aug 24, 2018
Merged

Impl only use #2951

merged 6 commits into from
Aug 24, 2018

Conversation

max-sixty
Copy link
Contributor

Would close #2887

  • This is the only meaningful change
  • Is this too hacky? I can't find a type of the relevant '_' Symbol or anything more than its name to match on. Its span is Span { lo: BytePos(0), hi: BytePos(0), ctxt: #0 }
  • Would there have been a more focused way to test this rather than the system test? The existing unit tests do no rewriting - they don't access a Context object (which I didn't easily see how to create)
  • I cleaned up some other bits when working my way through the code. LMK if you want to retain

@max-sixty
Copy link
Contributor Author

The integration tests have a couple of failures; I think unrelated. For example:

Diff in /Users/maximilian/workspace/rustfmt/rand/src/rngs/entropy.rs at line 290:
         all(target_arch = "wasm32", feature = "stdweb"),
         all(target_arch = "wasm32", feature = "wasm-bindgen"),
     ),
-),))]
+)))]
 type Os = NoSource;

 type Custom = NoSource;

...which I think is https://github.com/rust-random/rand/blob/master/src/rngs/entropy.rs?utf8=%E2%9C%93#L261 (although not exactly the same file...)

@topecongiro
Copy link
Contributor

Thank you for the PR!

I think that this is good enough. The compiler does not always provide enough information for rustfmt.

@topecongiro topecongiro merged commit 10512a5 into rust-lang:master Aug 24, 2018
@max-sixty max-sixty deleted the impl-only-use branch August 24, 2018 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustfmt eats _ in underscore_imports (a.k.a. impl-only-use)
2 participants