mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Consider trait aliases
This commit is contained in:
parent
ca1885de41
commit
b81df6b739
@ -1029,6 +1029,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
hir::Node::Item(hir::Item {
|
||||
kind: hir::ItemKind::TyAlias(_, generics), span, ..
|
||||
}) |
|
||||
hir::Node::Item(hir::Item {
|
||||
kind: hir::ItemKind::TraitAlias(generics, _), span, ..
|
||||
}) |
|
||||
hir::Node::Item(hir::Item {
|
||||
kind: hir::ItemKind::OpaqueTy(hir::OpaqueTy { generics, .. }), span, ..
|
||||
}) |
|
||||
|
@ -4,9 +4,10 @@ error[E0277]: the trait bound `T: Foo` is not satisfied
|
||||
LL | trait A<T: Foo> {}
|
||||
| --------------- required by `A`
|
||||
LL | trait B<T> = A<T>;
|
||||
| ^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `T`
|
||||
|
|
||||
= help: consider adding a `where T: Foo` bound
|
||||
| ^^^^^^^^-^^^^^^^^^
|
||||
| | |
|
||||
| | help: consider restricting this bound: `T: Foo`
|
||||
| the trait `Foo` is not implemented for `T`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user