-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rollup of 5 pull requests #84005
Rollup of 5 pull requests #84005
Commits on Jan 5, 2021
-
Fix spacing in docs for
core::pin
by combining consequent code bloc……ks using HTML-syntax.
Configuration menu - View commit details
-
Copy full SHA for d3915c5 - Browse repository at this point
Copy the full SHA d3915c5View commit details -
Exclude single type parameters from links in
core::pin
for more vis……ual consistency.
Configuration menu - View commit details
-
Copy full SHA for ceaeb24 - Browse repository at this point
Copy the full SHA ceaeb24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87ac118 - Browse repository at this point
Copy the full SHA 87ac118View commit details -
Fix broken links to
Drop
that used to point toDrop::drop
due to ……the markdown link definition names being case insensitive.
Configuration menu - View commit details
-
Copy full SHA for e65385f - Browse repository at this point
Copy the full SHA e65385fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 684edf7 - Browse repository at this point
Copy the full SHA 684edf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e0cef7 - Browse repository at this point
Copy the full SHA 3e0cef7View commit details
Commits on Mar 25, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9f6b5de - Browse repository at this point
Copy the full SHA 9f6b5deView commit details -
Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3a4c0a7 - Browse repository at this point
Copy the full SHA 3a4c0a7View commit details -
Auto merge of rust-lang#6961 - xFrednet:changelog-1-52, r=flip1995
Update changelog for 1.52 I've underestimated the work that goes into this a bit, but it just shows that a lot has happened again in Clippy in 1.52 🙃. [Rendered](https://github.com/xFrednet/rust-clippy/blob/changelog-1-52/CHANGELOG.md) --- changelog: none
Configuration menu - View commit details
-
Copy full SHA for f41d68f - Browse repository at this point
Copy the full SHA f41d68fView commit details
Commits on Mar 26, 2021
-
Fix bad suggestion when a reborrow might be required Fix bad suggestion when the value being sliced is a macro call Don't lint inside of a macro due to the previous context sensitive changes
Configuration menu - View commit details
-
Copy full SHA for 0ff68bb - Browse repository at this point
Copy the full SHA 0ff68bbView commit details -
Auto merge of rust-lang#6975 - Jarcho:redundant_slicing_fp, r=llogiq
Improve `redundant_slicing` fixes: rust-lang#6968 changelog: Fix `redundant_slicing` suggestion when a reborrow might be required or when the value is from a macro call
Configuration menu - View commit details
-
Copy full SHA for 63aca96 - Browse repository at this point
Copy the full SHA 63aca96View commit details -
Configuration menu - View commit details
-
Copy full SHA for caa49c8 - Browse repository at this point
Copy the full SHA caa49c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for f231b59 - Browse repository at this point
Copy the full SHA f231b59View commit details -
Configuration menu - View commit details
-
Copy full SHA for dad39b6 - Browse repository at this point
Copy the full SHA dad39b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 494bc8a - Browse repository at this point
Copy the full SHA 494bc8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd1201a - Browse repository at this point
Copy the full SHA bd1201aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 818f832 - Browse repository at this point
Copy the full SHA 818f832View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a1adad - Browse repository at this point
Copy the full SHA 1a1adadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ce9989 - Browse repository at this point
Copy the full SHA 9ce9989View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5279b59 - Browse repository at this point
Copy the full SHA 5279b59View commit details -
Auto merge of rust-lang#6977 - flip1995:or_patterns_msrv, r=llogiq
Add MSRV options to `unnested_or_patterns` changelog: [`unnested_or_patterns`] can now be configured with the `msrv` config/attribute. Fixes rust-lang#6953
Configuration menu - View commit details
-
Copy full SHA for 6f2a6fe - Browse repository at this point
Copy the full SHA 6f2a6feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5351bbf - Browse repository at this point
Copy the full SHA 5351bbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dddfbf - Browse repository at this point
Copy the full SHA 0dddfbfView commit details -
Resolves rust-lang#78302 Update peekable.rs Update library/core/src/iter/traits/iterator.rs Co-authored-by: Ashley Mannix <kodraus@hey.com>
Configuration menu - View commit details
-
Copy full SHA for abcbe54 - Browse repository at this point
Copy the full SHA abcbe54View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e19d40 - Browse repository at this point
Copy the full SHA 4e19d40View commit details
Commits on Mar 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ca7e955 - Browse repository at this point
Copy the full SHA ca7e955View commit details -
format macro argument parsing fix
When the character next to `{}` is "shifted" (when mapping a byte index in the format string to span) we should avoid shifting the span end index, so first map the index of `}` to span, then bump the span, instead of first mapping the next byte index to a span (which causes bumping the end span too much). Regression test added. Fixes rust-lang#83344
Configuration menu - View commit details
-
Copy full SHA for ce4e668 - Browse repository at this point
Copy the full SHA ce4e668View commit details -
len_without_is_empty
improvementsCheck the return type of `len`. Only integral types, or an `Option` or `Result` wrapping one. Ensure the return type of `is_empty` matches. e.g. `Option<usize>` -> `Option<bool>`
Configuration menu - View commit details
-
Copy full SHA for 12985af - Browse repository at this point
Copy the full SHA 12985afView commit details -
Auto merge of rust-lang#6980 - Jarcho:len_without_is_empty_sig, r=llogiq
`len_without_is_empty` improvements fixes: rust-lang#6958 fixes: rust-lang#6972 changelog: Check the return type of `len`. Only integral types, or an `Option` or `Result` wrapping one. changelog: Ensure the return type of `is_empty` matches. e.g. `Option<usize>` -> `Option<bool>`
Configuration menu - View commit details
-
Copy full SHA for dcee00d - Browse repository at this point
Copy the full SHA dcee00dView commit details -
Auto merge of rust-lang#6979 - flip1995:msrv_doc_fix, r=giraffate
Add missing lints to MSRV config doc r? `@giraffate` changelog: Add missing lints to MSRV config doc
Configuration menu - View commit details
-
Copy full SHA for 8e56a2b - Browse repository at this point
Copy the full SHA 8e56a2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for febf34e - Browse repository at this point
Copy the full SHA febf34eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c028de - Browse repository at this point
Copy the full SHA 7c028deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9782fc4 - Browse repository at this point
Copy the full SHA 9782fc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c379165 - Browse repository at this point
Copy the full SHA c379165View commit details -
Configuration menu - View commit details
-
Copy full SHA for add3e50 - Browse repository at this point
Copy the full SHA add3e50View commit details -
Rollup merge of rust-lang#82917 - cuviper:iter-zip, r=m-ou-se
Add function core::iter::zip This makes it a little easier to `zip` iterators: ```rust for (x, y) in zip(xs, ys) {} // vs. for (x, y) in xs.into_iter().zip(ys) {} ``` You can `zip(&mut xs, &ys)` for the conventional `iter_mut()` and `iter()`, respectively. This can also support arbitrary nesting, where it's easier to see the item layout than with arbitrary `zip` chains: ```rust for ((x, y), z) in zip(zip(xs, ys), zs) {} for (x, (y, z)) in zip(xs, zip(ys, zs)) {} // vs. for ((x, y), z) in xs.into_iter().zip(ys).zip(xz) {} for (x, (y, z)) in xs.into_iter().zip((ys.into_iter().zip(xz)) {} ``` It may also format more nicely, especially when the first iterator is a longer chain of methods -- for example: ```rust iter::zip( trait_ref.substs.types().skip(1), impl_trait_ref.substs.types().skip(1), ) // vs. trait_ref .substs .types() .skip(1) .zip(impl_trait_ref.substs.types().skip(1)) ``` This replaces the tuple-pair `IntoIterator` in rust-lang#78204. There is prior art for the utility of this in [`itertools::zip`]. [`itertools::zip`]: https://docs.rs/itertools/0.10.0/itertools/fn.zip.html
Configuration menu - View commit details
-
Copy full SHA for b094bb1 - Browse repository at this point
Copy the full SHA b094bb1View commit details -
redundant_pattern_matching: look inside Refs
look inside refs and detect if let &None = ... Fixes rust-lang/rust-clippy#5396 changelog: redundant_pattern_matching: look inside Refs to fix FNs with "if let &None = .. "
Configuration menu - View commit details
-
Copy full SHA for e006c77 - Browse repository at this point
Copy the full SHA e006c77View commit details
Commits on Mar 28, 2021
-
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see rust-lang/compiler-team#418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
Configuration menu - View commit details
-
Copy full SHA for a57a8c3 - Browse repository at this point
Copy the full SHA a57a8c3View commit details -
Improve
expl_impl_clone_on_copy
Check to see if the generic constraints are the same as if using derive
Configuration menu - View commit details
-
Copy full SHA for 879fa5c - Browse repository at this point
Copy the full SHA 879fa5cView commit details -
Auto merge of rust-lang#6991 - matthiaskrgr:5396, r=giraffate
redundant_pattern_matching: look inside Refs look inside refs and detect if let &None = ... Fixes rust-lang/rust-clippy#5396 changelog: redundant_pattern_matching: look inside Refs to fix FNs with "if let &None = .. "
Configuration menu - View commit details
-
Copy full SHA for 4bcc552 - Browse repository at this point
Copy the full SHA 4bcc552View commit details -
Auto merge of rust-lang#6993 - Jarcho:expl_impl_clone, r=llogiq
Improve `expl_impl_clone_on_copy` fixes: rust-lang#1254 changelog: Check to see if the generic constraints are the same as if using derive for `expl_impl_clone_on_copy`
Configuration menu - View commit details
-
Copy full SHA for c07103b - Browse repository at this point
Copy the full SHA c07103bView commit details
Commits on Mar 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 1f95940 - Browse repository at this point
Copy the full SHA 1f95940View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31afdfc - Browse repository at this point
Copy the full SHA 31afdfcView commit details -
Auto merge of rust-lang#6996 - Y-Nak:missing_panics_doc, r=Manishearth
Allow missing panics doc if the panics occur only when debug-assertions is specified fixes rust-lang#6970 changelog: `missing_panics_doc`: Allow missing panics doc if the panics occur only when `debug-assertions` is specified.
Configuration menu - View commit details
-
Copy full SHA for 0e06b3c - Browse repository at this point
Copy the full SHA 0e06b3cView commit details -
Lint on `_.clone().method()` when method takes self by value Set applicability correctly Correct suggestion when the cloned value is a macro call. e.g. `m!(x).clone()` Don't lint when not using the `Clone` trait
Configuration menu - View commit details
-
Copy full SHA for d265776 - Browse repository at this point
Copy the full SHA d265776View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23508a1 - Browse repository at this point
Copy the full SHA 23508a1View commit details
Commits on Mar 30, 2021
-
Auto merge of rust-lang#7003 - giraffate:use_uppercase_for_msrv, r=ca…
…msteffen Use uppercase for MSRV A follow-up of <https://github.com/rust-lang/rust-clippy/pull/6977/files#diff-dac623e7b9c58138761aa527bf5f026bf113cda5b22eea61e655b44dd113389e> changelog: none
Configuration menu - View commit details
-
Copy full SHA for a521445 - Browse repository at this point
Copy the full SHA a521445View commit details -
Configuration menu - View commit details
-
Copy full SHA for 541c8b8 - Browse repository at this point
Copy the full SHA 541c8b8View commit details -
Auto merge of rust-lang#6990 - Y-Nak:refactor-functions, r=giraffate
Organize functions into functions module Ref: rust-lang#6680 Rearrange lints in `functions`. changelog: none
Configuration menu - View commit details
-
Copy full SHA for 1ddeaa6 - Browse repository at this point
Copy the full SHA 1ddeaa6View commit details -
Auto merge of rust-lang#7000 - Jarcho:clone_on_copy_fp, r=llogiq
Improve `clone_on_copy` This also removes the `clone_on_copy_mut` test as the same thing is covered in the `clone_on_copy` test. changelog: `copy_on_clone` lint on chained method calls taking self by value changelog: `copy_on_clone` only lint when using the `Clone` trait changelog: `copy_on_clone` correct suggestion when the cloned value is a macro call.
Configuration menu - View commit details
-
Copy full SHA for 0552852 - Browse repository at this point
Copy the full SHA 0552852View commit details -
wrong_self_convention: fix FP inside trait impl for
to_*
methodWhen the `to_*` method takes `&self` and it is a trait implementation, we don't trigger the lint.
Configuration menu - View commit details
-
Copy full SHA for 6966c78 - Browse repository at this point
Copy the full SHA 6966c78View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa689f8 - Browse repository at this point
Copy the full SHA fa689f8View commit details -
Auto merge of rust-lang#7004 - Jarcho:manual_map_if_then_else, r=cams…
…teffen Fix `manual_map` at the end of an if chain changelog: Fix `manual_map` suggestion at the end of an if chain
Configuration menu - View commit details
-
Copy full SHA for 44bf60f - Browse repository at this point
Copy the full SHA 44bf60fView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc7f1da - Browse repository at this point
Copy the full SHA cc7f1daView commit details -
Configuration menu - View commit details
-
Copy full SHA for d121b34 - Browse repository at this point
Copy the full SHA d121b34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fcd155 - Browse repository at this point
Copy the full SHA 7fcd155View commit details -
Auto merge of rust-lang#7001 - ebobrow:non-octal-file-permissions, r=…
…Manishearth Add non_octal_unix_permissions lint fixes rust-lang#6934 changelog: add new lint that checks for non-octal values used to set unix file permissions
Configuration menu - View commit details
-
Copy full SHA for 4be72b0 - Browse repository at this point
Copy the full SHA 4be72b0View commit details
Commits on Mar 31, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 45164de - Browse repository at this point
Copy the full SHA 45164deView commit details -
Auto merge of rust-lang#7007 - Y-Nak:result_unit_err, r=giraffate
result_unit_err: Fix typo changelog: result_unit_err: fix typo in a diagnostic message r? `@giraffate` fixes rust-lang/rust-clippy#6990 (comment).
Configuration menu - View commit details
-
Copy full SHA for 0b76719 - Browse repository at this point
Copy the full SHA 0b76719View commit details -
Fix hidden variant suggestion on single variant
Fixes rust-lang#6984
Michael Wright committedMar 31, 2021 Configuration menu - View commit details
-
Copy full SHA for 8abab55 - Browse repository at this point
Copy the full SHA 8abab55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ee1469 - Browse repository at this point
Copy the full SHA 6ee1469View commit details -
Configuration menu - View commit details
-
Copy full SHA for 225f7e0 - Browse repository at this point
Copy the full SHA 225f7e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b438e30 - Browse repository at this point
Copy the full SHA b438e30View commit details -
Auto merge of rust-lang#6938 - Y-Nak:refactor-types, r=flip1995
Refactor types r? `@flip1995` This is the last PR to close rust-lang#6724 🎉 Also, this fixes rust-lang#6936. changelog: `vec_box`: Fix FN in `const` or `static` changelog: `linkedlist`: Fix FN in `const` or `static` changelog: `option_option`: Fix FN in `const` or `static`
Configuration menu - View commit details
-
Copy full SHA for 2e33bf6 - Browse repository at this point
Copy the full SHA 2e33bf6View commit details -
Auto merge of rust-lang#6981 - matthiaskrgr:6803_take_2, r=flip1995
disable upper_case_acronyms for pub items - enum edition Fixes rust-lang/rust-clippy#6803 (again... 😅 ) My previous fix did not work for enums because enum variants were checked separately in the `check_variant` function but it looks like we can't use that because we can't tell if the enum the variants belong to is declared as public or not (it always said `Inherited` for me) I went and special-cased enums and iterated over all the variants "manually", but only, if the enums is not public. --- changelog: fix upper_case_acronyms still firing on public enums (rust-lang#6803)
Configuration menu - View commit details
-
Copy full SHA for 3e42c35 - Browse repository at this point
Copy the full SHA 3e42c35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5029dc8 - Browse repository at this point
Copy the full SHA 5029dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3095253 - Browse repository at this point
Copy the full SHA 3095253View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54a0471 - Browse repository at this point
Copy the full SHA 54a0471View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bb0f16 - Browse repository at this point
Copy the full SHA 5bb0f16View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90cbbb2 - Browse repository at this point
Copy the full SHA 90cbbb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccd7a60 - Browse repository at this point
Copy the full SHA ccd7a60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25d8b94 - Browse repository at this point
Copy the full SHA 25d8b94View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3843171 - Browse repository at this point
Copy the full SHA 3843171View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5543c34 - Browse repository at this point
Copy the full SHA 5543c34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 527fbbe - Browse repository at this point
Copy the full SHA 527fbbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for f2cc995 - Browse repository at this point
Copy the full SHA f2cc995View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1109dc8 - Browse repository at this point
Copy the full SHA 1109dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf1e3f7 - Browse repository at this point
Copy the full SHA bf1e3f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e61f978 - Browse repository at this point
Copy the full SHA e61f978View commit details -
Suggest
flatten
instead ofis_some
->unwrap
Eric Loren committedMar 31, 2021 Configuration menu - View commit details
-
Copy full SHA for 56fbbf7 - Browse repository at this point
Copy the full SHA 56fbbf7View commit details -
Auto merge of rust-lang#6706 - Y-Nak:excessive-for-each, r=camsteffen
New Lint: needless_for_each resolves: rust-lang#6543 changelog: Added pedantic lint: `needless_for_each`
Configuration menu - View commit details
-
Copy full SHA for c1021b8 - Browse repository at this point
Copy the full SHA c1021b8View commit details -
Auto merge of rust-lang#6342 - bbqbaron:issue-6061, r=flip1995
Lint: filter(Option::is_some).map(Option::unwrap) Fixes rust-lang#6061 *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: * add new lint for filter(Option::is_some).map(Option::unwrap) First Rust PR, so I'm sure I've violated some idioms. Happy to change anything. I'm getting one test failure locally -- a stderr diff for `compile_test`. I'm having a hard time seeing how I could be causing it, so I'm tentatively opening this in the hopes that it's an artifact of my local setup against `rustc`. Hoping it can at least still be reviewed in the meantime. I'm gathering that since this is a method lint, and `.filter(...).map(...)` is already checked, the means of implementation needs to be a little different, so I didn't exactly follow the setup boilerplate. My way of checking for method calls seems a little too direct (ie, "is the second element of the expression literally the path for `Option::is_some`?"), but it seems like that's how some other lints work, so I went with it. I'm assuming we're not concerned about, eg, closures that just end up equivalent to `Option::is_some` by eta reduction.
Configuration menu - View commit details
-
Copy full SHA for 775ef47 - Browse repository at this point
Copy the full SHA 775ef47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2108387 - Browse repository at this point
Copy the full SHA 2108387View commit details -
Auto merge of rust-lang#6913 - camsteffen:method-chain, r=flip1995
Destructure args in `methods` changelog: none This changes the main pattern in `methods` to match and destructure the method call args at the same time as the method name, and pass individual arg `Expr`s to the lint impls. ```rust // before ["expect", ..] => expect::check(cx, expr, arg_lists[0]); // after ("expect", [arg]) => expect::check(cx, expr, recv, arg); ``` This makes the code safer since there is no risk of out of bounds `args[n]` everywhere. There will be no more collecting `method_names`, `arg_lists`, `method_spans` as a separate step - everything comes out of the `match`es. Chained methods are parsed in a nested `match`. This makes the code more verbose in some ways, but IMO it is much easier to follow. ~Definitely should wait for rust-lang#6896. Just putting out the idea.~
Configuration menu - View commit details
-
Copy full SHA for 487c2e8 - Browse repository at this point
Copy the full SHA 487c2e8View commit details -
Auto merge of rust-lang#7008 - matthiaskrgr:ltchk, r=camsteffen
lintcheck: warn if we get a bad exit status while running clippy Right now we won't notice if a crate fails to build. Print a warning message to indicate that there is a problem of some sort. I'll still have to do more investigation on why this actually happens. I suspect that the problem is that `clippy fix` might run --all-targets but when we download the crate source from crates.io, some path deps (used for internal tests etc...) are not available (which is usually not a problem because the internal tests are not needed when using the crate as a lib..?) changelog: none
Configuration menu - View commit details
-
Copy full SHA for 459bca8 - Browse repository at this point
Copy the full SHA 459bca8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f887d0 - Browse repository at this point
Copy the full SHA 5f887d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 827d6aa - Browse repository at this point
Copy the full SHA 827d6aaView commit details -
Fix
redundant_clone
fp where the cloned value is modified while the…… clone is in use.
Configuration menu - View commit details
-
Copy full SHA for aaba9b7 - Browse repository at this point
Copy the full SHA aaba9b7View commit details -
Auto merge of rust-lang#7010 - camsteffen:if-chain-lint, r=llogiq
Internal `if_chain!` lints changelog: none We use `if_chain!` a lot. So this enforces some style rules around it, internal only. Lints when... * Nested `if`/`if_chain!` can be collapsed * An `if_chain!` starts with `let` or ends with `let ..; then {..}` * An `if_chain!` has only one `if` * An `if_chain!` contains `if .. && ..;` that spans multiple lines
Configuration menu - View commit details
-
Copy full SHA for 8cf7d9b - Browse repository at this point
Copy the full SHA 8cf7d9bView commit details
Commits on Apr 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6325fe1 - Browse repository at this point
Copy the full SHA 6325fe1View commit details -
Auto merge of rust-lang#6976 - Jarcho:manual_map_const, r=phansch
Don't lint `manual_map` in const functions fixes: rust-lang#6967 changelog: Don't lint `manual_map` in const functions
Configuration menu - View commit details
-
Copy full SHA for 75d73e9 - Browse repository at this point
Copy the full SHA 75d73e9View commit details -
Auto merge of rust-lang#7002 - mgacek8:issue6983_wrong_self_conventio…
…n_inside_trait_impls, r=phansch wrong_self_convention: fix FP inside trait impl for `to_*` method taking `&self` fixes rust-lang#6983 changelog: `wrong_self_convention`: fix FP inside trait impl for `to_*` method taking `&self`
Configuration menu - View commit details
-
Copy full SHA for 38b1fd0 - Browse repository at this point
Copy the full SHA 38b1fd0View commit details -
Auto merge of rust-lang#7011 - Jarcho:redundant_clone_fp, r=flip1995
Fix `redundant_clone` fp fixes: rust-lang#5973 fixes: rust-lang#5595 fixes: rust-lang#6998 changelog: Fix `redundant_clone` fp where the cloned value is modified while the clone is in use.
Configuration menu - View commit details
-
Copy full SHA for 92c4fc3 - Browse repository at this point
Copy the full SHA 92c4fc3View commit details -
Auto merge of rust-lang#7013 - Y-Nak:fix-needless-paren, r=flip1995
clippy_utils: fix needless parenthesis output from sugg::Sugg::maybe_par changelog: clippy_utils: fix needless parenthesis output from `sugg::Sugg::maybe_par` fixes: rust-lang#6767
Configuration menu - View commit details
-
Copy full SHA for 72eb60a - Browse repository at this point
Copy the full SHA 72eb60aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 08a8ad3 - Browse repository at this point
Copy the full SHA 08a8ad3View commit details
Commits on Apr 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9f6f001 - Browse repository at this point
Copy the full SHA 9f6f001View commit details -
Auto merge of rust-lang#6988 - mikerite:fix-6984, r=camsteffen
Fix hidden variant suggestion on single variant Fixes rust-lang#6984 changelog: Fix hidden variant suggestion on `match_wildcard_for_single_variants`
Configuration menu - View commit details
-
Copy full SHA for 1931db2 - Browse repository at this point
Copy the full SHA 1931db2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a064534 - Browse repository at this point
Copy the full SHA a064534View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4356a8f - Browse repository at this point
Copy the full SHA 4356a8fView commit details -
Auto merge of rust-lang#7016 - camsteffen:bind-map-paths, r=Manishearth
Remove paths from bind_instead_of_map changelog: none
Configuration menu - View commit details
-
Copy full SHA for 9ce2373 - Browse repository at this point
Copy the full SHA 9ce2373View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33798bb - Browse repository at this point
Copy the full SHA 33798bbView commit details -
Auto merge of rust-lang#7020 - camsteffen:needless-collect, r=Manishe…
…arth Improve needless_collect output changelog: Improve needless_collect output Fixes rust-lang#6908 Partially addresses rust-lang#6164
Configuration menu - View commit details
-
Copy full SHA for 86fb0e8 - Browse repository at this point
Copy the full SHA 86fb0e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ca5368 - Browse repository at this point
Copy the full SHA 2ca5368View commit details
Commits on Apr 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c726448 - Browse repository at this point
Copy the full SHA c726448View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7014340 - Browse repository at this point
Copy the full SHA 7014340View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5102c9c - Browse repository at this point
Copy the full SHA 5102c9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f31ed6 - Browse repository at this point
Copy the full SHA 6f31ed6View commit details
Commits on Apr 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 984ab98 - Browse repository at this point
Copy the full SHA 984ab98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f81e4e - Browse repository at this point
Copy the full SHA 2f81e4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e25b106 - Browse repository at this point
Copy the full SHA e25b106View commit details -
Auto merge of rust-lang#7030 - xFrednet:6877-clippy-going-dark, r=llogiq
Clippy going dark: Adding a dark theme to Clippy's lint list This PR adds the MdBook color themes to the lint list of Clippy. Well at least an adaption of these themes. <details> <summary>Here are some beautiful screenshots:</summary> **light theme** ![image](https://user-images.githubusercontent.com/17087237/113510593-e31fb280-955b-11eb-8ab1-8b5bcf287475.png) **Rust theme** ![image](https://user-images.githubusercontent.com/17087237/113510734-79ec6f00-955c-11eb-981c-8ebe890acf79.png) **Coal theme** ![image](https://user-images.githubusercontent.com/17087237/113510752-8ec90280-955c-11eb-8f5c-c87ca07c35c2.png) **Navy theme** ![image](https://user-images.githubusercontent.com/17087237/113510675-3f82d200-955c-11eb-8992-8c784abe19ea.png) **Ayu theme** ![image](https://user-images.githubusercontent.com/17087237/113510700-588b8300-955c-11eb-83e0-a8f770e9f913.png) </details> The theme is also stored in the browser to ensure that the next session applies the theme and doesn't burn your eyes out. cc: `@matthiaskrgr` --- Closes rust-lang#6877 changelog: [Clippy's lint list](https://rust-lang.github.io/rust-clippy/master/index.html) now supports themes
Configuration menu - View commit details
-
Copy full SHA for 6bb608c - Browse repository at this point
Copy the full SHA 6bb608cView commit details -
Configuration menu - View commit details
-
Copy full SHA for da04e87 - Browse repository at this point
Copy the full SHA da04e87View commit details -
Rollup merge of rust-lang#83820 - petrochenkov:nolinkargs, r=nagisa
Remove attribute `#[link_args]` Closes rust-lang#29596 The attribute could always be replaced with `-C link-arg`, but cargo didn't provide a reasonable way to pass such flags to rustc. Now cargo supports `cargo:rustc-link-arg*` directives in build scripts (https://doc.rust-lang.org/cargo/reference/unstable.html#extra-link-arg), so this attribute can be removed.
Configuration menu - View commit details
-
Copy full SHA for 44e3ccb - Browse repository at this point
Copy the full SHA 44e3ccbView commit details -
Auto merge of rust-lang#7021 - camsteffen:7012, r=giraffate
Fix ICE rust-lang#7012 changelog: none Fixes rust-lang#7012
Configuration menu - View commit details
-
Copy full SHA for a15d987 - Browse repository at this point
Copy the full SHA a15d987View commit details
Commits on Apr 5, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a00de90 - Browse repository at this point
Copy the full SHA a00de90View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e5dd4b - Browse repository at this point
Copy the full SHA 8e5dd4bView commit details -
Auto merge of rust-lang#7031 - xFrednet:5234-quick-fix-dark-mode-them…
…es, r=llogiq Quick fix for the updated website theaming to access the correct css files This fixes a problem from rust-lang#7030 that the service used to access css files was blocked by GitHub pages due to `SSL_ERROR_BAD_CERT_DOMAIN`. The css file loading worked fine during local development. The browser probably disabled some security options due to the local address. This fix works locally and should also work online as it references the direct css files used by the [mdBook User Guide](https://rust-lang.github.io/mdBook/index.html) the disadvantage of this is that refactorings within the mdBook project can have effects on the theme loading of Clippy. This PR is therefor more meant as a quick fix until I find a better solution. I've tested these changes using the page editor in the browser and can now confirm that they work :) changelog: none r? `@llogiq`
Configuration menu - View commit details
-
Copy full SHA for e315437 - Browse repository at this point
Copy the full SHA e315437View commit details -
Auto merge of rust-lang#7027 - camsteffen:defidmap, r=phansch
Use DefIdMap and similar aliases changelog: none
Configuration menu - View commit details
-
Copy full SHA for 8d221c5 - Browse repository at this point
Copy the full SHA 8d221c5View commit details -
Auto merge of rust-lang#7034 - Jarcho:missing_doc_ice, r=phansch
Fix ICE in `missing_panics_doc` fixes: rust-lang#7033 changelog: Fix ICE in `missing_panics_doc` while searching in a `const` block
Configuration menu - View commit details
-
Copy full SHA for 81f9946 - Browse repository at this point
Copy the full SHA 81f9946View commit details -
Configuration menu - View commit details
-
Copy full SHA for 232e2b7 - Browse repository at this point
Copy the full SHA 232e2b7View commit details -
A new lint for shared code in if blocks
* Added expression check for shared_code_in_if_blocks * Finishing touches for the shared_code_in_if_blocks lint * Applying PR suggestions * Update lints yay * Moved test into subfolder
Configuration menu - View commit details
-
Copy full SHA for d1df732 - Browse repository at this point
Copy the full SHA d1df732View commit details -
Configuration menu - View commit details
-
Copy full SHA for 469ff96 - Browse repository at this point
Copy the full SHA 469ff96View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8efc6ac - Browse repository at this point
Copy the full SHA 8efc6acView commit details -
Configuration menu - View commit details
-
Copy full SHA for b1d26e5 - Browse repository at this point
Copy the full SHA b1d26e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65ed5a6 - Browse repository at this point
Copy the full SHA 65ed5a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c74e49e - Browse repository at this point
Copy the full SHA c74e49eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 617c65b - Browse repository at this point
Copy the full SHA 617c65bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c0b4d7 - Browse repository at this point
Copy the full SHA 8c0b4d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c9e192 - Browse repository at this point
Copy the full SHA 7c9e192View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6f54f5 - Browse repository at this point
Copy the full SHA a6f54f5View commit details -
Auto merge of rust-lang#7026 - daxpedda:cargo-author, r=camsteffen
Remove author requirement for `cargo_common_metadata` This PR follows rust-lang/cargo#9282, I'm not fully informed about all of this, it would be great if somebody knowledgeable about this topic agrees. changelog: Changed `cargo_common_metadata` to stop linting on the optional author field.
Configuration menu - View commit details
-
Copy full SHA for 1a45e43 - Browse repository at this point
Copy the full SHA 1a45e43View commit details -
Auto merge of rust-lang#6463 - xFrednet:5234-shared-code-in-if-blocks…
…, r=phansch New Lint: `branches_sharing_code` This lint checks if all `if`-blocks contain some statements that are the same and can be moved out of the blocks to prevent code duplication. Here is an example: ```rust let _ = if ... { println!("Start"); // <-- Lint for code duplication let _a = 99; println!("End"); // <-- Lint for code duplication false } else { println!("Start"); let _b = 17; println!("End"); false }; ``` This could be written as: ```rust println!("Start"); let _ = if ... { let _a = 99; false } else { let _b = 17; false }; println!("End"); ``` --- This lint will get masked by the `IF_SAME_THEN_ELSE` lint. I think it makes more sense to only emit one lint per if block. This means that the folloing example: ```rust if ... { let _a = 17; } else { let _a = 17; } ``` Will only trigger the `IF_SAME_THEN_ELSE` lint and not the `SHARED_CODE_IN_IF_BLOCKS` lint. --- closes: rust-lang#5234 changelog: Added a new lint: `branches_sharing_code` And hello to the one that is writing the changelog for this release :D
Configuration menu - View commit details
-
Copy full SHA for d91da40 - Browse repository at this point
Copy the full SHA d91da40View commit details -
Auto merge of rust-lang#7029 - ABouttefeux:master, r=Manishearth
fix `missing_panics_doc` not detecting `assert_eq!` and `assert_ne!` fixes rust-lang#6997 changelog: `missing_panics_doc` detects `assert_eq!` and `assert_ne!` --- searching for `assert_eq!` and `assert_ne!` in `FindPanicUnwrap`
Configuration menu - View commit details
-
Copy full SHA for 25c1ed3 - Browse repository at this point
Copy the full SHA 25c1ed3View commit details -
Auto merge of rust-lang#7018 - Y-Nak:same_item_push, r=Manishearth
Don't trigger `same_item_push` if the vec is used in the loop body fixes rust-lang#6987 changelog: `same_item_push`: Don't trigger if the `vec` is used in the loop body
Configuration menu - View commit details
-
Copy full SHA for 57406c9 - Browse repository at this point
Copy the full SHA 57406c9View commit details
Commits on Apr 6, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8a50923 - Browse repository at this point
Copy the full SHA 8a50923View commit details -
Configuration menu - View commit details
-
Copy full SHA for 879bfec - Browse repository at this point
Copy the full SHA 879bfecView commit details -
Auto merge of rust-lang#7036 - horacimacias:master, r=giraffate
consider mutability on useless_vec suggestions fixes rust-lang#7035 changelog: Now the suggested by `useless_vec` considers mutability to suggest either `&[]`, as before, or `&mut []` if the used reference is mutable.
Configuration menu - View commit details
-
Copy full SHA for d2ba777 - Browse repository at this point
Copy the full SHA d2ba777View commit details -
Configuration menu - View commit details
-
Copy full SHA for 12fce55 - Browse repository at this point
Copy the full SHA 12fce55View commit details -
Auto merge of rust-lang#6931 - Jarcho:needless_borrow, r=phansch,flip…
…1995 Fix all occurences `needless_borrow` internally The bug that got 'needless_borrow' moved into the nursery was fixed two years ago in d4370f8. This did trigger over a thousand times internally, so that's all the other changes. I vetted most of them, but there's a lot The only interesting change is to the lint list. `declare_tool_lint` already makes a reference, so there's no need to take a reference to the lints. changelog: None
Configuration menu - View commit details
-
Copy full SHA for 6ae0835 - Browse repository at this point
Copy the full SHA 6ae0835View commit details -
Update library/core/src/iter/adapters/peekable.rs
Co-authored-by: Alexander Ronald Altman <alexanderaltman@me.com>
Configuration menu - View commit details
-
Copy full SHA for 7f32fda - Browse repository at this point
Copy the full SHA 7f32fdaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72796a7 - Browse repository at this point
Copy the full SHA 72796a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1efb551 - Browse repository at this point
Copy the full SHA 1efb551View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79d3082 - Browse repository at this point
Copy the full SHA 79d3082View commit details -
Configuration menu - View commit details
-
Copy full SHA for a342de3 - Browse repository at this point
Copy the full SHA a342de3View commit details -
Auto merge of rust-lang#7043 - camsteffen:dead-utils, r=flip1995
Remove some dead utils changelog: none
Configuration menu - View commit details
-
Copy full SHA for bbe1567 - Browse repository at this point
Copy the full SHA bbe1567View commit details -
Auto merge of rust-lang#7044 - camsteffen:match-path, r=Manishearth
Soft deprecate match_path and match_qpath changelog: none From zulip [disucssion](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/match_.5Bq.5Dpath.20is.20bad.3F).
Configuration menu - View commit details
-
Copy full SHA for 624e8aa - Browse repository at this point
Copy the full SHA 624e8aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 47f0c15 - Browse repository at this point
Copy the full SHA 47f0c15View commit details
Commits on Apr 7, 2021
-
Auto merge of rust-lang#7046 - camsteffen:symbol-optimize, r=giraffate
Some symbol optimizations changelog: none
Configuration menu - View commit details
-
Copy full SHA for db6ea84 - Browse repository at this point
Copy the full SHA db6ea84View commit details -
Rollup merge of rust-lang#83916 - Amanieu:asm_anonconst, r=petrochenkov
Use AnonConst for asm! constants This replaces the old system which used explicit promotion. See rust-lang#83169 for more background. The syntax for `const` operands is still the same as before: `const <expr>`. Fixes rust-lang#83169 Because the implementation is heavily based on inline consts, we suffer from the same issues: - We lose the ability to use expressions derived from generics. See the deleted tests in `src/test/ui/asm/const.rs`. - We are hitting the same ICEs as inline consts, for example rust-lang#78174. It is unlikely that we will be able to stabilize this before inline consts are stabilized.
Configuration menu - View commit details
-
Copy full SHA for cde58f7 - Browse repository at this point
Copy the full SHA cde58f7View commit details -
Update library/core/src/iter/traits/iterator.rs
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Configuration menu - View commit details
-
Copy full SHA for 4c850f3 - Browse repository at this point
Copy the full SHA 4c850f3View commit details -
Update library/core/src/iter/traits/iterator.rs
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Configuration menu - View commit details
-
Copy full SHA for cfe43f9 - Browse repository at this point
Copy the full SHA cfe43f9View commit details
Commits on Apr 8, 2021
-
This commit implements the idea of a new ABI for the WebAssembly target, one called `"wasm"`. This ABI is entirely of my own invention and has no current precedent, but I think that the addition of this ABI might help solve a number of issues with the WebAssembly targets. When `wasm32-unknown-unknown` was first added to Rust I naively "implemented an abi" for the target. I then went to write `wasm-bindgen` which accidentally relied on details of this ABI. Turns out the ABI definition didn't match C, which is causing issues for C/Rust interop. Currently the compiler has a "wasm32 bindgen compat" ABI which is the original implementation I added, and it's purely there for, well, `wasm-bindgen`. Another issue with the WebAssembly target is that it's not clear to me when and if the default C ABI will change to account for WebAssembly's multi-value feature (a feature that allows functions to return multiple values). Even if this does happen, though, it seems like the C ABI will be guided based on the performance of WebAssembly code and will likely not match even what the current wasm-bindgen-compat ABI is today. This leaves a hole in Rust's expressivity in binding WebAssembly where given a particular import type, Rust may not be able to import that signature with an updated C ABI for multi-value. To fix these issues I had the idea of a new ABI for WebAssembly, one called `wasm`. The definition of this ABI is "what you write maps straight to wasm". The goal here is that whatever you write down in the parameter list or in the return values goes straight into the function's signature in the WebAssembly file. This special ABI is for intentionally matching the ABI of an imported function from the environment or exporting a function with the right signature. With the addition of a new ABI, this enables rustc to: * Eventually remove the "wasm-bindgen compat hack". Once this ABI is stable wasm-bindgen can switch to using it everywhere. Afterwards the wasm32-unknown-unknown target can have its default ABI updated to match C. * Expose the ability to precisely match an ABI signature for a WebAssembly function, regardless of what the C ABI that clang chooses turns out to be. * Continue to evolve the definition of the default C ABI to match what clang does on all targets, since the purpose of that ABI will be explicitly matching C rather than generating particular function imports/exports. Naturally this is implemented as an unstable feature initially, but it would be nice for this to get stabilized (if it works) in the near-ish future to remove the wasm32-unknown-unknown incompatibility with the C ABI. Doing this, however, requires the feature to be on stable because wasm-bindgen works with stable Rust.
Configuration menu - View commit details
-
Copy full SHA for 482a3d0 - Browse repository at this point
Copy the full SHA 482a3d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffa2b7d - Browse repository at this point
Copy the full SHA ffa2b7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61eafbb - Browse repository at this point
Copy the full SHA 61eafbbView commit details -
Auto merge of rust-lang#7051 - flip1995:rustup, r=flip1995
Rustup changelog: none r? `@ghost`
Configuration menu - View commit details
-
Copy full SHA for b40ea20 - Browse repository at this point
Copy the full SHA b40ea20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b37cd3 - Browse repository at this point
Copy the full SHA 6b37cd3View commit details -
Fix outdated crate names in compiler docs
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
Configuration menu - View commit details
-
Copy full SHA for 0019ca9 - Browse repository at this point
Copy the full SHA 0019ca9View commit details -
Rollup merge of rust-lang#80733 - steffahn:prettify_pin_links, r=jyn514
Improve links in inline code in `core::pin`. ## Context So I recently opened rust-lang#80720. That PR uses HTML-based `<code>foo</code>` syntax in place of `` `foo` `` for some inline code. It looks like usage of `<code>` tags in doc comments is without precedent in the standard library, but the HTML-based syntax has an important advantage: You can write something like ``` <code>[Box]<[Option]\<T>></code> ``` which becomes: <code>[Box]<[Option]\<T>></code>, whereas with ordinary backtick syntax, you cannot create links for a substring of an inline code block. ## Problem I recalled (from my own experience) that a way to partially work around this limitation is to do something like ``` [`Box`]`<`[`Option`]`<T>>` ``` which looks like this: [`Box`]`<`[`Option`]`<T>>` _(admitted, it looks even worse on GitHub than in `rustdoc`’s CSS)_. [Box]: https://doc.rust-lang.org/std/boxed/struct.Box.html "Box" [`Box`]: https://doc.rust-lang.org/std/boxed/struct.Box.html "Box" [Option]: https://doc.rust-lang.org/std/option/enum.Option.html "Option" [`Option`]: https://doc.rust-lang.org/std/option/enum.Option.html "Option" [Pin]: https://doc.rust-lang.org/std/pin/struct.Pin.html "Pin" [&mut]: https://doc.rust-lang.org/std/primitive.reference.html "mutable reference" So I searched the standard library and found that e.g. the [std::pin](https://doc.rust-lang.org/std/pin/index.html) module documentation uses this hack/workaround quite a bit, with types like <code>[Pin]<[Box]\<T>></code> or <code>[Pin]<[&mut] T>></code>. Although the way they look like in this sentence is what I would like them to look like, not what they currently look. ### Status Quo Here’s a screenshot of what it currently looks like: ![Screenshot_20210105_202751](https://user-images.githubusercontent.com/3986214/103692608-4a978780-4f98-11eb-9451-e13622b2e3c0.png) With a few HTML-style code blocks, we can fix all the spacing issues in the above screenshot that are due usage of this hack/workaround of putting multiple code blocks right next to each other being used. ### after d3915c5: ![Screenshot_20210105_202932](https://user-images.githubusercontent.com/3986214/103692688-6f8bfa80-4f98-11eb-9be5-9b370eaef644.png) There’s still a problem of inconsistency. Especially in a sentence such as > A [`Pin<P>`][Pin] where `P: Deref` should be considered as a "`P`-style pointer" to _[...]_ looks weird with the variable `P` having different colors (and `Deref` has a different color from before where it was a link, too). Or compare the difference of <code>[Pin]<[Box]\<T>></code> vs [`Box<T>`][Box] where one time the variable is part of the link and the other time it isn’t. _Note: Color differences show even **more strongly** when the ayu theme is used, while they are a bit less prominent in the light theme than they are in the dark theme, which is the one used for these screenshots._ This is why I’ve added the next commit ### after ceaeb24 ![Screenshot_20210105_203113](https://user-images.githubusercontent.com/3986214/103693496-ab738f80-4f99-11eb-942d-29dace459734.png) pulling all the type parameters out of their links, and also the last commit with clearly visible changes ### after 87ac118 ![Screenshot_20210105_203252](https://user-images.githubusercontent.com/3986214/103693625-e5dd2c80-4f99-11eb-91b7-470c37934e7e.png) where more links are added, removing e.g. the inconsistency with `Deref`’s color in e.g. `P: Deref` that I already mentioned above. ## Discussion I am aware that this PR may very well be overkill. If for now only the first commit (plus the fix for the `Drop` link in e65385f, the link titles 684edf7 as far as they apply, and a few of the line-break changes) are wanted, I can reduce this PR to just those changes. I personally find the rendered result with all these changes very nice though. On the other hand, all these `<code>` tags are not very nice in the source code, I’ll admit. Perhaps alternative solutions could be preferred, such as `rustdoc` support for merging subsequent inline code blocks so that all the cases that currently use workarounds rendered as [`Box`]`<`[`Option`]`<T>>` automatically become <code>[Box]<[Option]\<T>></code> without any need for further changes. Even in this case, having a properly formatted, better looking example in the standard library docs could help motivate such a change to `rustdoc` by prodiving an example of the expected results and also the already existing alternative (i.e. using `<code>`). On the other hand, `` [`Box`]`<`[`Option`]`<T>>` `` isn’t particularly nice-looking source code either. I’m not even sure if I wouldn’t actually find the version `<code>[Box]<[Option]\<T>></code>` cleaner to read. `@rustbot` modify labels: T-doc, T-rustdoc
Configuration menu - View commit details
-
Copy full SHA for 80b99d6 - Browse repository at this point
Copy the full SHA 80b99d6View commit details -
Rollup merge of rust-lang#81938 - lukaslueg:stab_peek_mut, r=Amanieu
Stabilize `peekable_peek_mut` Resolves rust-lang#78302. Also adds some documentation on `std::iter::Iterator::peekable()` regarding the new method. The feature was added in rust-lang#77491 in Nov' 20, which is recently, but the feature seems reasonably small. Never did a stabilization-pr, excuse my ignorance if there is a protocol I'm not aware of.
Configuration menu - View commit details
-
Copy full SHA for 5f6fb2c - Browse repository at this point
Copy the full SHA 5f6fb2cView commit details -
Rollup merge of rust-lang#83763 - alexcrichton:wasm-multivalue-abi, r…
…=nagisa rustc: Add a new `wasm` ABI This commit implements the idea of a new ABI for the WebAssembly target, one called `"wasm"`. This ABI is entirely of my own invention and has no current precedent, but I think that the addition of this ABI might help solve a number of issues with the WebAssembly targets. When `wasm32-unknown-unknown` was first added to Rust I naively "implemented an abi" for the target. I then went to write `wasm-bindgen` which accidentally relied on details of this ABI. Turns out the ABI definition didn't match C, which is causing issues for C/Rust interop. Currently the compiler has a "wasm32 bindgen compat" ABI which is the original implementation I added, and it's purely there for, well, `wasm-bindgen`. Another issue with the WebAssembly target is that it's not clear to me when and if the default C ABI will change to account for WebAssembly's multi-value feature (a feature that allows functions to return multiple values). Even if this does happen, though, it seems like the C ABI will be guided based on the performance of WebAssembly code and will likely not match even what the current wasm-bindgen-compat ABI is today. This leaves a hole in Rust's expressivity in binding WebAssembly where given a particular import type, Rust may not be able to import that signature with an updated C ABI for multi-value. To fix these issues I had the idea of a new ABI for WebAssembly, one called `wasm`. The definition of this ABI is "what you write maps straight to wasm". The goal here is that whatever you write down in the parameter list or in the return values goes straight into the function's signature in the WebAssembly file. This special ABI is for intentionally matching the ABI of an imported function from the environment or exporting a function with the right signature. With the addition of a new ABI, this enables rustc to: * Eventually remove the "wasm-bindgen compat hack". Once this multivalue ABI is stable wasm-bindgen can switch to using it everywhere. Afterwards the wasm32-unknown-unknown target can have its default ABI updated to match C. * Expose the ability to precisely match an ABI signature for a WebAssembly function, regardless of what the C ABI that clang chooses turns out to be. * Continue to evolve the definition of the default C ABI to match what clang does on all targets, since the purpose of that ABI will be explicitly matching C rather than generating particular function imports/exports. Naturally this is implemented as an unstable feature initially, but it would be nice for this to get stabilized (if it works) in the near-ish future to remove the wasm32-unknown-unknown incompatibility with the C ABI. Doing this, however, requires the feature to be on stable because wasm-bindgen works with stable Rust.
Configuration menu - View commit details
-
Copy full SHA for 2f4e2cb - Browse repository at this point
Copy the full SHA 2f4e2cbView commit details -
Rollup merge of rust-lang#83980 - pierwill:fix-compiler-librustc-name…
…s, r=davidtwco Fix outdated crate names in compiler docs Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged.
Configuration menu - View commit details
-
Copy full SHA for 27e52c0 - Browse repository at this point
Copy the full SHA 27e52c0View commit details -
Rollup merge of rust-lang#84001 - flip1995:clippyup, r=Manishearth
Update Clippy Biweekly Clippy update r? `@Manishearth`
Configuration menu - View commit details
-
Copy full SHA for 7094eca - Browse repository at this point
Copy the full SHA 7094ecaView commit details