diff options
| author | kadmin <julianknodt@gmail.com> | 2022-01-08 09:28:12 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2022-01-17 17:44:56 +0000 |
| commit | 67f56671d0384bdb2d92dddebfbf42510b16e0f7 (patch) | |
| tree | 40e044743da8fab20f86e317f65f1276e78343c5 /src/test/ui/parser | |
| parent | fb57b7518d207caa99bdd99f4dab2a7d3902a83a (diff) | |
| download | rust-67f56671d0384bdb2d92dddebfbf42510b16e0f7.tar.gz rust-67f56671d0384bdb2d92dddebfbf42510b16e0f7.zip | |
Use Term in ProjectionPredicate
ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/recover-assoc-const-constraint.rs | 6 | ||||
| -rw-r--r-- | src/test/ui/parser/recover-assoc-const-constraint.stderr | 20 |
2 files changed, 4 insertions, 22 deletions
diff --git a/src/test/ui/parser/recover-assoc-const-constraint.rs b/src/test/ui/parser/recover-assoc-const-constraint.rs index 06be3cdcc1a..3f7423dcb8e 100644 --- a/src/test/ui/parser/recover-assoc-const-constraint.rs +++ b/src/test/ui/parser/recover-assoc-const-constraint.rs @@ -1,7 +1,9 @@ +// run-pass + #[cfg(FALSE)] fn syntax() { - bar::<Item = 42>(); //~ ERROR cannot constrain an associated constant to a value - bar::<Item = { 42 }>(); //~ ERROR cannot constrain an associated constant to a value + bar::<Item = 42>(); + bar::<Item = { 42 }>(); } fn main() {} diff --git a/src/test/ui/parser/recover-assoc-const-constraint.stderr b/src/test/ui/parser/recover-assoc-const-constraint.stderr deleted file mode 100644 index c6733b33faa..00000000000 --- a/src/test/ui/parser/recover-assoc-const-constraint.stderr +++ /dev/null @@ -1,20 +0,0 @@ -error: cannot constrain an associated constant to a value - --> $DIR/recover-assoc-const-constraint.rs:3:11 - | -LL | bar::<Item = 42>(); - | ----^^^-- - | | | - | | ...cannot be constrained to this value - | this associated constant... - -error: cannot constrain an associated constant to a value - --> $DIR/recover-assoc-const-constraint.rs:4:11 - | -LL | bar::<Item = { 42 }>(); - | ----^^^------ - | | | - | | ...cannot be constrained to this value - | this associated constant... - -error: aborting due to 2 previous errors - |
