uplift clippy::clone_double_ref as suspicious_double_ref_op#110955
uplift clippy::clone_double_ref as suspicious_double_ref_op#110955bors merged 3 commits intorust-lang:masterfrom
clippy::clone_double_ref as suspicious_double_ref_op#110955Conversation
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
9b5d0cd to
5c99175
Compare
clippy::clone_double_ref as suspicious_double_ref_opsclippy::clone_double_ref as suspicious_double_ref_op
This comment has been minimized.
This comment has been minimized.
|
r=me with that rustdoc fix |
This comment has been minimized.
This comment has been minimized.
0570950 to
e928067
Compare
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
@bors r=compiler-errors |
compiler/rustc_lint/messages.ftl
Outdated
| .suggestion = use the new name | ||
|
|
||
| lint_suspicious_double_ref_op = | ||
| using `.{$call}()` on a double reference, which returns `{$ty}` instead of {$op} the inner type |
There was a problem hiding this comment.
| using `.{$call}()` on a double reference, which returns `{$ty}` instead of {$op} the inner type | |
| using `.{$call}()` on a double reference, which returns `{$ty}` instead of {$op}, the inner type |
Correct me (a non-native speaker of english) if I'm wrong, but I think there needs to either be a comma, or it needs to be reodered instead of the inner type {$op}. I think it's better to have the two types close to each other, so I prefer the variant with the comma.
There was a problem hiding this comment.
$op is not a type. It is either "dereferencing", "borrowing", or "cloning" depending on the trait.
There was a problem hiding this comment.
I see. Those words should also be in the ftl file then however.
There was a problem hiding this comment.
oh right.. hmmmm. How should I do that
There was a problem hiding this comment.
I suppose they don't have to? Since https://projectfluent.org/ shows that you can match on variables.
There was a problem hiding this comment.
I think at the very least you should list it explicitly, so that translators know that there is only these options. From what I understand, the translation system was designed so that translators do not have to look at the source code at all.
{$op ->
*[should_not_happen] [{$op}]
[deref] dereferencing
[borrow] borrowing
[clone] cloning
}
How to pair that up with enums, I don't really know.
|
@bors r=compiler-errors |
…=compiler-errors uplift `clippy::clone_double_ref` as `suspicious_double_ref_op` Split from rust-lang#109842. r? `@compiler-errors`
Rollup of 7 pull requests Successful merges: - rust-lang#105076 (Refactor core::char::EscapeDefault and co. structures) - rust-lang#108161 (Add `ConstParamTy` trait) - rust-lang#108668 (Stabilize debugger_visualizer) - rust-lang#110512 (Fix elaboration with associated type bounds) - rust-lang#110895 (Remove `all` in target_thread_local cfg) - rust-lang#110955 (uplift `clippy::clone_double_ref` as `suspicious_double_ref_op`) - rust-lang#111048 (Mark`feature(return_position_impl_trait_in_trait)` and`feature(async_fn_in_trait)` as not incomplete) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…=compiler-errors uplift `clippy::clone_double_ref` as `suspicious_double_ref_op` Split from rust-lang#109842. r? ``@compiler-errors``
Split from #109842.
r? @compiler-errors