diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2022-09-18 17:38:18 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2022-09-18 18:05:30 +0000 |
| commit | ee96ae0a32d35b81103f666ea5ebd898714fa433 (patch) | |
| tree | 7260ac258185b7b680e44aa74e08b34373d94514 /src/test | |
| parent | 4af79ccd5e23c7cbaabcd7aefdda3b715abde606 (diff) | |
| download | rust-ee96ae0a32d35b81103f666ea5ebd898714fa433.tar.gz rust-ee96ae0a32d35b81103f666ea5ebd898714fa433.zip | |
make projection bounds with const bounds satisfy const
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs b/src/test/ui/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs new file mode 100644 index 00000000000..780a510c500 --- /dev/null +++ b/src/test/ui/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs @@ -0,0 +1,14 @@ +// check-pass +#![feature(const_trait_impl)] + +#[const_trait] +trait Foo { + type Assoc: ~const Foo; + fn foo() {} +} + +const fn foo<T: ~const Foo>() { + <T as Foo>::Assoc::foo(); +} + +fn main() {} |
