-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Field pattern shorthand can be interpreted as an item reference #42876
Copy link
Copy link
Open
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
B { X }is a shorthand forB { X: X }andXhere can be intepreted as an item reference, rather than a binding. I don't know if this is actually a bug or not. Possible fixes are:Xbe interpreted as a binding and let it fail to compile (due to local-global shadowing).Bar!is printed.rustc 1.20.0-nightly (ab5bec255 2017-06-22)