This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
## the type parameter `T` is not constrained by the impl trait
```rust
usestd::default::Default;
traitMaker{
typeItem;
fnmake(&mutself)-> Self::Item;
}
structFoo<T>{
a: T,
}
structBar;
impl<T>MakerforBar
whereT: Default{
typeItem=Foo<T>;
fnmake(&mutself)-> Foo<T>{
Foo{
a: <TasDefault>::default(),
}
}
}
```
上面的代码会导致以下编译错误:
```bash
tests/lang.rs:1000:10: 1000:11 error: the type parameter `T` is not constrained by the impl trait, self type, or predicates [E0207]