Skip to content

Commit

Permalink
Erase lifetime in E0277 default label
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Feb 29, 2024
1 parent 2541c5b commit f80daf4
Show file tree
Hide file tree
Showing 74 changed files with 131 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4773,16 +4773,23 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>(
Some(desc) => format!(" {desc}"),
None => String::new(),
};
let pred = tcx.erase_regions(if tcx.features().non_lifetime_binders {
// We can't erase the lifetime bounds on their own when this feature is enabled.
// `instantiate_bound_regions_with_erased` expects there to be no type bounds.
trait_predicate.skip_binder()
} else {
tcx.instantiate_bound_regions_with_erased(*trait_predicate)
});
if let ty::ImplPolarity::Positive = trait_predicate.polarity() {
format!(
"{pre_message}the trait `{}` is not implemented for{desc} `{}`{post}",
trait_predicate.print_modifiers_and_trait_path(),
tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None),
pred.print_modifiers_and_trait_path(),
tcx.short_ty_string(pred.self_ty(), &mut None),
)
} else {
// "the trait bound `!Send: T` is not satisfied" reads better than "`!Send` is
// not implemented for `T`".
format!("{pre_message}the trait bound `{trait_predicate}` is not satisfied{post}")
format!("{pre_message}the trait bound `{pred}` is not satisfied{post}")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `Clone` is not implemented for `<T as X<'_>>::U`
--> $DIR/hr-associated-type-bound-object.rs:7:13
|
LL | fn f<'a, T: X<'a> + ?Sized>(x: &<T as X<'a>>::U) {
| ^^^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
| ^^^^^ the trait `Clone` is not implemented for `<T as X<'_>>::U`
|
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-object.rs:3:33
Expand All @@ -21,7 +21,7 @@ error[E0277]: the trait `Clone` is not implemented for `<T as X<'_>>::U`
--> $DIR/hr-associated-type-bound-object.rs:9:7
|
LL | <<T as X<'_>>::U>::clone(x);
| ^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
| ^ the trait `Clone` is not implemented for `<T as X<'_>>::U`
|
note: required by a bound in `X::U`
--> $DIR/hr-associated-type-bound-object.rs:3:33
Expand Down Expand Up @@ -51,7 +51,7 @@ error[E0277]: the trait `Clone` is not implemented for `<T as X<'_>>::U`
--> $DIR/hr-associated-type-bound-object.rs:9:5
|
LL | <<T as X<'_>>::U>::clone(x);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<T as X<'b>>::U`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<T as X<'_>>::U`
|
note: required by a bound in `X`
--> $DIR/hr-associated-type-bound-object.rs:3:33
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `X<'_, T>` is not implemented for `T`
--> $DIR/hr-associated-type-bound-param-6.rs:12:12
|
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T`
| ^^^^^^^^ the trait `X<'_, T>` is not implemented for `T`
|
help: consider restricting type parameter `T`
|
Expand All @@ -13,7 +13,7 @@ error[E0277]: the trait `X<'_, i32>` is not implemented for `i32`
--> $DIR/hr-associated-type-bound-param-6.rs:18:5
|
LL | <(i32,) as X<i32>>::f("abc");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> X<'b, i32>` is not implemented for `i32`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `X<'_, i32>` is not implemented for `i32`
|
= help: the trait `X<'_, T>` is implemented for `(S,)`

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/associated-types/issue-43924.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `Default` is not implemented for `dyn ToString`
--> $DIR/issue-43924.rs:7:45
|
LL | type Out: Default + ToString + ?Sized = dyn ToString;
| ^^^^^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)`
| ^^^^^^^^^^^^ the trait `Default` is not implemented for `dyn ToString`
|
note: required by a bound in `Foo::Out`
--> $DIR/issue-43924.rs:7:15
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/associated-types/issue-59324.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _>
LL | fn with_factory<H>(factory: dyn ThriftService<()>) {}
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn ThriftService<(), AssocType = _> + 'static)`
= help: the trait `Sized` is not implemented for `dyn ThriftService<(), AssocType = _>`
= help: unsized fn params are gated as an unstable feature
help: you can use `impl Trait` as the argument type
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/awaiting-unsized-param.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `(dyn Future<Output = T> + Unpin + 'st
LL | async fn bug<T>(mut f: dyn Future<Output = T> + Unpin) -> T {
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Future<Output = T> + Unpin + 'static)`
= help: the trait `Sized` is not implemented for `dyn Future<Output = T> + Unpin`
= note: all values captured by value by a closure must have a statically known size

error: aborting due to 1 previous error; 1 warning emitted
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/closures/capture-unsized-by-move.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | let k2 = move || {
LL | k.to_string();
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn std::fmt::Display + 'static)`
= help: the trait `Sized` is not implemented for `dyn std::fmt::Display`
= note: all values captured by value by a closure must have a statically known size

error: aborting due to 1 previous error
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/closures/issue-111932.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known
LL | foos.for_each(|foo| {
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
= help: the trait `Sized` is not implemented for `dyn Foo`
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature

Expand Down
8 changes: 4 additions & 4 deletions tests/ui/consts/const-unsized.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot
LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
= help: the trait `Sized` is not implemented for `dyn Debug + Sync`

error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
--> $DIR/const-unsized.rs:3:35
|
LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
= help: the trait `Sized` is not implemented for `dyn Debug + Sync`
= note: constant expressions must have a statically known size

error[E0277]: the size for values of type `str` cannot be known at compilation time
Expand All @@ -38,15 +38,15 @@ error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot
LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
| ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
= help: the trait `Sized` is not implemented for `dyn Debug + Sync`

error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
--> $DIR/const-unsized.rs:11:37
|
LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
= help: the trait `Sized` is not implemented for `dyn Debug + Sync`
= note: constant expressions must have a statically known size

error[E0277]: the size for values of type `str` cannot be known at compilation time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LL | || }
LL | | });
| |______^ expected an `FnOnce(&bool)` closure, found `bool`
|
= help: the trait `for<'a> FnOnce<(&'a bool,)>` is not implemented for `bool`
= help: the trait `FnOnce<(&bool,)>` is not implemented for `bool`
note: required by a bound in `Option::<T>::filter`
--> $SRC_DIR/core/src/option.rs:LL:COL
help: you might have meant to create the closure instead of a block
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/feature-gates/feature-gate-trivial_bounds.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at
LL | fn unsized_local() where Dst<dyn A>: Sized {
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`, which is required by `Dst<(dyn A + 'static)>: Sized`
= help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `dyn A`, which is required by `Dst<(dyn A + 'static)>: Sized`
note: required because it appears within the type `Dst<(dyn A + 'static)>`
--> $DIR/feature-gate-trivial_bounds.rs:48:8
|
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known
LL | fn foo(x: dyn Foo) {
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
= help: the trait `Sized` is not implemented for `dyn Foo`
= help: unsized fn params are gated as an unstable feature
help: you can use `impl Trait` as the argument type
|
Expand All @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known
LL | fn bar(x: Foo) {
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
= help: the trait `Sized` is not implemented for `dyn Foo`
= help: unsized fn params are gated as an unstable feature
help: you can use `impl Trait` as the argument type
|
Expand Down Expand Up @@ -51,7 +51,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known
LL | foo(*x);
| ^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
= help: the trait `Sized` is not implemented for `dyn Foo`
= note: all function arguments must have a statically known size
= help: unsized fn params are gated as an unstable feature

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/feature-gates/feature-gate-unsized_locals.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn FnOnce() + 'static)` cannot be k
LL | fn f(f: dyn FnOnce()) {}
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn FnOnce() + 'static)`
= help: the trait `Sized` is not implemented for `dyn FnOnce()`
= help: unsized fn params are gated as an unstable feature
help: you can use `impl Trait` as the argument type
|
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/for/issue-20605.next.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `IntoIterator` is not implemented for `dyn Iterator<Item
--> $DIR/issue-20605.rs:5:17
|
LL | for item in *things { *item = 0 }
| ^^^^^^^ the trait `IntoIterator` is not implemented for `dyn Iterator<Item = &'a mut u8>`
| ^^^^^^^ the trait `IntoIterator` is not implemented for `dyn Iterator<Item = &mut u8>`

error: the type `<dyn Iterator<Item = &'a mut u8> as IntoIterator>::IntoIter` is not well-formed
--> $DIR/issue-20605.rs:5:17
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/function-pointer/unsized-ret.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ error[E0277]: the size for values of type `(dyn std::fmt::Display + 'a)` cannot
LL | foo::<for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&(),));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`, which is required by `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a): Fn<_>`
= help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `Sized` is not implemented for `dyn std::fmt::Display`, which is required by `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a): Fn<_>`
= note: required because it appears within the type `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`
note: required by a bound in `foo`
--> $DIR/unsized-ret.rs:5:11
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/generic-associated-types/issue-101020.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo<&mut ()>` is not implemented for `&mut ()`
--> $DIR/issue-101020.rs:31:22
|
LL | (&mut EmptyIter).consume(());
| ^^^^^^^ the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()`, which is required by `for<'a> &'a mut (): FuncInput<'a, &'a mut ()>`
| ^^^^^^^ the trait `Foo<&mut ()>` is not implemented for `&mut ()`, which is required by `for<'a> &'a mut (): FuncInput<'a, &'a mut ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-101020.rs:28:1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Deref<Target = T> + 'static)` ca
LL | type Pointer<T> = dyn Deref<Target = T>;
| ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Deref<Target = T> + 'static)`
= help: the trait `Sized` is not implemented for `dyn Deref<Target = T>`
note: required by a bound in `PointerFamily::Pointer`
--> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:4:5
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ error[E0277]: the trait `Foo` is not implemented for `Box<dyn Foo>`
--> $DIR/unknown-lifetime-ice-119827.rs:7:14
|
LL | impl Foo for Box<dyn Foo> {}
| ^^^^^^^^^^^^ the trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>`
| ^^^^^^^^^^^^ the trait `Foo` is not implemented for `Box<dyn Foo>`
|
= help: the trait `Foo` is implemented for `Box<(dyn Foo + 'static)>`

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: expected a `Fn(&'w ())` closure, found `fn(&'w ())`
LL | ice();
| ^^^^^ expected an `Fn(&'w ())` closure, found `fn(&'w ())`
|
= help: the trait `for<'w> Fn<(&'w (),)>` is not implemented for `fn(&'w ())`
= help: the trait `Fn<(&(),)>` is not implemented for `fn(&())`
note: required by a bound in `ice`
--> $DIR/fn-ptr.rs:7:25
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `Bar<'_>` is not implemented for `B`
--> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26
|
LL | want_bar_for_any_ccx(b);
| -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| -------------------- ^ the trait `Bar<'_>` is not implemented for `B`
| |
| required by a bound introduced by this call
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo<'_>` is not implemented for `F`
--> $DIR/hrtb-higher-ranker-supertraits.rs:18:26
|
LL | want_foo_for_any_tcx(f);
| -------------------- ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
| -------------------- ^ the trait `Foo<'_>` is not implemented for `F`
| |
| required by a bound introduced by this call
|
Expand All @@ -22,7 +22,7 @@ error[E0277]: the trait `Bar<'_>` is not implemented for `B`
--> $DIR/hrtb-higher-ranker-supertraits.rs:35:26
|
LL | want_bar_for_any_ccx(b);
| -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
| -------------------- ^ the trait `Bar<'_>` is not implemented for `B`
| |
| required by a bound introduced by this call
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `SomeTrait<'_>` is not implemented for `T`
--> $DIR/issue-85455.rs:8:14
|
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SomeTrait<'_>` is not implemented for `T`
|
help: consider restricting type parameter `T`
|
Expand All @@ -13,7 +13,7 @@ error[E0277]: the trait `SomeTrait<'_>` is not implemented for `T`
--> $DIR/issue-85455.rs:8:5
|
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SomeTrait<'_>` is not implemented for `T`
|
help: consider restricting type parameter `T`
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the trait `BufferMut` is not implemented for `&()`
--> $DIR/issue-89118.rs:19:8
|
LL | C: StackContext,
| ^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
| ^^^^^^^^^^^^ the trait `BufferMut` is not implemented for `&()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
Expand All @@ -29,7 +29,7 @@ error[E0277]: the trait `BufferMut` is not implemented for `&()`
--> $DIR/issue-89118.rs:29:9
|
LL | impl<C> EthernetWorker<C> {}
| ^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
| ^^^^^^^^^^^^^^^^^ the trait `BufferMut` is not implemented for `&()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
Expand All @@ -56,7 +56,7 @@ error[E0277]: the trait `BufferMut` is not implemented for `&()`
--> $DIR/issue-89118.rs:22:20
|
LL | type Handler = Ctx<C::Dispatcher>;
| ^^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
| ^^^^^^^^^^^^^^^^^^ the trait `BufferMut` is not implemented for `&()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>`
|
help: this trait has no implementations, consider adding one
--> $DIR/issue-89118.rs:1:1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) }
| |
| doesn't have a size known at compile-time
|
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized`
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `dyn Trait`, which is required by `(usize, (dyn Trait + 'static)): Sized`
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
= note: the return type of a function must have a statically known size

Expand All @@ -38,7 +38,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) }
| |
| doesn't have a size known at compile-time
|
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized`
= help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `dyn Trait`, which is required by `(usize, (dyn Trait + 'static)): Sized`
= note: required because it appears within the type `(usize, (dyn Trait + 'static))`
= note: the return type of a function must have a statically known size

Expand Down
Loading

0 comments on commit f80daf4

Please sign in to comment.