query: simplify stack trimming in cycle_check
This commit is contained in:
parent
c2fa99d2c6
commit
dfe187d348
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue