rust/clippy_lints/src
Yuki Okushi 22c5e0c347 Rollup merge of #77560 - rschoon:fix-litkind-rc-bytebuf, r=lcnr
Fix LitKind's byte buffer to use refcounted slice

While working on adding a new lint for clippy (see https://github.com/rust-lang/rust-clippy/pull/6044) for avoiding shared ownership of "mutable buffer" types (such as using `Rc<Vec<T>>` instead of `Rc<[T]>`), I noticed a type exported from rustc_ast and used by clippy gets caught by the lint. This PR fixes the exported type.

This PR includes the actual change to clippy too, but I will open a PR directly against clippy for that part (although it will currently fail to build there).
2020-10-06 16:26:11 +09:00
..
methods Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
utils clippy: (Body, DefId) -> Body 2020-10-04 16:07:03 -07:00
approx_const.rs
arithmetic.rs
as_conversions.rs
assertions_on_constants.rs
assign_ops.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
async_yields_async.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
atomic_ordering.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
attrs.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
await_holding_lock.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
bit_mask.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
blacklisted_name.rs
blocks_in_if_conditions.rs
booleans.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
bytecount.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
cargo_common_metadata.rs
checked_conversions.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
cognitive_complexity.rs
collapsible_if.rs
comparison_chain.rs
consts.rs Change clippy's Constant back to refcount clone byte strings 2020-10-04 15:53:37 -06:00
copies.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
copy_iterator.rs
create_dir.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
dbg_macro.rs
default_trait_access.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
deprecated_lints.rs Deprecate clippy lint 2020-10-02 11:34:14 -07:00
dereference.rs
derive.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
doc.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
double_comparison.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
double_parens.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
drop_forget_ref.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
duration_subsec.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
else_if_without_else.rs
empty_enum.rs
entry.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
enum_clike.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
enum_variants.rs Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
eq_op.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
erasing_op.rs
escape.rs
eta_reduction.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
eval_order_dependence.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
excessive_bools.rs
exit.rs
explicit_write.rs
fallible_impl_from.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
float_equality_without_abs.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
float_literal.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
floating_point_arithmetic.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
format.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
formatting.rs
functions.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
future_not_send.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
get_last_with_len.rs
identity_op.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
if_let_mutex.rs
if_let_some_result.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
if_not_else.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
implicit_return.rs
implicit_saturating_sub.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
indexing_slicing.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
infinite_iter.rs clippy: support QPath::LangItem 2020-08-17 13:55:05 +01:00
inherent_impl.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
inherent_to_string.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
inline_fn_without_body.rs
int_plus_one.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
integer_division.rs
items_after_statements.rs
large_const_arrays.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
large_enum_variant.rs
large_stack_arrays.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
len_zero.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
let_if_seq.rs
let_underscore.rs
lib.rs Deprecate clippy lint 2020-10-02 11:34:14 -07:00
lifetimes.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
literal_representation.rs
loops.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
macro_use.rs
main_recursion.rs
manual_async_fn.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
manual_non_exhaustive.rs Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
manual_strip.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
map_clone.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
map_err_ignore.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
map_identity.rs
map_unit_fn.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
match_on_vec_items.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
matches.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
mem_discriminant.rs
mem_forget.rs
mem_replace.rs
minmax.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
misc_early.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
misc.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
missing_const_for_fn.rs clippy: (Body, DefId) -> Body 2020-10-04 16:07:03 -07:00
missing_doc.rs
missing_inline.rs
modulo_arithmetic.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
multiple_crate_versions.rs
mut_key.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
mut_mut.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
mut_reference.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
mutable_debug_assertion.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
mutex_atomic.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
needless_arbitrary_self_type.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
needless_bool.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
needless_borrow.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
needless_borrowed_ref.rs
needless_continue.rs
needless_pass_by_value.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
needless_update.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
neg_cmp_op_on_partial_ord.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
neg_multiply.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
new_without_default.rs merge as_local_hir_id with local_def_id_to_hir_id 2020-08-13 16:55:16 +02:00
no_effect.rs
non_copy_const.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
non_expressive_names.rs
open_options.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
option_env_unwrap.rs
option_if_let_else.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
overflow_check_conditional.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
panic_in_result_fn.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
panic_unimplemented.rs
partialeq_ne_impl.rs
path_buf_push_overwrite.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
pattern_type_mismatch.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
precedence.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
ptr_offset_with_cast.rs
ptr.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
question_mark.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
ranges.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
redundant_clone.rs clippy: (Body, DefId) -> Body 2020-10-04 16:07:03 -07:00
redundant_closure_call.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
redundant_field_names.rs
redundant_pub_crate.rs
redundant_static_lifetimes.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
reference.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
regex.rs
repeat_once.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
returns.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
self_assignment.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
serde_api.rs
shadow.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
single_component_path_imports.rs Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
slow_vector_initialization.rs
stable_sort_primitive.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
strings.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
suspicious_trait_impl.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
swap.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
tabs_in_doc_comments.rs
temporary_assignment.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
to_digit_is_some.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
to_string_in_display.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
trait_bounds.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
transmute.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
transmuting_null.rs rust_ast::ast => rustc_ast 2020-08-17 20:32:32 +00:00
trivially_copy_pass_by_ref.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
try_err.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
types.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
unicode.rs
unit_return_expecting_ord.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
unnamed_address.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
unnecessary_sort_by.rs Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup 2020-09-10 17:47:07 +02:00
unnested_or_patterns.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
unsafe_removed_from_name.rs
unused_io_amount.rs clippy: support QPath::LangItem 2020-08-17 13:55:05 +01:00
unused_self.rs
unused_unit.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
unwrap_in_result.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
unwrap.rs Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup 2020-08-11 17:50:45 +02:00
use_self.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
useless_conversion.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
vec_resize_to_zero.rs rust_ast::ast => rustc_ast 2020-08-17 20:32:32 +00:00
vec.rs ty.kind -> ty.kind() in rustdoc and clippy 2020-09-04 18:27:33 +02:00
verbose_file_reads.rs
wildcard_dependencies.rs
wildcard_imports.rs Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup 2020-08-28 18:43:25 +02:00
write.rs Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup 2020-09-24 14:49:22 +02:00
zero_div_zero.rs