|
| 1 | +error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time |
| 2 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13 |
| 3 | + | |
| 4 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 6 | + | |
| 7 | + = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)` |
| 8 | +note: required by an implicit `Sized` bound in `Bar` |
| 9 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12 |
| 10 | + | |
| 11 | +LL | struct Bar<T>(T); |
| 12 | + | ^ required by the implicit `Sized` requirement on this type parameter in `Bar` |
| 13 | +help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>` |
| 14 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12 |
| 15 | + | |
| 16 | +LL | struct Bar<T>(T); |
| 17 | + | ^ - ...if indirection were used here: `Box<T>` |
| 18 | + | | |
| 19 | + | this could be changed to `T: ?Sized`... |
| 20 | + |
| 21 | +error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type |
| 22 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:8:32 |
| 23 | + | |
| 24 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 25 | + | ^^^^^^^^^^^^ |
| 26 | +... |
| 27 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 28 | + | ----------------------------------------- this field does not implement `ConstParamTy_` |
| 29 | + | |
| 30 | + = note: this error originates in the derive macro `ConstParamTy` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 31 | + |
| 32 | +error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type |
| 33 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:8:32 |
| 34 | + | |
| 35 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 36 | + | ^^^^^^^^^^^^ |
| 37 | +... |
| 38 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 39 | + | ----------------------------------------- this field does not implement `ConstParamTy_` |
| 40 | + | |
| 41 | +note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): Eq` |
| 42 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13 |
| 43 | + | |
| 44 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 45 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 46 | +note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): Sized` |
| 47 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13 |
| 48 | + | |
| 49 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | +note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): UnsizedConstParamTy` |
| 52 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13 |
| 53 | + | |
| 54 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 55 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 56 | + = note: this error originates in the derive macro `ConstParamTy` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 57 | + |
| 58 | +error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time |
| 59 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5 |
| 60 | + | |
| 61 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 62 | + | ----- in this derive macro expansion |
| 63 | +... |
| 64 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 65 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 66 | + | |
| 67 | + = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`, which is required by `&&'static Bar<(dyn Debug + 'static)>: Debug` |
| 68 | + = help: the trait `Debug` is implemented for `Bar<T>` |
| 69 | +note: required for `Bar<(dyn Debug + 'static)>` to implement `Debug` |
| 70 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:20:10 |
| 71 | + | |
| 72 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 73 | + | ^^^^^ |
| 74 | +LL | struct Bar<T>(T); |
| 75 | + | - unsatisfied trait bound introduced in this `derive` macro |
| 76 | + = note: 2 redundant requirements hidden |
| 77 | + = note: required for `&&'static Bar<(dyn Debug + 'static)>` to implement `Debug` |
| 78 | + = note: required for the cast from `&&&'static Bar<(dyn Debug + 'static)>` to `&dyn Debug` |
| 79 | + = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 80 | + |
| 81 | +error[E0369]: binary operation `==` cannot be applied to type `&Bar<dyn Debug>` |
| 82 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5 |
| 83 | + | |
| 84 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 85 | + | --------- in this derive macro expansion |
| 86 | +... |
| 87 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 88 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 89 | + | |
| 90 | + = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 91 | + |
| 92 | +error[E0277]: the trait bound `dyn Debug: Eq` is not satisfied |
| 93 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5 |
| 94 | + | |
| 95 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 96 | + | -- in this derive macro expansion |
| 97 | +... |
| 98 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 99 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `dyn Debug`, which is required by `&'static Bar<dyn Debug>: Eq` |
| 100 | + | |
| 101 | + = help: the trait `Eq` is implemented for `Bar<T>` |
| 102 | +note: required for `Bar<dyn Debug>` to implement `Eq` |
| 103 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:20:28 |
| 104 | + | |
| 105 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 106 | + | ^^ unsatisfied trait bound introduced in this `derive` macro |
| 107 | + = note: 1 redundant requirement hidden |
| 108 | + = note: required for `&'static Bar<dyn Debug>` to implement `Eq` |
| 109 | +note: required by a bound in `AssertParamIsEq` |
| 110 | + --> $SRC_DIR/core/src/cmp.rs:LL:COL |
| 111 | + = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 112 | + |
| 113 | +error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time |
| 114 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5 |
| 115 | + | |
| 116 | +LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)] |
| 117 | + | -- in this derive macro expansion |
| 118 | +... |
| 119 | +LL | nested: &'static Bar<dyn std::fmt::Debug>, |
| 120 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
| 121 | + | |
| 122 | + = help: the trait `Sized` is not implemented for `dyn Debug` |
| 123 | +note: required by an implicit `Sized` bound in `Bar` |
| 124 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12 |
| 125 | + | |
| 126 | +LL | struct Bar<T>(T); |
| 127 | + | ^ required by the implicit `Sized` requirement on this type parameter in `Bar` |
| 128 | +help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>` |
| 129 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12 |
| 130 | + | |
| 131 | +LL | struct Bar<T>(T); |
| 132 | + | ^ - ...if indirection were used here: `Box<T>` |
| 133 | + | | |
| 134 | + | this could be changed to `T: ?Sized`... |
| 135 | + = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 136 | + |
| 137 | +error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time |
| 138 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:26:33 |
| 139 | + | |
| 140 | +LL | let x: Test<{ Foo { nested: &Bar(4) } }> = Test; |
| 141 | + | ^^^^^^^ doesn't have a size known at compile-time |
| 142 | + | |
| 143 | + = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)` |
| 144 | +note: required by an implicit `Sized` bound in `Bar` |
| 145 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12 |
| 146 | + | |
| 147 | +LL | struct Bar<T>(T); |
| 148 | + | ^ required by the implicit `Sized` requirement on this type parameter in `Bar` |
| 149 | +help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>` |
| 150 | + --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12 |
| 151 | + | |
| 152 | +LL | struct Bar<T>(T); |
| 153 | + | ^ - ...if indirection were used here: `Box<T>` |
| 154 | + | | |
| 155 | + | this could be changed to `T: ?Sized`... |
| 156 | + |
| 157 | +error: aborting due to 8 previous errors |
| 158 | + |
| 159 | +Some errors have detailed explanations: E0204, E0277, E0369. |
| 160 | +For more information about an error, try `rustc --explain E0204`. |
0 commit comments