diff options
| author | Anthony Ramine <n.oxyde@gmail.com> | 2016-11-10 13:09:34 +0100 |
|---|---|---|
| committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-11-10 14:43:46 +0100 |
| commit | 84239dfc4ad1810d5d8ff86b4e0ad008d04632d6 (patch) | |
| tree | 0827fe503aa845f8c31445f09d8373211b1addfb /src/librustc_const_eval | |
| parent | c11e2bda394c786fff27df94bfbe292ba33294df (diff) | |
Work around a borrow surviving too long (fixes #37686)
Diffstat (limited to 'src/librustc_const_eval')
| -rw-r--r-- | src/librustc_const_eval/pattern.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_const_eval/pattern.rs b/src/librustc_const_eval/pattern.rs index 10b2a7625ca..241920f2949 100644 --- a/src/librustc_const_eval/pattern.rs +++ b/src/librustc_const_eval/pattern.rs @@ -223,7 +223,8 @@ impl<'a, 'gcx, 'tcx> PatternContext<'a, 'gcx, 'tcx> { } PatKind::Tuple(ref subpatterns, ddpos) => { - match self.tcx.tables().node_id_to_type(pat.id).sty { + let ty = self.tcx.tables().node_id_to_type(pat.id); + match ty.sty { ty::TyTuple(ref tys) => { let subpatterns = subpatterns.iter() |
