about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-01-08 01:07:14 +0000
committerMichael Goulet <michael@errs.io>2024-01-08 15:31:53 +0000
commit760673e97d48e131b87ec738cb7106c5f8abe55e (patch)
tree4e125ea3499ccf935ba7da02de1eb7f5a5b36172 /tests
parente44b11f6952659e7cb4e66ee3b5ff47bb7bc6c31 (diff)
Remove logic in one_bound in astconv that prefers non-const bounds
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr21
2 files changed, 11 insertions, 12 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
index 14d306fc31f..9d579e67a4b 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs
@@ -1,4 +1,6 @@
 // known-bug: #110395
+// Broken until we have `&T: const Deref` impl in stdlib
+
 #![allow(incomplete_features)]
 #![feature(
     associated_type_bounds,
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
index d0ca1b19ad1..d4be71f2f46 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr
@@ -1,5 +1,5 @@
 error[E0277]: can't compare `()` with `()`
-  --> $DIR/const-impl-trait.rs:35:17
+  --> $DIR/const-impl-trait.rs:37:17
    |
 LL |     assert!(cmp(&()));
    |             --- ^^^ no implementation for `() == ()`
@@ -9,23 +9,20 @@ LL |     assert!(cmp(&()));
    = help: the trait `const PartialEq` is not implemented for `()`
    = help: the trait `PartialEq` is implemented for `()`
 note: required by a bound in `cmp`
-  --> $DIR/const-impl-trait.rs:12:23
+  --> $DIR/const-impl-trait.rs:14:23
    |
 LL | const fn cmp(a: &impl ~const PartialEq) -> bool {
    |                       ^^^^^^^^^^^^^^^^ required by this bound in `cmp`
 
-error[E0277]: can't compare `&impl ~const PartialEq` with `&impl ~const PartialEq`
-  --> $DIR/const-impl-trait.rs:13:7
+error[E0369]: binary operation `==` cannot be applied to type `&impl ~const PartialEq`
+  --> $DIR/const-impl-trait.rs:15:7
    |
 LL |     a == a
-   |       ^^ no implementation for `&impl ~const PartialEq == &impl ~const PartialEq`
-   |
-   = help: the trait `~const PartialEq<&impl ~const PartialEq>` is not implemented for `&impl ~const PartialEq`
-help: consider dereferencing both sides of the expression
-   |
-LL |     *a == *a
-   |     +     +
+   |     - ^^ - &impl ~const PartialEq
+   |     |
+   |     &impl ~const PartialEq
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0369.
+For more information about an error, try `rustc --explain E0277`.