1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
|
warning: unnecessary associated type bound for dyn-incompatible associated type
--> $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
error[E0308]: mismatched types
--> $DIR/pretty.rs:25:43
|
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
--> $DIR/pretty.rs:26:39
|
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
--> $DIR/pretty.rs:27:31
|
LL | fn dyn_fixed(x: &dyn Fixed) { x }
| - ^ expected `()`, found `&dyn Fixed`
| |
| help: try adding a return type: `-> &dyn Fixed`
|
= note: expected unit type `()`
found reference `&dyn Fixed`
error[E0308]: mismatched types
--> $DIR/pretty.rs:28:50
|
LL | fn dyn_fixed_multi(x: &dyn Fixed<Assoc = u16>) { x }
| - ^ expected `()`, found `&dyn Fixed<Assoc = u16>`
| |
| help: try adding a return type: `-> &dyn Fixed<Assoc = u16>`
|
= note: expected unit type `()`
found reference `&dyn Fixed<Assoc = u16>`
error[E0308]: mismatched types
--> $DIR/pretty.rs:29:38
|
LL | fn dyn_fixed_sub(x: &dyn FixedSub) { x }
| - ^ expected `()`, found `&dyn FixedSub`
| |
| help: try adding a return type: `-> &dyn FixedSub`
|
= note: expected unit type `()`
found reference `&dyn FixedSub`
error[E0308]: mismatched types
--> $DIR/pretty.rs:30:44
|
LL | fn dyn_fixed_static(x: &dyn FixedStatic) { x }
| - ^ expected `()`, found `&dyn FixedStatic`
| |
| help: try adding a return type: `-> &dyn FixedStatic`
|
= note: expected unit type `()`
found reference `&dyn FixedStatic`
error[E0308]: mismatched types
--> $DIR/pretty.rs:32:75
|
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>`
|
= note: expected unit type `()`
found reference `&dyn for<'a> SuperGeneric<'a, Assoc2 = &'a u8>`
error[E0308]: mismatched types
--> $DIR/pretty.rs:33:71
|
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
--> $DIR/pretty.rs:34:60
|
LL | fn dyn_fixed_generic1(x: &dyn for<'a> FixedGeneric1<'a>) { x }
| - ^ expected `()`, found `&dyn FixedGeneric1<'a>`
| |
| help: try adding a return type: `-> &dyn for<'a> FixedGeneric1<'a>`
|
= note: expected unit type `()`
found reference `&dyn for<'a> FixedGeneric1<'a>`
error[E0308]: mismatched types
--> $DIR/pretty.rs:36:79
|
LL | fn dyn_fixed_generic_multi(x: &dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>) { x }
| - ^ expected `()`, found `&dyn FixedGeneric1<'a, Assoc2 = ...>`
| |
| help: try adding a return type: `-> &dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>`
|
= note: expected unit type `()`
found reference `&dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>`
error[E0308]: mismatched types
--> $DIR/pretty.rs:37:40
|
LL | fn dyn_fixed_hrtb(x: &dyn FixedHrtb) { x }
| - ^ expected `()`, found `&dyn FixedHrtb`
| |
| help: try adding a return type: `-> &dyn FixedHrtb`
|
= note: expected unit type `()`
found reference `&dyn FixedHrtb`
error[E0308]: mismatched types
--> $DIR/pretty.rs:38:73
|
LL | fn dyn_any_different_binders(x: &dyn AnyDifferentBinders<Assoc = u8>) { x }
| - ^ expected `()`, found `&dyn AnyDifferentBinders<Assoc = ...>`
| |
| help: try adding a return type: `-> &dyn AnyDifferentBinders<Assoc = u8>`
|
= note: expected unit type `()`
found reference `&dyn AnyDifferentBinders<Assoc = u8>`
error[E0308]: mismatched types
--> $DIR/pretty.rs:39:65
|
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`
error[E0308]: mismatched types
--> $DIR/pretty.rs:41:56
|
LL | fn dyn_has_gat(x: &dyn HasGat<u8, Assoc<bool> = ()>) { x }
| - ^ expected `()`, found `&dyn HasGat<u8, Assoc<bool> = ()>`
| |
| help: try adding a return type: `-> &dyn HasGat<u8, Assoc<bool> = ()>`
|
= note: expected unit type `()`
found reference `&dyn HasGat<u8, Assoc<bool> = ()>`
error: aborting due to 14 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
|