Skip to content

Commit fc583e1

Browse files
committed
compiles
Signed-off-by: Zahari Dichev <[email protected]>
1 parent 5ea834a commit fc583e1

File tree

5 files changed

+9
-18
lines changed

5 files changed

+9
-18
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,10 @@ macro_rules! declare_arena {
733733
self.dropless.alloc_slice(value)
734734
}
735735

736-
pub fn alloc_from_iter<'a, T: ArenaAllocatable<'tcx, U>, U>(
737-
&'a self,
738-
iter: impl ::std::iter::IntoIterator<Item = T>,
739-
) -> &'a mut [T] {
736+
pub fn alloc_from_iter<T: ArenaAllocatable<'tcx, U>, U, V: IntoIterator<Item = T>>(
737+
&self,
738+
iter: V,
739+
) -> &mut [T] {
740740
T::allocate_from_iter(self, iter)
741741
}
742742
}

compiler/rustc_ast/src/attr/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,10 @@ impl MetaItemKind {
497497
fn token_trees_and_spacings(&self, span: Span) -> Vec<TreeAndSpacing> {
498498
match *self {
499499
MetaItemKind::Word => vec![],
500-
MetaItemKind::NameValue(ref lit) => {
501-
vec![
502-
TokenTree::token(token::Eq, span).into(),
503-
TokenTree::Token(lit.to_token()).into(),
504-
]
505-
}
500+
MetaItemKind::NameValue(ref lit) => vec![
501+
TokenTree::token(token::Eq, span).into(),
502+
TokenTree::Token(lit.to_token()).into(),
503+
],
506504
MetaItemKind::List(ref list) => {
507505
let mut tokens = Vec::new();
508506
for (i, item) in list.iter().enumerate() {

compiler/rustc_middle/src/ty/codec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ encodable_via_deref! {
160160
pub trait TyDecoder<'tcx>: Decoder {
161161
const CLEAR_CROSS_CRATE: bool;
162162

163-
//fn tcx(&self) -> TyCtxt<'tcx>;
164163
fn interner(&self) -> TyInterner<'tcx>;
165164

166165
fn peek_byte(&self) -> u8;

compiler/rustc_middle/src/ty/context.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ use rustc_hir::{
5252
};
5353
use rustc_index::vec::{Idx, IndexVec};
5454
use rustc_macros::HashStable;
55-
use rustc_middle::arena::ArenaAllocatable;
5655
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder};
5756
use rustc_session::config::{BorrowckMode, CrateType, OutputFilenames};
5857
use rustc_session::lint::{Level, Lint};
@@ -193,7 +192,7 @@ impl<'tcx> Interner for TyInterner<'tcx> {
193192
self,
194193
iter: impl IntoIterator<Item = Self::Span>,
195194
) -> Self::AllocatedSpanSlice {
196-
self.tcx.arena.alloc_from_iter(iter)
195+
self.tcx.arena.alloc_from_iter::<Self::Span, Self::Span, _>(iter)
197196
}
198197

199198
fn alloc_promoted(self, value: Self::Promoted) -> Self::AllocatedPromoted {

compiler/rustc_middle/src/ty/query/on_disk_cache.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,6 @@ where
754754
impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx> {
755755
const CLEAR_CROSS_CRATE: bool = false;
756756

757-
// #[inline]
758-
// fn tcx(&self) -> TyCtxt<'tcx> {
759-
// self.tcx
760-
// }
761-
762757
#[inline]
763758
fn interner(&self) -> TyInterner<'tcx> {
764759
self.tcx.interner()

0 commit comments

Comments
 (0)