summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/type-check-pointer-coercions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll/type-check-pointer-coercions.rs')
-rw-r--r--src/test/ui/nll/type-check-pointer-coercions.rs37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/test/ui/nll/type-check-pointer-coercions.rs b/src/test/ui/nll/type-check-pointer-coercions.rs
deleted file mode 100644
index 66da57248..000000000
--- a/src/test/ui/nll/type-check-pointer-coercions.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-fn shared_to_const<'a, 'b>(x: &&'a i32) -> *const &'b i32 {
- x //~ ERROR
-}
-
-fn unique_to_const<'a, 'b>(x: &mut &'a i32) -> *const &'b i32 {
- x //~ ERROR
-}
-
-fn unique_to_mut<'a, 'b>(x: &mut &'a i32) -> *mut &'b i32 {
- // Two errors because *mut is invariant
- x //~ ERROR
- //~| ERROR
-}
-
-fn mut_to_const<'a, 'b>(x: *mut &'a i32) -> *const &'b i32 {
- x //~ ERROR
-}
-
-fn array_elem<'a, 'b>(x: &'a i32) -> *const &'b i32 {
- let z = &[x; 3];
- let y = z as *const &i32;
- y //~ ERROR
-}
-
-fn array_coerce<'a, 'b>(x: &'a i32) -> *const [&'b i32; 3] {
- let z = &[x; 3];
- let y = z as *const [&i32; 3];
- y //~ ERROR
-}
-
-fn nested_array<'a, 'b>(x: &'a i32) -> *const [&'b i32; 2] {
- let z = &[[x; 2]; 3];
- let y = z as *const [&i32; 2];
- y //~ ERROR
-}
-
-fn main() {}