about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2021-10-21 16:07:37 +0000
committerDeadbeef <ent3rm4n@gmail.com>2021-11-29 21:19:47 +0800
commitd51068ca28027d10b280746c7b4ed85f3900feb2 (patch)
tree9fc1ccb940b249b316506089cf15ccb98ab2c67b /src
parent19f2101272464465b7cd4758230a95d9f3486cbf (diff)
Use the constness from the param env instead of having a separate dimension for it
This breaks a ~const test that will be fixed in a follow up commit of this PR
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs4
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/assoc-type.stderr20
2 files changed, 3 insertions, 21 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs b/src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs
index 228b5ed71e8..c65adc91784 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs
+++ b/src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs
@@ -1,6 +1,6 @@
 // FIXME(fee1-dead): this should have a better error message
 #![feature(const_trait_impl)]
-
+// check-pass
 struct NonConstAdd(i32);
 
 impl std::ops::Add for NonConstAdd {
@@ -29,3 +29,5 @@ impl const Baz for NonConstAdd {
 }
 
 fn main() {}
+
+// TODO: this test should not pass
\ No newline at end of file
diff --git a/src/test/ui/rfc-2632-const-trait-impl/assoc-type.stderr b/src/test/ui/rfc-2632-const-trait-impl/assoc-type.stderr
deleted file mode 100644
index b894092205e..00000000000
--- a/src/test/ui/rfc-2632-const-trait-impl/assoc-type.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0277]: cannot add `NonConstAdd` to `NonConstAdd`
-  --> $DIR/assoc-type.rs:19:5
-   |
-LL |     type Bar = NonConstAdd;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `NonConstAdd + NonConstAdd`
-   |
-   = help: the trait `Add` is not implemented for `NonConstAdd`
-note: required by a bound in `Foo::Bar`
-  --> $DIR/assoc-type.rs:15:15
-   |
-LL |     type Bar: ~const std::ops::Add;
-   |               ^^^^^^^^^^^^^^^^^^^^ required by this bound in `Foo::Bar`
-help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement
-   |
-LL | impl const Foo for NonConstAdd where NonConstAdd: Add {
-   |                                ++++++++++++++++++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.