Rename rustc::pass_by_value lint as rustc::disallowed_pass_by_ref.#153029
Rename rustc::pass_by_value lint as rustc::disallowed_pass_by_ref.#153029rust-bors[bot] merged 1 commit intorust-lang:mainfrom
rustc::pass_by_value lint as rustc::disallowed_pass_by_ref.#153029Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
pass_by_value lint as disallowed_pass_by_ref.rustc::pass_by_value lint as rustc::disallowed_pass_by_ref.
|
BTW, I'm not 100% certain about how I handled bootstrapping. It seems reasonable but I couldn't find any other examples in the code that looked quite the same as what I did. |
There was a problem hiding this comment.
Code looks fine.
Regarding the lint name in the face of our guidelines, and in particular rule 2, I'm wondering if it shouldn't be named: rustc::disallowed_pass_by_ref_types.
Though that seems a bit long, maybe we can just remove the pass part and have rustc::disallowed_by_ref_types. What do you think?
|
I think the |
|
I'm fine with that. |
|
@bors r+ rollup |
…, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
|
For the record: @Urgau and I had a private discussion about the names. We both liked |
Rollup of 8 pull requests Successful merges: - #149169 (ptr::replace: make calls on ZST null ptr not UB) - #150562 (Fix doc link used in suggestion for pinning self) - #152679 (rustc_expand: improve diagnostics for non-repeatable metavars) - #153017 (Implement debuginfo for unsafe binder types) - #152868 (delete some very old trivial `Box` tests) - #152922 (rustc_public: Make fields that shouldn't be exposed visible only in `rustc_public`) - #153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.) - #153051 (Migration of `LintDiagnostic` - part 3)
The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so)
d60e15f to
8eed8bd
Compare
|
I added a temporary @bors r=Urgau |
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.
…, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
…, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
…, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
…, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
…uwer Rollup of 13 pull requests Successful merges: - #153079 (Revert "Move aarch64-apple dist builder to dynamic llvm linking") - #148146 (CI: use alternative disks if available) - #149937 (spliit out `linker-info` from `linker-messages`) - #151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - #153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination) - #153075 (mGCA: Lower negated literals directly and reject non-integer negations) - #153078 (Remove `QuerySystemFns`) - #149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls) - #153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.) - #153063 (`is_ty_must_use`: do not require a `span` argument) - #153071 (Update books) - #153092 (Remove redundant self usages) - #153094 (Simplify `AppendOnlyVec` iterators) Failed merges: - #153091 (Migration of `LintDiagnostic` - part 4)
Rollup of 13 pull requests Successful merges: - #148146 (CI: use alternative disks if available) - #151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - #153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination) - #153075 (mGCA: Lower negated literals directly and reject non-integer negations) - #153078 (Remove `QuerySystemFns`) - #153089 (interpret: avoid dummy spans in the stacktrace) - #153111 (Refactor url_parts to return is_absolute instead of out param) - #149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls) - #153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.) - #153063 (`is_ty_must_use`: do not require a `span` argument) - #153071 (Update books) - #153092 (Remove redundant self usages) - #153094 (Simplify `AppendOnlyVec` iterators) Failed merges: - #153091 (Migration of `LintDiagnostic` - part 4)
Rollup merge of #153029 - nnethercote:disallowed-pass-by-ref, r=Urgau Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`. The name `pass_by_value` is completely wrong. The lint actually checks for the use of pass by reference for types marked with `rustc_pass_by_value`. The hardest part of this was choosing the new name. The `disallowed_` part of the name closely matches the following clippy lints: - `disallowed_macros` - `disallowed_methods` - `disallowed_names` - `disallowed_script_idents` - `disallowed_types` The `pass_by_value` part of the name aligns with the following clippy lints: - `needless_pass_by_value` - `needless_pass_by_ref_mut` - `trivially_copy_pass_by_ref` - `large_types_passed_by_value` (less so) r? @Urgau
Rollup of 13 pull requests Successful merges: - rust-lang/rust#148146 (CI: use alternative disks if available) - rust-lang/rust#151771 (Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup) - rust-lang/rust#153035 (rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination) - rust-lang/rust#153075 (mGCA: Lower negated literals directly and reject non-integer negations) - rust-lang/rust#153078 (Remove `QuerySystemFns`) - rust-lang/rust#153089 (interpret: avoid dummy spans in the stacktrace) - rust-lang/rust#153111 (Refactor url_parts to return is_absolute instead of out param) - rust-lang/rust#149978 (deprecate `Eq::assert_receiver_is_total_eq` and emit FCW on manual impls) - rust-lang/rust#153029 (Rename `rustc::pass_by_value` lint as `rustc::disallowed_pass_by_ref`.) - rust-lang/rust#153063 (`is_ty_must_use`: do not require a `span` argument) - rust-lang/rust#153071 (Update books) - rust-lang/rust#153092 (Remove redundant self usages) - rust-lang/rust#153094 (Simplify `AppendOnlyVec` iterators) Failed merges: - rust-lang/rust#153091 (Migration of `LintDiagnostic` - part 4)
The name
pass_by_valueis completely wrong. The lint actually checks for the use of pass by reference for types marked withrustc_pass_by_value.The hardest part of this was choosing the new name. The
disallowed_part of the name closely matches the following clippy lints:disallowed_macrosdisallowed_methodsdisallowed_namesdisallowed_script_identsdisallowed_typesThe
pass_by_valuepart of the name aligns with the following clippy lints:needless_pass_by_valueneedless_pass_by_ref_muttrivially_copy_pass_by_reflarge_types_passed_by_value(less so)r? @Urgau