diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2016-05-26 20:19:45 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2016-06-05 14:41:04 +0300 |
| commit | afc598e07543cc0c927e976c7e3621e44843135c (patch) | |
| tree | c15e505dc77f151e6f5ed103037f59a5d0f687e2 | |
| parent | b6ce2aa4eacdbad3e98b17d3a66daea3cc7f2880 (diff) | |
rustc_const_eval: strings are not indexable in Rust 1.x.
| -rw-r--r-- | src/librustc_const_eval/eval.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index a61318c47a4..b7cdb05a5d7 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -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), } } |
