about summary refs log tree commit diff
path: root/tests/ui/issues/issue-19482.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-10-04 01:10:51 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-10-30 22:12:07 +0000
commit17a6ae2df3bc3344c87aacdaea1af84bb6e48582 (patch)
tree6823ba08dfd61f839a0eacc676e1dd8b398c1369 /tests/ui/issues/issue-19482.rs
parent6d1fc53cf4f61b0dce5fc84cebae3b9fb8a45436 (diff)
downloadrust-17a6ae2df3bc3344c87aacdaea1af84bb6e48582.tar.gz
rust-17a6ae2df3bc3344c87aacdaea1af84bb6e48582.zip
Detect object safety errors when assoc type is missing
When an associated type with GATs isn't specified in a `dyn Trait`, emit
an object safety error instead of only complaining about the missing
associated type, as it will lead the user down a path of three different
errors before letting them know that what they were trying to do is
impossible to begin with.

Fix #103155.
Diffstat (limited to 'tests/ui/issues/issue-19482.rs')
-rw-r--r--tests/ui/issues/issue-19482.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/issues/issue-19482.rs b/tests/ui/issues/issue-19482.rs
index 3f3c5de9b14..9d0c8d96d29 100644
--- a/tests/ui/issues/issue-19482.rs
+++ b/tests/ui/issues/issue-19482.rs
@@ -8,6 +8,6 @@ trait Foo {
 }
 
 fn bar(x: &dyn Foo) {}
-//~^ ERROR the associated type `A` (from trait `Foo`) must be specified
+//~^ ERROR the associated type `A` in `Foo` must be specified
 
 pub fn main() {}