about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-12-19 17:36:39 +0100
committerljedrz <ljedrz@gmail.com>2018-12-19 17:36:39 +0100
commitdfe187d348aa74b47c4caaac112945adfd47456e (patch)
tree8453e8774e09cae4da78dc3a814bdb580a3f7ebc /src
parentc2fa99d2c6671ef9771df76335f6b528847e598c (diff)
downloadrust-dfe187d348aa74b47c4caaac112945adfd47456e.tar.gz
rust-dfe187d348aa74b47c4caaac112945adfd47456e.zip
query: simplify stack trimming in cycle_check
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/query/job.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/ty/query/job.rs b/src/librustc/ty/query/job.rs
index 4ee5ef6b1fd..709d6201d4f 100644
--- a/src/librustc/ty/query/job.rs
+++ b/src/librustc/ty/query/job.rs
@@ -295,7 +295,7 @@ fn cycle_check<'tcx>(query: Lrc<QueryJob<'tcx>>,
             // We detected a query cycle, fix up the initial span and return Some
 
             // Remove previous stack entries
-            stack.splice(0..p, iter::empty());
+            stack.drain(0..p);
             // Replace the span for the first query with the cycle cause
             stack[0].0 = span;
             Some(None)