rustc_const_eval: strings are not indexable in Rust 1.x.
This commit is contained in:
parent
b6ce2aa4ea
commit
afc598e075
1 changed files with 0 additions and 3 deletions
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue