diff options
| author | bors <bors@rust-lang.org> | 2023-05-10 06:53:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-10 06:53:47 +0000 |
| commit | 25444e5a2e7293dbb4932df1301b9be4222244fe (patch) | |
| tree | 1886317956574d19a52726e0743e435e96d35b02 /compiler/rustc_metadata/src | |
| parent | 63fc57b98eea5d6d84f1ccc4dbfcb12d58ad430b (diff) | |
| parent | 70d5bf7fae8dfacf9db1b58190d8eaae5e4e4104 (diff) | |
Auto merge of #111414 - matthiaskrgr:rollup-q0qoc47, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #110673 (Make alias bounds sound in the new solver (take 2)) - #110747 (Encode types in SMIR) - #111095 (Correctly handle associated items of a trait inside a `#[doc(hidden)]` item) - #111381 (Keep encoding attributes for closures) - #111408 (Fix incorrect implication of transmuting slices) - #111410 (Switch to `EarlyBinder` for `thir_abstract_const` query) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_metadata/src')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/encoder.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/mod.rs | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index 82c66b9dfb9..29cf432b8f9 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -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, } } diff --git a/compiler/rustc_metadata/src/rmeta/mod.rs b/compiler/rustc_metadata/src/rmeta/mod.rs index 84f6b7f934d..e2f6acb186b 100644 --- a/compiler/rustc_metadata/src/rmeta/mod.rs +++ b/compiler/rustc_metadata/src/rmeta/mod.rs @@ -394,7 +394,7 @@ define_tables! { mir_for_ctfe: Table<DefIndex, LazyValue<mir::Body<'static>>>, mir_generator_witnesses: Table<DefIndex, LazyValue<mir::GeneratorLayout<'static>>>, promoted_mir: Table<DefIndex, LazyValue<IndexVec<mir::Promoted, mir::Body<'static>>>>, - thir_abstract_const: Table<DefIndex, LazyValue<ty::Const<'static>>>, + thir_abstract_const: Table<DefIndex, LazyValue<ty::EarlyBinder<ty::Const<'static>>>>, impl_parent: Table<DefIndex, RawDefId>, impl_polarity: Table<DefIndex, ty::ImplPolarity>, constness: Table<DefIndex, hir::Constness>, |
