Type checking and trans for ranges
This commit is contained in:
parent
8a357e1d87
commit
17826e10a2
8 changed files with 102 additions and 29 deletions
|
@ -439,8 +439,10 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
|||
start.iter().chain(end.iter()).map(|x| &**x))
|
||||
}
|
||||
|
||||
ast::ExprRange(..) => {
|
||||
self.tcx.sess.span_bug(expr.span, "non-desugared range");
|
||||
ast::ExprRange(ref start, ref end) => {
|
||||
let fields = Some(&**start).into_iter()
|
||||
.chain(end.as_ref().map(|e| &**e).into_iter());
|
||||
self.straightline(expr, pred, fields)
|
||||
}
|
||||
|
||||
ast::ExprUnary(_, ref e) if self.is_method_call(expr) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue