We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#![feature(more_qualified_paths)] struct Struct {} trait Trait { type Type; } impl Trait for Struct { type Type = Self; } fn main() { let _ = <Struct as Trait>::Type {}; }
As of current master (7b8303d), cargo run --bin rustfmt -- repro.rs --emit=stdout creates the following diff:
cargo run --bin rustfmt -- repro.rs --emit=stdout
- let _ = <Struct as Trait>::Type {}; + let _ = Trait::Type {};
which fails to compile:
error[E0223]: ambiguous associated type --> repro.rs:14:13 | 14 | let _ = Trait::Type {}; | ^^^^^^^^^^^ help: use fully-qualified syntax: `<Type as Trait>::Type`
The text was updated successfully, but these errors were encountered:
Thanks for submitting this report.
I actually worked on something similar not too long ago so I'll push a PR to fix this soon!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
As of current master (7b8303d),
cargo run --bin rustfmt -- repro.rs --emit=stdout
creates the following diff:which fails to compile:
The text was updated successfully, but these errors were encountered: