|
| 1 | +error: unconstrained generic constant |
| 2 | + --> $DIR/abstract-const-as-cast-3.rs:17:5 |
| 3 | + | |
| 4 | +LL | fn assert_impl<T: Trait>() {} |
| 5 | + | ----- required by this bound in `use_trait_impl::assert_impl` |
| 6 | +... |
| 7 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>(); |
| 8 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 9 | + | |
| 10 | + = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:` |
| 11 | +note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>` |
| 12 | + --> $DIR/abstract-const-as-cast-3.rs:8:22 |
| 13 | + | |
| 14 | +LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {} |
| 15 | + | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 16 | + |
| 17 | +error[E0308]: mismatched types |
| 18 | + --> $DIR/abstract-const-as-cast-3.rs:17:5 |
| 19 | + | |
| 20 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>(); |
| 21 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as u128 }`, found `{ O as u128 }` |
| 22 | + | |
| 23 | + = note: expected type `{ N as u128 }` |
| 24 | + found type `{ O as u128 }` |
| 25 | + |
| 26 | +error: unconstrained generic constant |
| 27 | + --> $DIR/abstract-const-as-cast-3.rs:20:5 |
| 28 | + | |
| 29 | +LL | fn assert_impl<T: Trait>() {} |
| 30 | + | ----- required by this bound in `use_trait_impl::assert_impl` |
| 31 | +... |
| 32 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>(); |
| 33 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 34 | + | |
| 35 | + = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:` |
| 36 | +note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>` |
| 37 | + --> $DIR/abstract-const-as-cast-3.rs:8:22 |
| 38 | + | |
| 39 | +LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {} |
| 40 | + | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 41 | + |
| 42 | +error[E0308]: mismatched types |
| 43 | + --> $DIR/abstract-const-as-cast-3.rs:20:5 |
| 44 | + | |
| 45 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>(); |
| 46 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as _ }`, found `{ O as u128 }` |
| 47 | + | |
| 48 | + = note: expected type `{ N as _ }` |
| 49 | + found type `{ O as u128 }` |
| 50 | + |
| 51 | +error[E0308]: mismatched types |
| 52 | + --> $DIR/abstract-const-as-cast-3.rs:23:5 |
| 53 | + | |
| 54 | +LL | assert_impl::<HasCastInTraitImpl<13, { 12 as u128 }>>(); |
| 55 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `12_u128`, found `13_u128` |
| 56 | + | |
| 57 | + = note: expected type `12_u128` |
| 58 | + found type `13_u128` |
| 59 | + |
| 60 | +error[E0308]: mismatched types |
| 61 | + --> $DIR/abstract-const-as-cast-3.rs:25:5 |
| 62 | + | |
| 63 | +LL | assert_impl::<HasCastInTraitImpl<14, 13>>(); |
| 64 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `13_u128`, found `14_u128` |
| 65 | + | |
| 66 | + = note: expected type `13_u128` |
| 67 | + found type `14_u128` |
| 68 | + |
| 69 | +error: unconstrained generic constant |
| 70 | + --> $DIR/abstract-const-as-cast-3.rs:35:5 |
| 71 | + | |
| 72 | +LL | fn assert_impl<T: Trait>() {} |
| 73 | + | ----- required by this bound in `use_trait_impl_2::assert_impl` |
| 74 | +... |
| 75 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>(); |
| 76 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 77 | + | |
| 78 | + = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:` |
| 79 | +note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>` |
| 80 | + --> $DIR/abstract-const-as-cast-3.rs:8:22 |
| 81 | + | |
| 82 | +LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {} |
| 83 | + | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 84 | + |
| 85 | +error[E0308]: mismatched types |
| 86 | + --> $DIR/abstract-const-as-cast-3.rs:35:5 |
| 87 | + | |
| 88 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>(); |
| 89 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as u128 }`, found `{ O as u128 }` |
| 90 | + | |
| 91 | + = note: expected type `{ N as u128 }` |
| 92 | + found type `{ O as u128 }` |
| 93 | + |
| 94 | +error: unconstrained generic constant |
| 95 | + --> $DIR/abstract-const-as-cast-3.rs:38:5 |
| 96 | + | |
| 97 | +LL | fn assert_impl<T: Trait>() {} |
| 98 | + | ----- required by this bound in `use_trait_impl_2::assert_impl` |
| 99 | +... |
| 100 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>(); |
| 101 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 102 | + | |
| 103 | + = help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:` |
| 104 | +note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>` |
| 105 | + --> $DIR/abstract-const-as-cast-3.rs:8:22 |
| 106 | + | |
| 107 | +LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {} |
| 108 | + | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 109 | + |
| 110 | +error[E0308]: mismatched types |
| 111 | + --> $DIR/abstract-const-as-cast-3.rs:38:5 |
| 112 | + | |
| 113 | +LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>(); |
| 114 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N as _ }`, found `{ O as u128 }` |
| 115 | + | |
| 116 | + = note: expected type `{ N as _ }` |
| 117 | + found type `{ O as u128 }` |
| 118 | + |
| 119 | +error[E0308]: mismatched types |
| 120 | + --> $DIR/abstract-const-as-cast-3.rs:41:5 |
| 121 | + | |
| 122 | +LL | assert_impl::<HasCastInTraitImpl<13, { 12 as u128 }>>(); |
| 123 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `12_u128`, found `13_u128` |
| 124 | + | |
| 125 | + = note: expected type `12_u128` |
| 126 | + found type `13_u128` |
| 127 | + |
| 128 | +error[E0308]: mismatched types |
| 129 | + --> $DIR/abstract-const-as-cast-3.rs:43:5 |
| 130 | + | |
| 131 | +LL | assert_impl::<HasCastInTraitImpl<14, 13>>(); |
| 132 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `13_u128`, found `14_u128` |
| 133 | + | |
| 134 | + = note: expected type `13_u128` |
| 135 | + found type `14_u128` |
| 136 | + |
| 137 | +error: aborting due to 12 previous errors |
| 138 | + |
| 139 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments