summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-types/issue-43924.stderr
blob: ab1a9511ec6c7e041488a8c94fa362278b6341d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfied
  --> $DIR/issue-43924.rs:7:45
   |
LL |     type Out: Default + ToString + ?Sized = dyn ToString;
   |                                             ^^^^^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)`
   |
note: required by a bound in `Foo::Out`
  --> $DIR/issue-43924.rs:7:15
   |
LL |     type Out: Default + ToString + ?Sized = dyn ToString;
   |               ^^^^^^^ required by this bound in `Foo::Out`

error[E0599]: no function or associated item named `default` found for trait object `(dyn ToString + 'static)` in the current scope
  --> $DIR/issue-43924.rs:14:39
   |
LL |     assert_eq!(<() as Foo<u32>>::Out::default().to_string(), "false");
   |                                       ^^^^^^^ function or associated item not found in `dyn ToString`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.