rustc_const_eval: strings are not indexable in Rust 1.x.

This commit is contained in:
Eduard Burtescu 2016-05-26 20:19:45 +03:00
parent b6ce2aa4ea
commit afc598e075

View file

@ -856,9 +856,6 @@ pub fn eval_const_expr_partial<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
Integral(U8(data[idx as usize]))
},
Str(ref s) if idx as usize >= s.len() => signal!(e, IndexOutOfBounds),
// FIXME: return a const char
Str(_) => signal!(e, UnimplementedConstVal("indexing into str")),
_ => signal!(e, IndexedNonVec),
}
}