Skip to content

Commit 9e720a8

Browse files
authored
Rollup merge of #91926 - SylvanB:remove_in_band_lifetimes_from_rustc_metadata, r=nagisa
Remove `in_band_lifetimes` from `rustc_metadata` Another for #91867
2 parents 1c42199 + 8679e17 commit 9e720a8

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

compiler/rustc_metadata/src/foreign_modules.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Collector {
1313
modules: Vec<ForeignModule>,
1414
}
1515

16-
impl ItemLikeVisitor<'tcx> for Collector {
16+
impl<'tcx> ItemLikeVisitor<'tcx> for Collector {
1717
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
1818
let items = match it.kind {
1919
hir::ItemKind::ForeignMod { items, .. } => items,

compiler/rustc_metadata/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
22
#![feature(crate_visibility_modifier)]
33
#![feature(drain_filter)]
4-
#![feature(in_band_lifetimes)]
54
#![feature(let_else)]
65
#![feature(nll)]
76
#![feature(once_cell)]

compiler/rustc_metadata/src/locator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ impl<'a> CrateLocator<'a> {
734734
}
735735
}
736736

737-
fn get_metadata_section(
737+
fn get_metadata_section<'p>(
738738
target: &Target,
739739
flavor: CrateFlavor,
740740
filename: &'p Path,

compiler/rustc_metadata/src/native_libs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct Collector<'tcx> {
3131
libs: Vec<NativeLib>,
3232
}
3333

34-
impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
34+
impl<'tcx> ItemLikeVisitor<'tcx> for Collector<'tcx> {
3535
fn visit_item(&mut self, it: &'tcx hir::Item<'tcx>) {
3636
let (abi, foreign_mod_items) = match it.kind {
3737
hir::ItemKind::ForeignMod { abi, items } => (abi, items),
@@ -223,7 +223,7 @@ impl ItemLikeVisitor<'tcx> for Collector<'tcx> {
223223
fn visit_foreign_item(&mut self, _it: &'tcx hir::ForeignItem<'tcx>) {}
224224
}
225225

226-
impl Collector<'tcx> {
226+
impl Collector<'_> {
227227
fn register_native_lib(&mut self, span: Option<Span>, lib: NativeLib) {
228228
if lib.name.as_ref().map_or(false, |&s| s == kw::Empty) {
229229
match span {

compiler/rustc_metadata/src/rmeta/decoder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ where
628628

629629
implement_ty_decoder!(DecodeContext<'a, 'tcx>);
630630

631-
impl MetadataBlob {
631+
impl<'tcx> MetadataBlob {
632632
crate fn new(metadata_ref: MetadataRef) -> MetadataBlob {
633633
MetadataBlob(Lrc::new(metadata_ref))
634634
}
@@ -697,7 +697,7 @@ impl CrateRoot<'_> {
697697
&self.triple
698698
}
699699

700-
crate fn decode_crate_deps(
700+
crate fn decode_crate_deps<'a>(
701701
&self,
702702
metadata: &'a MetadataBlob,
703703
) -> impl ExactSizeIterator<Item = CrateDep> + Captures<'a> {

compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl IntoArgs for (CrateNum, DefId) {
8383
}
8484
}
8585

86-
impl IntoArgs for ty::InstanceDef<'tcx> {
86+
impl<'tcx> IntoArgs for ty::InstanceDef<'tcx> {
8787
fn into_args(self) -> (DefId, DefId) {
8888
(self.def_id(), self.def_id())
8989
}

compiler/rustc_metadata/src/rmeta/def_path_hash_map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ crate enum DefPathHashMapRef<'tcx> {
1111
BorrowedFromTcx(&'tcx DefPathHashMap),
1212
}
1313

14-
impl DefPathHashMapRef<'tcx> {
14+
impl DefPathHashMapRef<'_> {
1515
#[inline]
1616
pub fn def_path_hash_to_def_index(&self, def_path_hash: &DefPathHash) -> DefIndex {
1717
match *self {

compiler/rustc_metadata/src/rmeta/encoder.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ fn should_encode_generics(def_kind: DefKind) -> bool {
964964
}
965965
}
966966

967-
impl EncodeContext<'a, 'tcx> {
967+
impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
968968
fn encode_def_ids(&mut self) {
969969
if self.is_proc_macro {
970970
return;
@@ -1894,7 +1894,7 @@ impl EncodeContext<'a, 'tcx> {
18941894
}
18951895

18961896
// FIXME(eddyb) make metadata encoding walk over all definitions, instead of HIR.
1897-
impl Visitor<'tcx> for EncodeContext<'a, 'tcx> {
1897+
impl<'a, 'tcx> Visitor<'tcx> for EncodeContext<'a, 'tcx> {
18981898
type Map = Map<'tcx>;
18991899

19001900
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
@@ -1927,7 +1927,7 @@ impl Visitor<'tcx> for EncodeContext<'a, 'tcx> {
19271927
}
19281928
}
19291929

1930-
impl EncodeContext<'a, 'tcx> {
1930+
impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
19311931
fn encode_fields(&mut self, adt_def: &ty::AdtDef) {
19321932
for (variant_index, variant) in adt_def.variants.iter_enumerated() {
19331933
for (field_index, _field) in variant.fields.iter().enumerate() {

compiler/rustc_metadata/src/rmeta/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ macro_rules! define_tables {
275275
$($name: TableBuilder<$IDX, $T>),+
276276
}
277277

278-
impl TableBuilders<'tcx> {
278+
impl<'tcx> TableBuilders<'tcx> {
279279
fn encode(&self, buf: &mut Encoder) -> LazyTables<'tcx> {
280280
LazyTables {
281281
$($name: self.$name.encode(buf)),+

0 commit comments

Comments
 (0)