diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-22 00:03:09 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-22 00:03:09 +0000 |
| commit | e91267f3f094a6f5d16aef0abb864fca4bc8c9f4 (patch) | |
| tree | ba5ce9ae085572e299066b12a06da711416eea87 /tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs | |
| parent | edbd9398dcc0e3b6ffe0dd0cd4578d37d1d36974 (diff) | |
| download | rust-e91267f3f094a6f5d16aef0abb864fca4bc8c9f4.tar.gz rust-e91267f3f094a6f5d16aef0abb864fca4bc8c9f4.zip | |
Move tests
Diffstat (limited to 'tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs')
| -rw-r--r-- | tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs new file mode 100644 index 00000000000..0c2d93775a4 --- /dev/null +++ b/tests/ui/traits/const-traits/default-method-body-is-const-same-trait-ck.rs @@ -0,0 +1,17 @@ +//@ compile-flags: -Znext-solver +#![allow(incomplete_features)] +#![feature(const_trait_impl, effects)] + +#[const_trait] +pub trait Tr { + fn a(&self) {} + + fn b(&self) { + ().a() + //~^ ERROR the trait bound `(): ~const Tr` is not satisfied + } +} + +impl Tr for () {} + +fn main() {} |
