Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alic/binding_lint' into 'master'
chore: Enable linting error for `bindings_with_variant_name` Reference for the lint: https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint/builtin/static.BINDINGS_WITH_VARIANT_NAME.html This lint is currently only a warning on our current Rust version. I recommend turning it into an error. The failure can be quite nasty. Consider this example: ```Rust pub enum PayloadType { Summary, Data } // ... later somewhere let x = PayloadType::Data; match x { Summary => println!("summary"), Data => println!("data"), } ``` Now, in the ic repo, the above code will print "summary", because without the fully-qualified path, Summary is just a bound variable (instead of a sum type variant) **This lint is deny-by-default since Rust 1.68.2 ([this MR](rust-lang/rust#104154)), but we're still on an older version. That's why I suggest we enable it pro-actively.** See merge request dfinity-lab/public/ic!12636
- Loading branch information