Skip to content

Commit 410f850

Browse files
incr.comp.: Use the awesome new '_ in a few places.
1 parent c531d9f commit 410f850

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

src/librustc/dep_graph/graph.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,10 @@ impl DepGraph {
461461
self.data.as_ref().and_then(|data| data.colors.borrow().get(dep_node).cloned())
462462
}
463463

464-
pub fn try_mark_green<'a, 'tcx>(&self,
465-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
466-
dep_node: &DepNode)
467-
-> Option<DepNodeIndex> {
464+
pub fn try_mark_green<'tcx>(&self,
465+
tcx: TyCtxt<'_, 'tcx, 'tcx>,
466+
dep_node: &DepNode)
467+
-> Option<DepNodeIndex> {
468468
debug!("try_mark_green({:?}) - BEGIN", dep_node);
469469
let data = self.data.as_ref().unwrap();
470470

src/librustc/ty/maps/config.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub(super) trait QueryDescription<'tcx>: QueryConfig {
3131
false
3232
}
3333

34-
fn try_load_from_disk<'a>(_: TyCtxt<'a, 'tcx, 'tcx>,
35-
_: SerializedDepNodeIndex)
36-
-> Option<Self::Value> {
34+
fn try_load_from_disk(_: TyCtxt<'_, 'tcx, 'tcx>,
35+
_: SerializedDepNodeIndex)
36+
-> Option<Self::Value> {
3737
bug!("QueryDescription::load_from_disk() called for unsupport query.")
3838
}
3939
}
@@ -556,9 +556,9 @@ impl<'tcx> QueryDescription<'tcx> for queries::typeck_tables_of<'tcx> {
556556
def_id.is_local()
557557
}
558558

559-
fn try_load_from_disk<'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
560-
id: SerializedDepNodeIndex)
561-
-> Option<Self::Value> {
559+
fn try_load_from_disk(tcx: TyCtxt<'_, 'tcx, 'tcx>,
560+
id: SerializedDepNodeIndex)
561+
-> Option<Self::Value> {
562562
let typeck_tables: Option<ty::TypeckTables<'tcx>> = tcx
563563
.on_disk_query_result_cache
564564
.try_load_query_result(tcx, id);

src/librustc/ty/maps/on_disk_cache.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ impl<'sess> OnDiskCache<'sess> {
291291

292292
/// Returns the cached query result if there is something in the cache for
293293
/// the given SerializedDepNodeIndex. Otherwise returns None.
294-
pub fn try_load_query_result<'a, 'tcx, T>(&self,
295-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
296-
dep_node_index: SerializedDepNodeIndex)
297-
-> Option<T>
294+
pub fn try_load_query_result<'tcx, T>(&self,
295+
tcx: TyCtxt<'_, 'tcx, 'tcx>,
296+
dep_node_index: SerializedDepNodeIndex)
297+
-> Option<T>
298298
where T: Decodable
299299
{
300300
self.load_indexed(tcx,
@@ -319,13 +319,13 @@ impl<'sess> OnDiskCache<'sess> {
319319
x.extend(diagnostics.into_iter());
320320
}
321321

322-
fn load_indexed<'a, 'tcx, T>(&self,
323-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
324-
dep_node_index: SerializedDepNodeIndex,
325-
index: &FxHashMap<SerializedDepNodeIndex,
326-
AbsoluteBytePos>,
327-
debug_tag: &'static str)
328-
-> Option<T>
322+
fn load_indexed<'tcx, T>(&self,
323+
tcx: TyCtxt<'_, 'tcx, 'tcx>,
324+
dep_node_index: SerializedDepNodeIndex,
325+
index: &FxHashMap<SerializedDepNodeIndex,
326+
AbsoluteBytePos>,
327+
debug_tag: &'static str)
328+
-> Option<T>
329329
where T: Decodable
330330
{
331331
let pos = if let Some(&pos) = index.get(&dep_node_index) {

0 commit comments

Comments
 (0)