about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/specialization/const_trait_impl.stderr51
-rw-r--r--tests/ui/traits/const-traits/call-const-trait-method-pass.stderr26
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.stderr30
-rw-r--r--tests/ui/traits/const-traits/const-drop.precise.stderr18
-rw-r--r--tests/ui/traits/const-traits/const-drop.stock.stderr18
-rw-r--r--tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr6
-rw-r--r--tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs3
-rw-r--r--tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr15
-rw-r--r--tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs4
-rw-r--r--tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr15
-rw-r--r--tests/ui/traits/const-traits/specializing-constness-2.stderr17
11 files changed, 22 insertions, 181 deletions
diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr
index 40ac350980e..607fc06823e 100644
--- a/tests/ui/specialization/const_trait_impl.stderr
+++ b/tests/ui/specialization/const_trait_impl.stderr
@@ -40,54 +40,5 @@ LL | impl<T: ~const Default + ~const Sub> const A for T {
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0015]: cannot call non-const fn `<() as A>::a` in constants
-  --> $DIR/const_trait_impl.rs:52:23
-   |
-LL | const _: () = assert!(<()>::a() == 42);
-   |                       ^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error[E0015]: cannot call non-const fn `<u8 as A>::a` in constants
-  --> $DIR/const_trait_impl.rs:53:23
-   |
-LL | const _: () = assert!(<u8>::a() == 3);
-   |                       ^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error[E0015]: cannot call non-const fn `<u16 as A>::a` in constants
-  --> $DIR/const_trait_impl.rs:54:23
-   |
-LL | const _: () = assert!(<u16>::a() == 2);
-   |                       ^^^^^^^^^^
-   |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error[E0015]: cannot call non-const fn `<T as Sup>::foo` in constant functions
-  --> $DIR/const_trait_impl.rs:48:9
-   |
-LL |         T::foo()
-   |         ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 10 previous errors
+error: aborting due to 6 previous errors
 
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr
index 32f53137a00..9ae1ed18e35 100644
--- a/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr
+++ b/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr
@@ -24,18 +24,6 @@ LL | const ADD_INT: Int = Int(1i32) + Int(2i32);
    |
    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const fn `<i32 as Plus>::plus` in constant functions
-  --> $DIR/call-const-trait-method-pass.rs:11:20
-   |
-LL |         Int(self.0.plus(rhs.0))
-   |                    ^^^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
 error[E0015]: cannot call non-const fn `<Int as PartialEq>::eq` in constant functions
   --> $DIR/call-const-trait-method-pass.rs:20:15
    |
@@ -44,18 +32,6 @@ LL |         !self.eq(other)
    |
    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
 
