diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-06-21 10:08:31 +0200 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-06-21 10:08:31 +0200 |
| commit | 0de72bba3634efb9d7b637b274c8f2ec1a335bf4 (patch) | |
| tree | 0bab51d0891dd94a4fdecce04895b6c8d93be1db /src/librustc_const_eval | |
| parent | 4ba60aba387b19267cace9759d9cf14682b72871 (diff) | |
| download | rust-0de72bba3634efb9d7b637b274c8f2ec1a335bf4.tar.gz rust-0de72bba3634efb9d7b637b274c8f2ec1a335bf4.zip | |
don't warn on casting byte strs to slices
Diffstat (limited to 'src/librustc_const_eval')
| -rw-r--r-- | src/librustc_const_eval/eval.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index 7551bc5c234..34dce440048 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -1116,6 +1116,7 @@ fn cast_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, val: ConstVal, ty: ty::Ty) ty::TyRawPtr(_) => { Err(ErrKind::UnimplementedConstVal("casting a bytestr to a raw ptr")) }, + ty::TyRef(..) => Err(ErrKind::UnimplementedConstVal("casting a bytestr to slice")), _ => Err(CannotCast), }, _ => Err(CannotCast), |
