diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-16 16:58:17 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-16 16:58:17 -0700 |
| commit | 33242578331ab6e22384f686d930780d7fdf27e5 (patch) | |
| tree | 361ef9054b679b74749195fe061ec15938fb16aa /src/test | |
| parent | 0973eb4419d0598c1134106adef2ee8dc2a2b5ff (diff) | |
| download | rust-33242578331ab6e22384f686d930780d7fdf27e5.tar.gz rust-33242578331ab6e22384f686d930780d7fdf27e5.zip | |
rustc: Start accepting `*const T`
This does not yet change the compiler and libraries from `*T` to `*const T` as it will require a snapshot to do so. cc #7362
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/new-unsafe-pointers.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/run-pass/new-unsafe-pointers.rs b/src/test/run-pass/new-unsafe-pointers.rs new file mode 100644 index 00000000000..96ccb1a37a2 --- /dev/null +++ b/src/test/run-pass/new-unsafe-pointers.rs @@ -0,0 +1,14 @@ +// Copyright 2014 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. + +fn main() { + let _a: *const int = 3 as *const int; + let _a: *mut int = 3 as *mut int; +} |
