Skip to content

Commit 443e0ad

Browse files
committed
ImproperCTypes: re-separate linting and checking
no visible changes to rust users, just making the inner architecture of the ImproperCTypes lints more sensible, with a clean separation between the struct (now singular) that interacts with the linting system and the struct (now singular) that visits the types to check FFI-safety
1 parent 5ac6788 commit 443e0ad

File tree

3 files changed

+275
-221
lines changed

3 files changed

+275
-221
lines changed

compiler/rustc_lint/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ late_lint_methods!(
194194
DefaultCouldBeDerived: DefaultCouldBeDerived::default(),
195195
DerefIntoDynSupertrait: DerefIntoDynSupertrait,
196196
DropForgetUseless: DropForgetUseless,
197-
ImproperCTypesDeclarations: ImproperCTypesDeclarations,
198-
ImproperCTypesDefinitions: ImproperCTypesDefinitions,
197+
ImproperCTypesLint: ImproperCTypesLint,
199198
InvalidFromUtf8: InvalidFromUtf8,
200199
VariantSizeDifferences: VariantSizeDifferences,
201200
PathStatements: PathStatements,

compiler/rustc_lint/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use tracing::debug;
1111
use {rustc_ast as ast, rustc_hir as hir};
1212

1313
mod improper_ctypes; // these filed do the implementation for ImproperCTypesDefinitions,ImproperCTypesDeclarations
14-
pub(crate) use improper_ctypes::{ImproperCTypesDeclarations, ImproperCTypesDefinitions};
14+
pub(crate) use improper_ctypes::ImproperCTypesLint;
1515

1616
use crate::lints::{
1717
AmbiguousWidePointerComparisons, AmbiguousWidePointerComparisonsAddrMetadataSuggestion,

0 commit comments

Comments
 (0)