From a7cc6bc4d0eba9e9c59cd74faa03955f35fbde35 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 24 Nov 2021 17:20:52 -0600 Subject: Visit `param_env` field in Obligation's `TypeFoldable` impl This oversight appears to have gone unnoticed for a long time without causing issues, but it should still be fixed. --- src/test/ui/issues/issue-77919.rs | 2 +- src/test/ui/issues/issue-77919.stderr | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/test/ui/issues') diff --git a/src/test/ui/issues/issue-77919.rs b/src/test/ui/issues/issue-77919.rs index 966d76d148a..6e597b7669a 100644 --- a/src/test/ui/issues/issue-77919.rs +++ b/src/test/ui/issues/issue-77919.rs @@ -10,4 +10,4 @@ struct Multiply { } impl TypeVal for Multiply where N: TypeVal {} //~^ ERROR cannot find type `VAL` in this scope -//~| ERROR not all trait items implemented, missing: `VAL` +//~| ERROR type annotations needed diff --git a/src/test/ui/issues/issue-77919.stderr b/src/test/ui/issues/issue-77919.stderr index 97bd5ab36b6..f98556bc72f 100644 --- a/src/test/ui/issues/issue-77919.stderr +++ b/src/test/ui/issues/issue-77919.stderr @@ -17,16 +17,15 @@ LL | impl TypeVal for Multiply where N: TypeVal {} | | | help: you might be missing a type parameter: `, VAL` -error[E0046]: not all trait items implemented, missing: `VAL` - --> $DIR/issue-77919.rs:11:1 +error[E0283]: type annotations needed + --> $DIR/issue-77919.rs:11:12 | -LL | const VAL: T; - | ------------- `VAL` from trait -... LL | impl TypeVal for Multiply where N: TypeVal {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation + | ^^^^^^^^^^^^^^ cannot infer type for struct `Multiply` + | + = note: cannot satisfy `Multiply: TypeVal` error: aborting due to 3 previous errors -Some errors have detailed explanations: E0046, E0412. -For more information about an error, try `rustc --explain E0046`. +Some errors have detailed explanations: E0283, E0412. +For more information about an error, try `rustc --explain E0283`. -- cgit 1.4.1-3-g733a5