-error[E0015]: cannot call non-const fn `<i32 as Plus>::plus` in constant functions
-  --> $DIR/call-const-trait-method-pass.rs:36:7
-   |
-LL |     a.plus(b)
-   |       ^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 6 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stderr
index 102dbb1a599..fde106599c2 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.stderr
@@ -21,33 +21,21 @@ LL | const fn check<T: ~const Destruct>(_: T) {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop-fail-2.rs:20:36
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                                    ^      - value is dropped here
-   |                                    |
-   |                                    the destructor for this type cannot be evaluated in constant functions
-
 error[E0277]: the trait bound `T: ~const A` is not satisfied
   --> $DIR/const-drop-fail-2.rs:41:9
    |
 LL |         T::a();
    |         ^^^^^^
 
-error[E0015]: cannot call non-const fn `<T as A>::a` in constant functions
-  --> $DIR/const-drop-fail-2.rs:41:9
-   |
-LL |         T::a();
-   |         ^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
+error[E0493]: destructor of `T` cannot be evaluated at compile-time
+  --> $DIR/const-drop-fail-2.rs:20:36
    |
+LL | const fn check<T: ~const Destruct>(_: T) {}
+   |                                    ^      - value is dropped here
+   |                                    |
+   |                                    the destructor for this type cannot be evaluated in constant functions
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
-Some errors have detailed explanations: E0015, E0277, E0493.
-For more information about an error, try `rustc --explain E0015`.
+Some errors have detailed explanations: E0277, E0493.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop.precise.stderr b/tests/ui/traits/const-traits/const-drop.precise.stderr
index 7471b200c33..ed90b234761 100644
--- a/tests/ui/traits/const-traits/const-drop.precise.stderr
+++ b/tests/ui/traits/const-traits/const-drop.precise.stderr
@@ -84,19 +84,7 @@ error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied
 LL |             T::foo();
    |             ^^^^^^^^
 
-error[E0015]: cannot call non-const fn `<T as SomeTrait>::foo` in constant functions
-  --> $DIR/const-drop.rs:69:13
-   |
-LL |             T::foo();
-   |             ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 11 previous errors
+error: aborting due to 10 previous errors
 
-Some errors have detailed explanations: E0015, E0277, E0493.
-For more information about an error, try `rustc --explain E0015`.
+Some errors have detailed explanations: E0277, E0493.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop.stock.stderr b/tests/ui/traits/const-traits/const-drop.stock.stderr
index 71378349161..2b46b048e90 100644
--- a/tests/ui/traits/const-traits/const-drop.stock.stderr
+++ b/tests/ui/traits/const-traits/const-drop.stock.stderr
@@ -86,19 +86,7 @@ error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied
 LL |             T::foo();
    |             ^^^^^^^^
 
-error[E0015]: cannot call non-const fn `<T as SomeTrait>::foo` in constant functions
-  --> $DIR/const-drop.rs:69:13
-   |
-LL |             T::foo();
-   |             ^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 11 previous errors
+error: aborting due to 10 previous errors
 
-Some errors have detailed explanations: E0015, E0277, E0493.
-For more information about an error, try `rustc --explain E0015`.
+Some errors have detailed explanations: E0277, E0493.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr
index 308a60c08d3..0534f3eb8d2 100644
--- a/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr
+++ b/tests/ui/traits/const-traits/default-method-body-is-const-body-checking.stderr
@@ -3,12 +3,6 @@ error[E0277]: the trait bound `(): ~const Tr` is not satisfied
    |
 LL |         foo::<()>();
    |         ^^^^^^^^^^^
-   |
-note: required by a bound in `foo`
-  --> $DIR/default-method-body-is-const-body-checking.rs:7:28
-   |
-LL | const fn foo<T>() where T: ~const Tr {}
-   |                            ^^^^^^ required by this bound in `foo`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs
index a48a50b9e5c..89ad61c3c31 100644
--- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs
+++ b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs
@@ -1,8 +1,7 @@
 // Tests that a const default trait impl can be specialized by another const
 // trait impl and that the specializing impl will be used during const-eval.
 
-//@ known-bug: #110395
-// FIXME(effects) run-pass
+//@ run-pass
 
 #![feature(const_trait_impl)]
 #![feature(min_specialization)]
diff --git a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr
index f127268d2a1..e69de29bb2d 100644
--- a/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr
+++ b/tests/ui/traits/const-traits/specialization/const-default-const-specialized.stderr
@@ -1,15 +0,0 @@
-error[E0015]: cannot call non-const fn `<T as Value>::value` in constant functions
-  --> $DIR/const-default-const-specialized.rs:16:5
-   |
-LL |     T::value()
-   |     ^^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs
index 912b35095f9..e9b494bc2c0 100644
--- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs
+++ b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs
@@ -1,7 +1,7 @@
 // Tests that a non-const default impl can be specialized by a const trait impl,
 // but that the default impl cannot be used in a const context.
-//@ known-bug: #110395
-// FIXME(effects) run-pass
+
+//@ run-pass
 
 #![feature(const_trait_impl)]
 #![feature(min_specialization)]
diff --git a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr
index a4095d7e8ce..e69de29bb2d 100644
--- a/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr
+++ b/tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.stderr
@@ -1,15 +0,0 @@
-error[E0015]: cannot call non-const fn `<T as Value>::value` in constant functions
-  --> $DIR/non-const-default-const-specialized.rs:15:5
-   |
-LL |     T::value()
-   |     ^^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/specializing-constness-2.stderr b/tests/ui/traits/const-traits/specializing-constness-2.stderr
index 98a9de2324a..4ad5e3157d4 100644
--- a/tests/ui/traits/const-traits/specializing-constness-2.stderr
+++ b/tests/ui/traits/const-traits/specializing-constness-2.stderr
@@ -4,19 +4,6 @@ error[E0277]: the trait bound `T: ~const A` is not satisfied
 LL |     <T as A>::a();
    |     ^^^^^^^^^^^^^
 
-error[E0015]: cannot call non-const fn `<T as A>::a` in constant functions
-  --> $DIR/specializing-constness-2.rs:27:5
-   |
-LL |     <T as A>::a();
-   |     ^^^^^^^^^^^^^
-   |
-   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
-help: add `#![feature(effects)]` to the crate attributes to enable
-   |
-LL + #![feature(effects)]
-   |
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0015, E0277.
-For more information about an error, try `rustc --explain E0015`.
+For more information about this error, try `rustc --explain E0277`.