about summary refs log tree commit diff
path: root/tests/ui/try-trait/bad-question-mark-on-trait-object.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/try-trait/bad-question-mark-on-trait-object.rs')
-rw-r--r--tests/ui/try-trait/bad-question-mark-on-trait-object.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ui/try-trait/bad-question-mark-on-trait-object.rs b/tests/ui/try-trait/bad-question-mark-on-trait-object.rs
index 9efac78b3d7..2a0d14b1750 100644
--- a/tests/ui/try-trait/bad-question-mark-on-trait-object.rs
+++ b/tests/ui/try-trait/bad-question-mark-on-trait-object.rs
@@ -1,5 +1,7 @@
 struct E;
-struct X;
+//~^ NOTE `E` needs to implement `std::error::Error`
+//~| NOTE alternatively, `E` needs to implement `Into<X>`
+struct X; //~ NOTE `X` needs to implement `From<E>`
 
 fn foo() -> Result<(), Box<dyn std::error::Error>> { //~ NOTE required `E: std::error::Error` because of this
     Ok(bar()?)