diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
commit | 018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch) | |
tree | a835ebdf2088ef88fa681f8fad45f09922c1ae9a /tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs | |
parent | Adding debian version 1.75.0+dfsg1-5. (diff) | |
download | rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs')
-rw-r--r-- | tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs b/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs deleted file mode 100644 index af35a6195..000000000 --- a/tests/ui/traits/new-solver/dyn-any-dont-prefer-impl.rs +++ /dev/null @@ -1,17 +0,0 @@ -// compile-flags: -Ztrait-solver=next -// check-pass - -// Test that selection prefers the builtin trait object impl for `Any` -// instead of the user defined impl. Both impls apply to the trait -// object. - -use std::any::Any; - -fn needs_usize(_: &usize) {} - -fn main() { - let x: &dyn Any = &1usize; - if let Some(x) = x.downcast_ref::<usize>() { - needs_usize(x); - } -} |