diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/dynamically-sized-types/dst-coercions.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/dynamically-sized-types/dst-coercions.rs')
-rw-r--r-- | src/test/ui/dynamically-sized-types/dst-coercions.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/test/ui/dynamically-sized-types/dst-coercions.rs b/src/test/ui/dynamically-sized-types/dst-coercions.rs deleted file mode 100644 index 66688e93f..000000000 --- a/src/test/ui/dynamically-sized-types/dst-coercions.rs +++ /dev/null @@ -1,28 +0,0 @@ -// run-pass -#![allow(unused_variables)] -// Test coercions involving DST and/or raw pointers - -// pretty-expanded FIXME #23616 - -struct S; -trait T { fn dummy(&self) { } } -impl T for S {} - -pub fn main() { - let x: &dyn T = &S; - // Test we can convert from &-ptr to *-ptr of trait objects - let x: *const dyn T = &S; - - // Test we can convert from &-ptr to *-ptr of struct pointer (not DST) - let x: *const S = &S; - - // As above, but mut - let x: &mut dyn T = &mut S; - let x: *mut dyn T = &mut S; - - let x: *mut S = &mut S; - - // Test we can change the mutability from mut to const. - let x: &dyn T = &mut S; - let x: *const dyn T = &mut S; -} |