mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
90b994b883
The next commit will bring back `enum DepKind` and there would be a variant `DepKind::dep_kind`. This makes it impossible to have a variable named `dep_kind`, because the `bindings_with_variant_name` lint is overzealous. For this code: ``` let dep_kind = DepKind::dep_kind; ``` the lint will give this error: ``` pattern binding `dep_kind` is named the same as one of the variants of the type `DepKind` ``` This is arguably a bug in the lint. To work around it, this commit renames the `dep_kind` query as `crate_dep_kind`. It is a better name anyway given that `DepKind` and `CrateDepKind` are different things.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.