Rollup merge of #111381 - oli-obk:closure_attr, r=petrochenkov
Keep encoding attributes for closures see https://github.com/model-checking/kani/pull/2406#issuecomment-1539630332 for some context. We stopped encoding attributes for closures, but some tools need them
This commit is contained in:
commit
3d4d6703a9
@ -862,6 +862,11 @@ fn should_encode_attrs(def_kind: DefKind) -> bool {
|
||||
| DefKind::Macro(_)
|
||||
| DefKind::Field
|
||||
| DefKind::Impl { .. } => true,
|
||||
// Tools may want to be able to detect their tool lints on
|
||||
// closures from upstream crates, too. This is used by
|
||||
// https://github.com/model-checking/kani and is not a performance
|
||||
// or maintenance issue for us.
|
||||
DefKind::Closure => true,
|
||||
DefKind::TyParam
|
||||
| DefKind::ConstParam
|
||||
| DefKind::Ctor(..)
|
||||
@ -874,7 +879,6 @@ fn should_encode_attrs(def_kind: DefKind) -> bool {
|
||||
| DefKind::ImplTraitPlaceholder
|
||||
| DefKind::LifetimeParam
|
||||
| DefKind::GlobalAsm
|
||||
| DefKind::Closure
|
||||
| DefKind::Generator => false,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user