diff options
| author | dianne <diannes.gm@gmail.com> | 2025-05-21 09:17:11 -0700 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2025-05-21 09:17:11 -0700 |
| commit | 2a403dc81d092ed42edfed48b94ba34c33028ae3 (patch) | |
| tree | 161247c50e19ac8496ce5c1f59268cf3a5820ed8 /tests | |
| parent | 444a62712a29e14d3b6147b51fd24e623496bf58 (diff) | |
| download | rust-2a403dc81d092ed42edfed48b94ba34c33028ae3.tar.gz rust-2a403dc81d092ed42edfed48b94ba34c33028ae3.zip | |
lower bodies' params to thir before the body's value
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr b/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr index a8256f775a6..19b63a041d6 100644 --- a/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr +++ b/tests/ui/associated-consts/associated-const-type-parameter-pattern.stderr @@ -27,7 +27,7 @@ LL | B::X => println!("B::X"), | ^^^^ `const` depends on a generic parameter error[E0158]: constant pattern cannot depend on generic parameters - --> $DIR/associated-const-type-parameter-pattern.rs:30:9 + --> $DIR/associated-const-type-parameter-pattern.rs:28:48 | LL | pub trait Foo { | ------------- @@ -35,13 +35,12 @@ LL | const X: EFoo; | ------------- constant defined here ... LL | pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) { - | - constant depends on this generic parameter -LL | -LL | let A::X = arg; - | ^^^^ `const` depends on a generic parameter + | - ^^^^ `const` depends on a generic parameter + | | + | constant depends on this generic parameter error[E0158]: constant pattern cannot depend on generic parameters - --> $DIR/associated-const-type-parameter-pattern.rs:28:48 + --> $DIR/associated-const-type-parameter-pattern.rs:30:9 | LL | pub trait Foo { | ------------- @@ -49,9 +48,10 @@ LL | const X: EFoo; | ------------- constant defined here ... LL | pub fn test_let_pat<A: Foo, B: Foo>(arg: EFoo, A::X: EFoo) { - | - ^^^^ `const` depends on a generic parameter - | | - | constant depends on this generic parameter + | - constant depends on this generic parameter +LL | +LL | let A::X = arg; + | ^^^^ `const` depends on a generic parameter error: aborting due to 4 previous errors |
