We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33a01e2 commit b7f570fCopy full SHA for b7f570f
compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -862,6 +862,11 @@ fn should_encode_attrs(def_kind: DefKind) -> bool {
862
| DefKind::Macro(_)
863
| DefKind::Field
864
| DefKind::Impl { .. } => true,
865
+ // Tools may want to be able to detect their tool lints on
866
+ // closures from upstream crates, too. This is used by
867
+ // https://github.com/model-checking/kani and is not a performance
868
+ // or maintenance issue for us.
869
+ DefKind::Closure => true,
870
DefKind::TyParam
871
| DefKind::ConstParam
872
| DefKind::Ctor(..)
@@ -874,7 +879,6 @@ fn should_encode_attrs(def_kind: DefKind) -> bool {
874
879
| DefKind::ImplTraitPlaceholder
875
880
| DefKind::LifetimeParam
876
881
| DefKind::GlobalAsm
877
- | DefKind::Closure
878
882
| DefKind::Generator => false,
883
}
884
0 commit comments