]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-22560.stderr
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / test / ui / issues / issue-22560.stderr
index e5e50ddd1554ce459b8c1970ebbe31229b474be7..9dda99109fa2b875416a57ccfa4967adcd842faa 100644 (file)
@@ -28,12 +28,12 @@ error[E0225]: only auto traits can be used as additional traits in a trait objec
   --> $DIR/issue-22560.rs:9:23
    |
 LL | type Test = dyn Add + Sub;
-   |                 ---   ^^^
-   |                 |     |
-   |                 |     additional non-auto trait
-   |                 |     trait alias used in trait object type (additional use)
+   |                 ---   ^^^ additional non-auto trait
+   |                 |
    |                 first non-auto trait
-   |                 trait alias used in trait object type (first use)
+   |
+   = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<[type error]> + Sub<[type error]> {}`
+   = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
 error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
   --> $DIR/issue-22560.rs:9:17