mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-20 11:43:04 +00:00
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
@ -13,7 +13,7 @@ struct Collector {
|
||||
modules: Vec<ForeignModule>,
|
||||
}
|
||||
|
||||
impl ItemLikeVisitor<'tcx> for Collector {
|
||||
impl<'tcx> ItemLikeVisitor<'tcx> for Collector {
|
||||
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
|
||||
let items = match it.kind {
|
||||
hir::ItemKind::ForeignMod { items, .. } => items,
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(drain_filter)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(let_else)]
|
||||
#![feature(nll)]
|
||||
#![feature(once_cell)]
|
||||
|
@ -734,7 +734,7 @@ impl<'a> CrateLocator<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_metadata_section(
|
||||
fn get_metadata_section<'p>(
|
||||
target: &Target,
|
||||
flavor: CrateFlavor,
|
||||
filename: &'p Path,
|
||||
|
@ -31,7 +31,7 @@ struct Collector<'tcx> {
|
||||
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>) {
|
||||
let (abi, foreign_mod_items) = match it.kind {
|
||||
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>) {}
|
||||
}
|
||||
|
||||
impl Collector<'tcx> {
|
||||
impl Collector<'_> {
|
||||
fn register_native_lib(&mut self, span: Option<Span>, lib: NativeLib) {
|
||||
if lib.name.as_ref().map_or(false, |&s| s == kw::Empty) {
|
||||
match span {
|
||||
|
@ -628,7 +628,7 @@ where
|
||||
|
||||
implement_ty_decoder!(DecodeContext<'a, 'tcx>);
|
||||
|
||||
impl MetadataBlob {
|
||||
impl<'tcx> MetadataBlob {
|
||||
crate fn new(metadata_ref: MetadataRef) -> MetadataBlob {
|
||||
MetadataBlob(Lrc::new(metadata_ref))
|
||||
}
|
||||
@ -697,7 +697,7 @@ impl CrateRoot<'_> {
|
||||
&self.triple
|
||||
}
|
||||
|
||||
crate fn decode_crate_deps(
|
||||
crate fn decode_crate_deps<'a>(
|
||||
&self,
|
||||
metadata: &'a MetadataBlob,
|
||||
) -> 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) {
|
||||
(self.def_id(), self.def_id())
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ crate enum DefPathHashMapRef<'tcx> {
|
||||
BorrowedFromTcx(&'tcx DefPathHashMap),
|
||||
}
|
||||
|
||||
impl DefPathHashMapRef<'tcx> {
|
||||
impl DefPathHashMapRef<'_> {
|
||||
#[inline]
|
||||
pub fn def_path_hash_to_def_index(&self, def_path_hash: &DefPathHash) -> DefIndex {
|
||||
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) {
|
||||
if self.is_proc_macro {
|
||||
return;
|
||||
@ -1894,7 +1894,7 @@ impl EncodeContext<'a, 'tcx> {
|
||||
}
|
||||
|
||||
// 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>;
|
||||
|
||||
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) {
|
||||
for (variant_index, variant) in adt_def.variants.iter_enumerated() {
|
||||
for (field_index, _field) in variant.fields.iter().enumerate() {
|
||||
|
@ -275,7 +275,7 @@ macro_rules! define_tables {
|
||||
$($name: TableBuilder<$IDX, $T>),+
|
||||
}
|
||||
|
||||
impl TableBuilders<'tcx> {
|
||||
impl<'tcx> TableBuilders<'tcx> {
|
||||
fn encode(&self, buf: &mut Encoder) -> LazyTables<'tcx> {
|
||||
LazyTables {
|
||||
$($name: self.$name.encode(buf)),+
|
||||
|
Loading…
Reference in New Issue
Block a user