Skip to content

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Aug 7, 2025

r? @ghost

changelog: none

flip1995 and others added 16 commits July 25, 2025 15:54
Signed-off-by: Jonathan Brouwer <[email protected]>
It's identical to `TyCtxt::get_all_attrs` except it takes `DefId`
instead of `impl Into<DefIf>`.
There are identical definitions in `rustc_type_ir` and `rustc_ast`. This
commit removes them and places a single definition in `rustc_ast_ir`.
This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but
means a bunch of silly conversion functions can be removed.

The one annoying wrinkle is that the old version had differences in
their `Debug` impls, e.g. one printed `u32` while the other printed
`U32`. Some compiler error messages rely on the former (yuk), and some
clippy output depends on the latter. So the commit also changes clippy
to not rely on `Debug` and just implement what it needs itself.
Deduplicate `IntTy`/`UintTy`/`FloatTy`.

There are identical definitions in `rustc_type_ir` and `rustc_ast`. This commit removes them and places a single definition in `rustc_ast_ir`. This requires adding `rust_span` as a dependency of `rustc_ast_ir`, but means a bunch of silly conversion functions can be removed.

r? `@fmease`
merge rustc_attr_data_structures into rustc_hir

this move was discussed on zulip: [#t-compiler > attribute parsing rework @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/attribute.20parsing.20rework/near/528530091)

Many PRs in the attribute rework depend on this move.
Extend `is_case_difference` to handle digit-letter confusables

This PR extends `is_case_difference` to handle digit-letter confusables

Add support for detecting 0/O, 1/l, 5/S, 8/B, 9/g confusables in error suggestions.

r? `@estebank`
Distinguish prepending and replacing self ty in predicates

There are two kinds of functions called `with_self_ty`:
1. Prepends the `Self` type onto an `ExistentialPredicate` which lacks it in its internal representation.
2. Replaces the `Self` type of an existing predicate, either for diagnostics purposes or in the new trait solver when normalizing that self type.

This PR distinguishes these two because I often want to only grep for one of them. Namely, let's call it `with_replaced_self_ty` when all we're doing is replacing the self type.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 7, 2025

Some changes occurred in clippy_lints/src/doc

cc @notriddle

@flip1995 flip1995 enabled auto-merge August 7, 2025 14:51
@flip1995 flip1995 added this pull request to the merge queue Aug 7, 2025
Copy link

github-actions bot commented Aug 7, 2025

Lintcheck changes for d5f9f75

Lint Added Removed Changed
clippy::allow_attributes 0 0 583
clippy::allow_attributes_without_reason 0 0 584
clippy::arbitrary_source_item_ordering 0 0 1008
clippy::arithmetic_side_effects 0 0 221
clippy::as_conversions 0 0 466
clippy::as_pointer_underscore 0 0 53
clippy::as_underscore 0 0 23
clippy::big_endian_bytes 0 0 40
clippy::borrow_as_ptr 0 0 3
clippy::cast_lossless 0 0 30
clippy::cast_possible_truncation 0 0 122
clippy::cast_possible_wrap 0 0 104
clippy::cast_precision_loss 0 0 14
clippy::cast_ptr_alignment 0 0 22
clippy::cast_sign_loss 0 0 166
clippy::cfg_not_test 0 0 4
clippy::default_numeric_fallback 0 0 67
clippy::derivable_impls 0 0 2
clippy::derived_hash_with_manual_eq 0 0 2
clippy::doc_comment_double_space_linebreaks 0 0 1
clippy::doc_link_code 0 0 2
clippy::doc_markdown 0 0 3
clippy::duplicated_attributes 0 0 2
clippy::else_if_without_else 0 0 27
clippy::equatable_if_let 0 0 17
clippy::error_impl_error 0 0 21
clippy::exhaustive_enums 0 0 35
clippy::exhaustive_structs 0 0 265
clippy::exit 0 0 16
clippy::expect_used 0 0 2
clippy::expl_impl_clone_on_copy 0 0 198
clippy::fallible_impl_from 0 0 1
clippy::filter_map_next 0 0 1
clippy::float_cmp 0 0 2
clippy::fn_params_excessive_bools 0 0 1
clippy::fn_to_numeric_cast_any 0 0 7
clippy::host_endian_bytes 0 0 16
clippy::if_not_else 0 0 3
clippy::if_then_some_else_none 0 0 3
clippy::impl_trait_in_params 0 0 1
clippy::implicit_return 0 0 2996
clippy::incompatible_msrv 6 6 21
clippy::indexing_slicing 0 0 11
clippy::infinite_loop 0 0 1
clippy::integer_division 0 0 58
clippy::into_iter_without_iter 0 0 1
clippy::items_after_statements 0 0 9
clippy::iter_without_into_iter 0 0 2
clippy::large_const_arrays 0 0 1
clippy::large_enum_variant 0 0 1
clippy::len_without_is_empty 0 0 2
clippy::little_endian_bytes 0 0 18
clippy::many_single_char_names 0 0 4
clippy::map_unwrap_or 0 0 1
clippy::match_bool 0 0 1
clippy::match_like_matches_macro 0 0 1
clippy::match_same_arms 0 0 10
clippy::min_ident_chars 0 0 387
clippy::missing_assert_message 0 0 1
clippy::missing_asserts_for_indexing 0 0 1
clippy::missing_const_for_fn 0 0 93
clippy::missing_docs_in_private_items 0 0 659
clippy::missing_errors_doc 0 0 8
clippy::missing_fields_in_debug 0 0 25
clippy::missing_inline_in_public_items 0 0 1470
clippy::missing_panics_doc 0 0 10
clippy::missing_safety_doc 0 0 9
clippy::missing_trait_methods 0 0 56890
clippy::mixed_read_write_in_expression 0 0 4
clippy::module_inception 0 0 1
clippy::modulo_arithmetic 0 0 16
clippy::multiple_inherent_impl 0 0 139
clippy::multiple_unsafe_ops_per_block 0 0 170
clippy::needless_doctest_main 0 0 2
clippy::needless_pass_by_value 0 0 29
clippy::needless_raw_string_hashes 0 0 1
clippy::needless_return 0 0 1
clippy::non_send_fields_in_send_ty 0 0 4
clippy::option_if_let_else 0 0 15
clippy::panic 0 0 1
clippy::panic_in_result_fn 0 0 19
clippy::partial_pub_fields 0 0 2
clippy::pathbuf_init_then_push 0 0 1
clippy::pattern_type_mismatch 0 0 88
clippy::print_stdout 0 0 1
clippy::ptr_as_ptr 0 0 54
clippy::pub_use 0 0 6
clippy::pub_with_shorthand 0 0 3
clippy::question_mark_used 0 0 94
clippy::redundant_else 0 0 26
clippy::redundant_pub_crate 0 0 16
clippy::ref_option 0 0 2
clippy::repr_packed_without_abi 0 0 1
clippy::result_large_err 0 0 5
clippy::return_and_then 0 0 2
clippy::return_self_not_must_use 0 0 8
clippy::same_name_method 0 0 115
clippy::shadow_reuse 0 0 82
clippy::shadow_same 0 0 1
clippy::shadow_unrelated 0 0 46
clippy::should_implement_trait 0 0 2
clippy::significant_drop_tightening 0 0 2
clippy::similar_names 0 0 1
clippy::single_call_fn 0 0 1942
clippy::single_char_lifetime_names 0 0 250
clippy::single_match 0 0 1
clippy::single_match_else 0 0 6
clippy::std_instead_of_core 0 0 182
clippy::struct_excessive_bools 0 0 5
clippy::struct_field_names 0 0 66
clippy::too_long_first_doc_paragraph 0 0 5
clippy::too_many_lines 0 0 75
clippy::undocumented_unsafe_blocks 0 0 314
clippy::uninlined_format_args 0 0 2
clippy::unnecessary_safety_comment 0 0 48
clippy::unnecessary_wraps 0 0 1
clippy::unseparated_literal_suffix 0 0 17
clippy::unwrap_in_result 0 0 27
clippy::used_underscore_binding 0 0 15
clippy::used_underscore_items 0 0 56
clippy::useless_conversion 0 0 3

This comment will be updated if you push new changes

Merged via the queue into rust-lang:master with commit 334fb90 Aug 7, 2025
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 7, 2025
@flip1995 flip1995 deleted the rustup branch August 7, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants