about summary refs log tree commit diff
path: root/tests/ui/specialization
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-10-20 19:49:11 +0000
committerMichael Goulet <michael@errs.io>2024-10-24 09:46:36 +0000
commitcde29b9ec9c49dfdebe06f7e97df4a322f27bd6a (patch)
treec3ca417b701a8253c8fd0acdd8c9392ea2102be0 /tests/ui/specialization
parenta16d491054a339c2ad9ee56d8295311eb31b1d42 (diff)
downloadrust-cde29b9ec9c49dfdebe06f7e97df4a322f27bd6a.tar.gz
rust-cde29b9ec9c49dfdebe06f7e97df4a322f27bd6a.zip
Implement const effect predicate in new solver
Diffstat (limited to 'tests/ui/specialization')
-rw-r--r--tests/ui/specialization/const_trait_impl.stderr62
1 files changed, 17 insertions, 45 deletions
diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr
index 643f1de3e8d..746b08fa710 100644
--- a/tests/ui/specialization/const_trait_impl.stderr
+++ b/tests/ui/specialization/const_trait_impl.stderr
@@ -1,23 +1,3 @@
-error[E0049]: associated function `foo` has 1 const parameter but its trait declaration has 0 const parameters
-  --> $DIR/const_trait_impl.rs:6:1
-   |
-LL | #[const_trait]
-   | ^^^^^^^^^^^^^^ found 1 const parameter
-LL | pub unsafe trait Sup {
-LL |     fn foo() -> u32;
-   |           - expected 0 const parameters
-
-error[E0049]: associated function `foo` has 1 const parameter but its trait declaration has 0 const parameters
-  --> $DIR/const_trait_impl.rs:6:1
-   |
-LL | #[const_trait]
-   | ^^^^^^^^^^^^^^ found 1 const parameter
-LL | pub unsafe trait Sup {
-LL |     fn foo() -> u32;
-   |           - expected 0 const parameters
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
 error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/const_trait_impl.rs:34:16
    |
@@ -36,34 +16,27 @@ error: `~const` can only be applied to `#[const_trait]` traits
 LL | impl<T: ~const Default + ~const Sub> const A for T {
    |                ^^^^^^^
 
-error[E0049]: associated function `a` has 1 const parameter but its trait declaration has 0 const parameters
-  --> $DIR/const_trait_impl.rs:29:1
-   |
-LL | #[const_trait]
-   | ^^^^^^^^^^^^^^ found 1 const parameter
-LL | pub trait A {
-LL |     fn a() -> u32;
-   |         - expected 0 const parameters
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:40:16
+   |
+LL | impl<T: ~const Default + ~const Sup> const A for T {
+   |                ^^^^^^^
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0049]: associated function `a` has 1 const parameter but its trait declaration has 0 const parameters
-  --> $DIR/const_trait_impl.rs:29:1
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:34:16
    |
-LL | #[const_trait]
-   | ^^^^^^^^^^^^^^ found 1 const parameter
-LL | pub trait A {
-LL |     fn a() -> u32;
-   |         - expected 0 const parameters
+LL | impl<T: ~const Default> const A for T {
+   |                ^^^^^^^
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0049]: associated function `a` has 1 const parameter but its trait declaration has 0 const parameters
-  --> $DIR/const_trait_impl.rs:29:1
+error: `~const` can only be applied to `#[const_trait]` traits
+  --> $DIR/const_trait_impl.rs:46:16
    |
-LL | #[const_trait]
-   | ^^^^^^^^^^^^^^ found 1 const parameter
-LL | pub trait A {
-LL |     fn a() -> u32;
-   |         - expected 0 const parameters
+LL | impl<T: ~const Default + ~const Sub> const A for T {
+   |                ^^^^^^^
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
@@ -115,7 +88,6 @@ help: add `#![feature(effects)]` to the crate attributes to enable
 LL + #![feature(effects)]
    |
 
-error: aborting due to 12 previous errors
+error: aborting due to 10 previous errors
 
-Some errors have detailed explanations: E0015, E0049.
-For more information about an error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0015`.