about summary refs log tree commit diff
path: root/tests/ui/traits/object/constrain-via-unnecessary-bound.stderr
blob: 4383ca869eacca7d19eeb453ed44a6870b29daa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
warning: unnecessary associated type bound for dyn-incompatible associated type
  --> $DIR/constrain-via-unnecessary-bound.rs:17:26
   |
LL | impl Other for dyn Trait<Assoc = ()> {}
   |                          ^^^^^^^^^^ help: remove this bound
   |
   = note: this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`
   = note: `#[warn(unused_associated_type_bounds)]` on by default

warning: unnecessary associated type bound for dyn-incompatible associated type
  --> $DIR/constrain-via-unnecessary-bound.rs:21:19
   |
LL | impl<T> dyn Trait<Assoc = T> {}
   |                   ^^^^^^^^^ help: remove this bound
   |
   = note: this associated type has a `where Self: Sized` bound, and while the associated type can be specified, it cannot be used because trait objects are never `Sized`

warning: 2 warnings emitted