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