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/test | |
| parent | 4ba60aba387b19267cace9759d9cf14682b72871 (diff) | |
don't warn on casting byte strs to slices
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/const-byte-str-cast.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/const-byte-str-cast.rs b/src/test/run-pass/const-byte-str-cast.rs new file mode 100644 index 00000000000..2f265b9112b --- /dev/null +++ b/src/test/run-pass/const-byte-str-cast.rs @@ -0,0 +1,15 @@ +// Copyright 2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[deny(warnings)] + +pub fn main() { + let _ = b"x" as &[u8]; +} |
