summary refs log tree commit diff
path: root/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-22 17:35:32 +0200
committerGitHub <noreply@github.com>2025-06-22 17:35:32 +0200
commit371426334b976e5f889c477584e9d293ab1120c6 (patch)
tree2041446cd33a8fda5a1d73704377fadf6dde131a /tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
parenta30f1783fe136d92545423dd30b12eb619973cdb (diff)
parent1d41c2c01c9d32b22b1b702cfe04e2f7aae477af (diff)
downloadrust-371426334b976e5f889c477584e9d293ab1120c6.tar.gz
rust-371426334b976e5f889c477584e9d293ab1120c6.zip
Rollup merge of #142458 - oli-obk:dyn-incompat, r=compiler-errors
Merge unboxed trait object error suggestion into regular dyn incompat error

Another hir-walker removed from the well-formed queries. This error was always a duplicate of another, but it was able to provide more information because it could invoke `is_dyn_compatible` without worrying about cycle errors. That's also the reason we can't put the error directly into hir_ty_lowering when lowering a `dyn Trait` within an associated item signature. So instead I packed it into the error handling of wf obligation checking.
Diffstat (limited to 'tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs')
-rw-r--r--tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
index 10b4781eb04..97a0e005f86 100644
--- a/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
+++ b/tests/ui/suggestions/dyn-incompatible-trait-should-use-self-2021-without-dyn.rs
@@ -4,19 +4,16 @@ trait A: Sized {
     fn f(a: A) -> A;
     //~^ ERROR expected a type, found a trait
     //~| ERROR expected a type, found a trait
-    //~| ERROR associated item referring to unboxed trait object for its own trait
 }
 trait B {
     fn f(b: B) -> B;
     //~^ ERROR expected a type, found a trait
     //~| ERROR expected a type, found a trait
-    //~| ERROR associated item referring to unboxed trait object for its own trait
 }
 trait C {
     fn f(&self, c: C) -> C;
     //~^ ERROR expected a type, found a trait
     //~| ERROR expected a type, found a trait
-    //~| ERROR associated item referring to unboxed trait object for its own trait
 }
 
 fn main() {}