about summary refs log tree commit diff
path: root/tests/ui/trait-impl-bound-suggestions.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-09 12:17:55 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-02-14 11:00:30 +0000
commit5f6390f947373528355d30a276ede65d92baaa57 (patch)
treecfccfb4047807d2dcf9aa0192ebae291d30f040e /tests/ui/trait-impl-bound-suggestions.rs
parentbb89df6903539e7014b8db29bccd6a9ee9553122 (diff)
downloadrust-5f6390f947373528355d30a276ede65d92baaa57.tar.gz
rust-5f6390f947373528355d30a276ede65d92baaa57.zip
Continue compilation after check_mod_type_wf errors
Diffstat (limited to 'tests/ui/trait-impl-bound-suggestions.rs')
-rw-r--r--tests/ui/trait-impl-bound-suggestions.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ui/trait-impl-bound-suggestions.rs b/tests/ui/trait-impl-bound-suggestions.rs
index 46130a5e766..9a494402260 100644
--- a/tests/ui/trait-impl-bound-suggestions.rs
+++ b/tests/ui/trait-impl-bound-suggestions.rs
@@ -10,19 +10,21 @@ struct ConstrainedStruct<X: Copy> {
 }
 
 #[allow(dead_code)]
-trait InsufficientlyConstrainedGeneric<X=()> {
+trait InsufficientlyConstrainedGeneric<X=()> where Self: Sized {
     fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct<X> {
         //~^ ERROR the trait bound `X: Copy` is not satisfied
         ConstrainedStruct { x }
+        //~^ ERROR the trait bound `X: Copy` is not satisfied
     }
 }
 
 // Regression test for #120838
 #[allow(dead_code)]
-trait InsufficientlyConstrainedGenericWithEmptyWhere<X=()> where {
+trait InsufficientlyConstrainedGenericWithEmptyWhere<X=()> where Self: Sized {
     fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct<X> {
         //~^ ERROR the trait bound `X: Copy` is not satisfied
         ConstrainedStruct { x }
+        //~^ ERROR the trait bound `X: Copy` is not satisfied
     }
 }