Rollup merge of #91926 - SylvanB:remove_in_band_lifetimes_from_rustc_metadata, r=nagisa
Remove `in_band_lifetimes` from `rustc_metadata` Another for #91867
This commit is contained in:
commit
9e720a8aae
9 changed files with 12 additions and 13 deletions
|
@ -13,7 +13,7 @@ struct Collector {
|
||||||
modules: Vec<ForeignModule>,
|
modules: Vec<ForeignModule>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ItemLikeVisitor<'tcx> for Collector {
|
impl<'tcx> ItemLikeVisitor<'tcx> for Collector {
|
||||||
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
|
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
|
||||||
let items = match it.kind {
|
let items = match it.kind {
|
||||||
hir::ItemKind::ForeignMod { items, .. } => items,
|
hir::ItemKind::ForeignMod { items, .. } => items,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||||
#![feature(crate_visibility_modifier)]
|
#![feature(crate_visibility_modifier)]
|
||||||
#![feature(drain_filter)]
|
#![feature(drain_filter)]
|
||||||
#![feature(in_band_lifetimes)]
|
|
||||||
#![feature(let_else)]
|
#![feature(let_else)]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(once_cell)]
|
#![feature(once_cell)]
|
||||||
|
|
|
@ -734,7 +734,7 @@ impl<'a> CrateLocator<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_metadata_section(
|
fn get_metadata_section<'p>(
|
||||||
target: &Target,
|
target: &Target,
|
||||||
flavor: CrateFlavor,
|
flavor: CrateFlavor,
|
||||||
filename: &'p Path,
|
filename: &'p Path,
|
||||||
|
|
|
@ -31,7 +31,7 @@ struct Collector<'tcx> {
|
||||||
libs: Vec<NativeLib>,
|
libs: Vec<NativeLib>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
|
impl<'tcx> ItemLikeVisitor<'tcx> for Collector<'tcx> {
|
||||||
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
|
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
|
||||||
let (abi, foreign_mod_items) = match it.kind {
|
let (abi, foreign_mod_items) = match it.kind {
|
||||||
hir::ItemKind::ForeignMod { abi, items } => (abi, items),
|
hir::ItemKind::ForeignMod { abi, items } => (abi, items),
|
||||||
|
@ -223,7 +223,7 @@ impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
|
||||||
fn visit_foreign_item(&mut self, _it: &'tcx hir::ForeignItem<'tcx>) {}
|
fn visit_foreign_item(&mut self, _it: &'tcx hir::ForeignItem<'tcx>) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Collector<'tcx> {
|
impl Collector<'_> {
|
||||||
fn register_native_lib(&mut self, span: Option<Span>, lib: NativeLib) {
|
fn register_native_lib(&mut self, span: Option<Span>, lib: NativeLib) {
|
||||||
if lib.name.as_ref().map_or(false, |&s| s == kw::Empty) {
|
if lib.name.as_ref().map_or(false, |&s| s == kw::Empty) {
|
||||||
match span {
|
match span {
|
||||||
|
|
|
@ -628,7 +628,7 @@ where
|
||||||
|
|
||||||
implement_ty_decoder!(DecodeContext<'a, 'tcx>);
|
implement_ty_decoder!(DecodeContext<'a, 'tcx>);
|
||||||
|
|
||||||
impl MetadataBlob {
|
impl<'tcx> MetadataBlob {
|
||||||
crate fn new(metadata_ref: MetadataRef) -> MetadataBlob {
|
crate fn new(metadata_ref: MetadataRef) -> MetadataBlob {
|
||||||
MetadataBlob(Lrc::new(metadata_ref))
|
MetadataBlob(Lrc::new(metadata_ref))
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@ impl CrateRoot<'_> {
|
||||||
&self.triple
|
&self.triple
|
||||||
}
|
}
|
||||||
|
|
||||||
crate fn decode_crate_deps(
|
crate fn decode_crate_deps<'a>(
|
||||||
&self,
|
&self,
|
||||||
metadata: &'a MetadataBlob,
|
metadata: &'a MetadataBlob,
|
||||||
) -> impl ExactSizeIterator<Item = CrateDep> + Captures<'a> {
|
) -> impl ExactSizeIterator<Item = CrateDep> + Captures<'a> {
|
||||||
|
|
|
@ -83,7 +83,7 @@ impl IntoArgs for (CrateNum, DefId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IntoArgs for ty::InstanceDef<'tcx> {
|
impl<'tcx> IntoArgs for ty::InstanceDef<'tcx> {
|
||||||
fn into_args(self) -> (DefId, DefId) {
|
fn into_args(self) -> (DefId, DefId) {
|
||||||
(self.def_id(), self.def_id())
|
(self.def_id(), self.def_id())
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ crate enum DefPathHashMapRef<'tcx> {
|
||||||
BorrowedFromTcx(&'tcx DefPathHashMap),
|
BorrowedFromTcx(&'tcx DefPathHashMap),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DefPathHashMapRef<'tcx> {
|
impl DefPathHashMapRef<'_> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn def_path_hash_to_def_index(&self, def_path_hash: &DefPathHash) -> DefIndex {
|
pub fn def_path_hash_to_def_index(&self, def_path_hash: &DefPathHash) -> DefIndex {
|
||||||
match *self {
|
match *self {
|
||||||
|
|
|
@ -964,7 +964,7 @@ fn should_encode_generics(def_kind: DefKind) -> bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EncodeContext<'a, 'tcx> {
|
impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
||||||
fn encode_def_ids(&mut self) {
|
fn encode_def_ids(&mut self) {
|
||||||
if self.is_proc_macro {
|
if self.is_proc_macro {
|
||||||
return;
|
return;
|
||||||
|
@ -1894,7 +1894,7 @@ impl EncodeContext<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(eddyb) make metadata encoding walk over all definitions, instead of HIR.
|
// FIXME(eddyb) make metadata encoding walk over all definitions, instead of HIR.
|
||||||
impl Visitor<'tcx> for EncodeContext<'a, 'tcx> {
|
impl<'a, 'tcx> Visitor<'tcx> for EncodeContext<'a, 'tcx> {
|
||||||
type Map = Map<'tcx>;
|
type Map = Map<'tcx>;
|
||||||
|
|
||||||
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
|
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
|
||||||
|
@ -1927,7 +1927,7 @@ impl Visitor<'tcx> for EncodeContext<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EncodeContext<'a, 'tcx> {
|
impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
||||||
fn encode_fields(&mut self, adt_def: &ty::AdtDef) {
|
fn encode_fields(&mut self, adt_def: &ty::AdtDef) {
|
||||||
for (variant_index, variant) in adt_def.variants.iter_enumerated() {
|
for (variant_index, variant) in adt_def.variants.iter_enumerated() {
|
||||||
for (field_index, _field) in variant.fields.iter().enumerate() {
|
for (field_index, _field) in variant.fields.iter().enumerate() {
|
||||||
|
|
|
@ -275,7 +275,7 @@ macro_rules! define_tables {
|
||||||
$($name: TableBuilder<$IDX, $T>),+
|
$($name: TableBuilder<$IDX, $T>),+
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TableBuilders<'tcx> {
|
impl<'tcx> TableBuilders<'tcx> {
|
||||||
fn encode(&self, buf: &mut Encoder) -> LazyTables<'tcx> {
|
fn encode(&self, buf: &mut Encoder) -> LazyTables<'tcx> {
|
||||||
LazyTables {
|
LazyTables {
|
||||||
$($name: self.$name.encode(buf)),+
|
$($name: self.$name.encode(buf)),+
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue