diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-11-20 03:08:52 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-12-04 20:29:36 +0000 |
| commit | 87ddc1ea33edbe1be119d73e57c2783940e797fe (patch) | |
| tree | 1078cb612921aa307c2700910e38c4441beccbd8 /tests/coverage/branch/lazy-boolean.rs | |
| parent | c0f00086f85ae1fff34dd2daf6a11850e5bfc2f0 (diff) | |
| download | rust-87ddc1ea33edbe1be119d73e57c2783940e797fe.tar.gz rust-87ddc1ea33edbe1be119d73e57c2783940e797fe.zip | |
Point at generic param through which a const is used in a pattern
```
error[E0158]: constant pattern depends on a generic parameter, which is not allowed
--> $DIR/associated-const-type-parameter-pattern.rs:20:9
|
LL | pub trait Foo {
| -------------
LL | const X: EFoo;
| ------------- constant defined here
...
LL | pub fn test<A: Foo, B: Foo>(arg: EFoo) {
| - constant depends on this generic param
LL | match arg {
LL | A::X => println!("A::X"),
| ^^^^ `const` depends on a generic parameter
```
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions
