rust/compiler/rustc_lint/src
Matthias Krüger b2d132f10e
Rollup merge of #116863 - workingjubilee:non-exhaustive-is-not-ffi-unsafe, r=jieyouxu
warn less about non-exhaustive in ffi

Bindgen allows generating `#[non_exhaustive] #[repr(u32)]` enums. This results in nonintuitive nonlocal `improper_ctypes` warnings, even when the types are otherwise perfectly valid in C.

Adjust for actual tooling expectations by avoiding warning on simple enums with only unit variants.

Closes https://github.com/rust-lang/rust/issues/116831
2024-10-19 22:00:54 +02:00
..
context Reserve guarded string literals (RFC 3593) 2024-10-08 18:21:16 -06:00
nonstandard_style
types Rollup merge of #116863 - workingjubilee:non-exhaustive-is-not-ffi-unsafe, r=jieyouxu 2024-10-19 22:00:54 +02:00
async_closures.rs docs: Enable required feature for 'closure_returning_async_block' lint 2024-09-14 10:43:26 +02:00
async_fn_in_trait.rs rm ItemKind::OpaqueTy 2024-10-04 23:28:22 +00:00
builtin.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
context.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
deref_into_dyn_supertrait.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
drop_forget_useless.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
early.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
enum_intrinsics_non_enums.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
errors.rs Add warn(unreachable_pub) to rustc_lint. 2024-08-27 15:24:11 +10:00
expect.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
for_loops_over_fallibles.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
foreign_modules.rs Make clashing_extern_declarations considering generic args for ADT field 2024-09-27 16:37:43 +08:00
hidden_unicode_codepoints.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
if_let_rescope.rs update bootstrap configs 2024-10-15 20:30:23 -07:00
impl_trait_overcaptures.rs rm ItemKind::OpaqueTy 2024-10-04 23:28:22 +00:00
internal.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
invalid_from_utf8.rs Remove extern crate rustc_session from rustc_lint. 2024-04-29 13:57:41 +10:00
late.rs Remove an unnecessary &Lrc<_> local variable. 2024-10-07 13:58:29 +11:00
let_underscore.rs Fix the misleading diagnostic for let_underscore_drop on type without Drop implementation 2024-09-26 10:18:18 +08:00
levels.rs Rename NestedMetaItem to MetaItemInner 2024-10-06 23:28:30 +09:00
lib.rs Auto merge of #129670 - est31:cfg_attr_crate_type_name_error, r=Urgau 2024-10-06 17:00:02 +00:00
lints.rs Remove deprecation note in the non_local_definitions warning 2024-10-11 21:21:32 +02:00
macro_expr_fragment_specifier_2024_migration.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
map_unit_fn.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
methods.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
multiple_supertrait_upcastable.rs Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
non_ascii_idents.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
non_fmt_panic.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
non_local_def.rs Also use outermost const-anon for impl items in non_local_defs lint 2024-10-13 18:14:29 +02:00
nonstandard_style.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
noop_method_call.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
opaque_hidden_inferred_bound.rs rm ItemKind::OpaqueTy 2024-10-04 23:28:22 +00:00
pass_by_value.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
passes.rs add unqualified_local_imports lint 2024-09-23 11:57:28 +02:00
precedence.rs Temporarily switch ambiguous_negative_literals lint to allow 2024-07-31 19:36:47 +02:00
ptr_nulls.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
redundant_semicolon.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
reference_casting.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
shadowed_into_iter.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
static_mut_refs.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
tail_expr_drop_order.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
tests.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
traits.rs Move trait bound modifiers into hir::PolyTraitRef 2024-10-14 09:20:38 -04:00
types.rs Rollup merge of #116863 - workingjubilee:non-exhaustive-is-not-ffi-unsafe, r=jieyouxu 2024-10-19 22:00:54 +02:00
unit_bindings.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
unqualified_local_imports.rs add unqualified_local_imports lint 2024-09-23 11:57:28 +02:00
unused.rs Make unused_parens's suggestion considering expr's attributes 2024-10-12 09:32:25 +08:00