-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
RFC: replace the type keyword #5752
Comments
+1 |
As long as we're bikeshedding type declarations, I want to register that I don't find the different uses of |
As things stand, |
nominating for backwards compat. if we're going to do this, we need to decide to do it. if not, close. |
(Incidentally, I'm not in favour of adding |
closing as WONTFIX |
Move range_minus_one to pedantic This moves the range_minus_one lint to the pedantic category, so there will not be any warnings emitted by default. This should work around problems where the suggestion is impossible to resolve due to the range consumer only accepting a specific range implementation, rather than the `RangeBounds` trait (see rust-lang#3307). While it is possible to work around this by extracting the boundary into a variable, I don't think clippy should encourage people to disable or work around lints, but instead the lints should be fixable. So hopefully this will help until a proper implementation checks what the range is used for. *Please keep the line below* changelog: move [`range_minus_one`] to pedantic
Rollup of 5 pull requests Successful merges: - rust-lang#5443 (Some accuracy lints for floating point operations) - rust-lang#5752 (Move range_minus_one to pedantic) - rust-lang#5756 (unnecessary_sort_by: avoid linting if key borrows) - rust-lang#5784 (Fix out of bounds access by checking length equality BEFORE accessing by index.) - rust-lang#5786 (fix phrase in new_lint issue template) Failed merges: r? @ghost changelog: rollup
Calling this
type
is very confusing and has led to many newcomers thinking that it makes a new type when really it's just to save on typing (ha!) by making an alias.I'm tempted to say it should just be like C++11 where you can do this:
If it's not feasible to extend
use
this way, calling italias
would still really be an improvement.The text was updated successfully, but these errors were encountered: