diff options
| author | bors <bors@rust-lang.org> | 2022-09-20 16:24:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-20 16:24:36 +0000 |
| commit | cd8cc91045281f7f1924ecc101f2c6002f6a1eee (patch) | |
| tree | 0182b7899fe870cda5f528f65dc9b2064651935d /src | |
| parent | 4136b59b7da8866762761ed29405a5c5f58a5e3d (diff) | |
| parent | ee96ae0a32d35b81103f666ea5ebd898714fa433 (diff) | |
| download | rust-cd8cc91045281f7f1924ecc101f2c6002f6a1eee.tar.gz rust-cd8cc91045281f7f1924ecc101f2c6002f6a1eee.zip | |
Auto merge of #101989 - fee1-dead-contrib:const_trait_impl-assoc-caller-bounds, r=oli-obk
make projection bounds with const bounds satisfy const Fixes #101982.
Diffstat (limited to 'src')
| -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() {} |
