summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs')
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs b/tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs
index 9ab170f09..5c2a3f801 100644
--- a/tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs
+++ b/tests/ui/rfc-2632-const-trait-impl/specializing-constness.rs
@@ -11,13 +11,16 @@ pub trait A {
fn a() -> u32;
}
-impl<T: ~const Default> const A for T {
+#[const_trait]
+pub trait Spec {}
+
+impl<T: ~const Spec> const A for T {
default fn a() -> u32 {
2
}
}
-impl<T: Default + Sup> A for T {
+impl<T: Spec + Sup> A for T {
//~^ ERROR: cannot specialize
//~| ERROR: missing `~const` qualifier
fn a() -> u32 {