rust/compiler/rustc_lint/src
Jubilee 6a42df7517
Rollup merge of #126040 - Urgau:unreachable_pub-fields-less, r=petrochenkov
Don't warn on fields in the `unreachable_pub` lint

This PR restrict the `unreachable_pub` lint by not linting on `pub` fields of `pub(restricted)` structs and unions. This is done because that can quickly clutter the code for an uncertain value, in particular since the "real" visibility is defined by the parent (the struct it-self).

This is meant to address one of the last concern of the `unreachable_pub` lint.

r? ``@petrochenkov``
2024-06-06 21:10:10 -07:00
..
context Auto merge of #124482 - spastorino:unsafe-extern-blocks, r=oli-obk 2024-06-06 08:14:58 +00:00
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
async_fn_in_trait.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
builtin.rs Rollup merge of #126040 - Urgau:unreachable_pub-fields-less, r=petrochenkov 2024-06-06 21:10:10 -07:00
context.rs Tweak CheckLintNameResult::Tool. 2024-06-03 09:02:49 +10:00
deref_into_dyn_supertrait.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
drop_forget_useless.rs Change lint_dropping_copy_types to use UseLetUnderscoreIgnoreSuggestion as suggestion. 2024-05-29 18:09:20 +08:00
early.rs Remove #[macro_use] extern crate tracing from rustc_lint. 2024-05-23 18:02:17 +10:00
enum_intrinsics_non_enums.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
errors.rs Fix up comments. 2024-06-03 08:44:33 +10:00
expect.rs Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
for_loops_over_fallibles.rs Run rustfmt on files that need it. 2024-05-24 15:17:21 +10:00
foreign_modules.rs Remove #[macro_use] extern crate tracing from rustc_lint. 2024-05-23 18:02:17 +10:00
hidden_unicode_codepoints.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
impl_trait_overcaptures.rs Auto merge of #125410 - fmease:adj-lint-diag-api, r=nnethercote 2024-05-27 08:44:12 +00:00
internal.rs Fix up comments. 2024-06-03 08:44:33 +10:00
invalid_from_utf8.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
late.rs Don't require visit_body to take a lifetime that must outlive the function call 2024-05-29 10:04:08 +00:00
let_underscore.rs Fix up comments. 2024-06-03 08:44:33 +10:00
levels.rs Tweak CheckLintNameResult::Tool. 2024-06-03 09:02:49 +10:00
lib.rs Auto merge of #124661 - RalfJung:only-structural-consts-in-patterns, r=pnkfelix 2024-05-26 07:55:47 +00:00
lints.rs Auto merge of #124482 - spastorino:unsafe-extern-blocks, r=oli-obk 2024-06-06 08:14:58 +00:00
map_unit_fn.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
methods.rs Fix up comments. 2024-06-03 08:44:33 +10:00
multiple_supertrait_upcastable.rs check_is_object_safe -> is_object_safe 2024-06-03 09:49:30 -04:00
non_ascii_idents.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
non_fmt_panic.rs Remove LintDiagnostic::msg 2024-05-23 04:08:35 +02:00
non_local_def.rs Fix up comments. 2024-06-03 08:44:33 +10:00
nonstandard_style.rs Fix up comments. 2024-06-03 08:44:33 +10:00
noop_method_call.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
opaque_hidden_inferred_bound.rs Align Term methods with GenericArg methods 2024-06-03 20:36:27 -04:00
pass_by_value.rs Auto merge of #124401 - oli-obk:some_hir_cleanups, r=cjgillot 2024-05-04 00:32:27 +00:00
passes.rs Reduce some pub exposure. 2024-06-03 08:44:33 +10:00
ptr_nulls.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
redundant_semicolon.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
reference_casting.rs Handle Deref expressions in invalid_reference_casting 2024-05-10 12:33:07 -04:00
shadowed_into_iter.rs Implement BOXED_SLICE_INTO_ITER 2024-05-20 19:21:30 -04:00
tests.rs refactor(rustc_lint): inline check_lint_name_cmdline 2023-08-30 17:35:07 +01:00
traits.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
types.rs Handle safety keyword for extern block inner items 2024-06-04 14:19:42 -03:00
unit_bindings.rs Inline & delete Ty::new_unit, since it's just a field access 2024-05-02 17:49:23 +02:00
unused.rs Fix up comments. 2024-06-03 08:44:33 +10:00