Skip to content

Commit dfe187d

Browse files
committed
query: simplify stack trimming in cycle_check
1 parent c2fa99d commit dfe187d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/ty/query/job.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ fn cycle_check<'tcx>(query: Lrc<QueryJob<'tcx>>,
295295
// We detected a query cycle, fix up the initial span and return Some
296296

297297
// Remove previous stack entries
298-
stack.splice(0..p, iter::empty());
298+
stack.drain(0..p);
299299
// Replace the span for the first query with the cycle cause
300300
stack[0].0 = span;
301301
Some(None)

0 commit comments

Comments
 (0)