2024-09-25 10:38:40 +02:00
warning: unnecessary associated type bound for dyn-incompatible associated type
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:41:35
|
LL | fn dyn_has_gat(x: &dyn HasGat<u8, Assoc<bool> = ()>) { x }
| ^^^^^^^^^^^^^^^^ help: remove this bound
|
= note: this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`
= note: `#[warn(unused_associated_type_bounds)]` on by default
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:25:43
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_super(x: &dyn Super<Assoc = u8>) { x }
| - ^ expected `()`, found `&dyn Super<Assoc = u8>`
| |
| help: try adding a return type: `-> &dyn Super<Assoc = u8>`
|
= note: expected unit type `()`
found reference `&dyn Super<Assoc = u8>`
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:26:39
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_any(x: &dyn Any<Assoc = u8>) { x }
| - ^ expected `()`, found `&dyn Any<Assoc = u8>`
| |
| help: try adding a return type: `-> &dyn Any<Assoc = u8>`
|
= note: expected unit type `()`
found reference `&dyn Any<Assoc = u8>`
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:27:31
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_fixed(x: &dyn Fixed) { x }
2024-02-06 22:37:47 +01:00
| - ^ expected `()`, found `&dyn Fixed`
2024-02-07 02:19:12 +01:00
| |
2024-02-06 22:37:47 +01:00
| help: try adding a return type: `-> &dyn Fixed`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-06 22:37:47 +01:00
found reference `&dyn Fixed`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:28:50
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_fixed_multi(x: &dyn Fixed<Assoc = u16>) { x }
2024-02-06 22:37:47 +01:00
| - ^ expected `()`, found `&dyn Fixed<Assoc = u16>`
2024-02-07 02:19:12 +01:00
| |
2024-02-06 22:37:47 +01:00
| help: try adding a return type: `-> &dyn Fixed<Assoc = u16>`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-06 22:37:47 +01:00
found reference `&dyn Fixed<Assoc = u16>`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:29:38
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_fixed_sub(x: &dyn FixedSub) { x }
2024-02-06 22:37:47 +01:00
| - ^ expected `()`, found `&dyn FixedSub`
2024-02-07 02:19:12 +01:00
| |
2024-02-06 22:37:47 +01:00
| help: try adding a return type: `-> &dyn FixedSub`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-06 22:37:47 +01:00
found reference `&dyn FixedSub`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:30:44
2024-02-07 02:19:12 +01:00
|
2024-02-07 20:58:05 +01:00
LL | fn dyn_fixed_static(x: &dyn FixedStatic) { x }
| - ^ expected `()`, found `&dyn FixedStatic`
| |
| help: try adding a return type: `-> &dyn FixedStatic`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-07 20:58:05 +01:00
found reference `&dyn FixedStatic`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:32:75
2024-02-07 02:19:12 +01:00
|
2024-02-07 20:58:05 +01:00
LL | fn dyn_super_generic(x: &dyn for<'a> SuperGeneric<'a, Assoc2 = &'a u8>) { x }
| - ^ expected `()`, found `&dyn SuperGeneric<'a, Assoc2 = &u8>`
| |
| help: try adding a return type: `-> &dyn for<'a> SuperGeneric<'a, Assoc2 = &'a u8>`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-07 20:58:05 +01:00
found reference `&dyn for<'a> SuperGeneric<'a, Assoc2 = &'a u8>`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:33:71
2024-02-07 20:58:05 +01:00
|
LL | fn dyn_any_generic(x: &dyn for<'a> AnyGeneric<'a, Assoc2 = &'a u8>) { x }
| - ^ expected `()`, found `&dyn AnyGeneric<'a, Assoc2 = &u8>`
| |
| help: try adding a return type: `-> &dyn for<'a> AnyGeneric<'a, Assoc2 = &'a u8>`
|
= note: expected unit type `()`
found reference `&dyn for<'a> AnyGeneric<'a, Assoc2 = &'a u8>`
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:34:60
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_fixed_generic1(x: &dyn for<'a> FixedGeneric1<'a>) { x }
2024-02-06 22:37:47 +01:00
| - ^ expected `()`, found `&dyn FixedGeneric1<'a>`
2024-02-07 02:19:12 +01:00
| |
2024-02-06 22:37:47 +01:00
| help: try adding a return type: `-> &dyn for<'a> FixedGeneric1<'a>`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-06 22:37:47 +01:00
found reference `&dyn for<'a> FixedGeneric1<'a>`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:36:79
2024-02-07 02:19:12 +01:00
|
2024-02-07 20:58:05 +01:00
LL | fn dyn_fixed_generic_multi(x: &dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>) { x }
2025-01-31 03:26:56 +00:00
| - ^ expected `()`, found `&dyn FixedGeneric1<'a, Assoc2 = &u8>`
2024-02-07 20:58:05 +01:00
| |
| help: try adding a return type: `-> &dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-07 20:58:05 +01:00
found reference `&dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>`
2024-02-07 02:19:12 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:37:40
2024-02-07 02:19:12 +01:00
|
LL | fn dyn_fixed_hrtb(x: &dyn FixedHrtb) { x }
2024-02-06 22:37:47 +01:00
| - ^ expected `()`, found `&dyn FixedHrtb`
2024-02-07 02:19:12 +01:00
| |
2024-02-06 22:37:47 +01:00
| help: try adding a return type: `-> &dyn FixedHrtb`
2024-02-07 02:19:12 +01:00
|
= note: expected unit type `()`
2024-02-06 22:37:47 +01:00
found reference `&dyn FixedHrtb`
2024-02-07 02:19:12 +01:00
2024-02-07 20:58:05 +01:00
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:38:73
2024-02-07 20:58:05 +01:00
|
LL | fn dyn_any_different_binders(x: &dyn AnyDifferentBinders<Assoc = u8>) { x }
2025-01-31 03:26:56 +00:00
| - ^ expected `()`, found `&dyn AnyDifferentBinders<Assoc = u8>`
2024-02-07 20:58:05 +01:00
| |
| help: try adding a return type: `-> &dyn AnyDifferentBinders<Assoc = u8>`
|
= note: expected unit type `()`
found reference `&dyn AnyDifferentBinders<Assoc = u8>`
error[E0308]: mismatched types
2024-08-22 05:30:08 +02:00
--> $DIR/pretty.rs:39:65
2024-02-07 20:58:05 +01:00
|
LL | fn dyn_fixed_different_binders(x: &dyn FixedDifferentBinders) { x }
| - ^ expected `()`, found `&dyn FixedDifferentBinders`
| |
| help: try adding a return type: `-> &dyn FixedDifferentBinders`
|
= note: expected unit type `()`
found reference `&dyn FixedDifferentBinders`
2024-08-22 05:30:08 +02:00
error[E0308]: mismatched types
--> $DIR/pretty.rs:41:56
|
LL | fn dyn_has_gat(x: &dyn HasGat<u8, Assoc<bool> = ()>) { x }
2025-02-03 02:38:56 +00:00
| - ^ expected `()`, found `&dyn HasGat<u8>`
2024-08-22 05:30:08 +02:00
| |
2025-02-03 02:38:56 +00:00
| help: try adding a return type: `-> &dyn HasGat<u8>`
2024-08-22 05:30:08 +02:00
|
= note: expected unit type `()`
2025-02-03 02:38:56 +00:00
found reference `&dyn HasGat<u8>`
2024-08-22 05:30:08 +02:00
2024-09-14 15:43:03 -04:00
error: aborting due to 14 previous errors; 1 warning emitted
2024-02-07 02:19:12 +01:00
For more information about this error, try `rustc --explain E0308`.