Closed
Description
When compiling this code:
struct Foo<T> {
inner: Bar<T>,
}
the compiler emits:
error[E0412]: type name `Bar` is undefined or not in scope
--> foo.rs:2:12
|
2 | inner: Bar<T>,
| ^^^^^^ undefined or not in scope
|
= help: no candidates by the name of `Bar` found in your project; maybe you misspelled the name or forgot to import an external crate?
error: main function not found
error[E0392]: parameter `T` is never used
--> foo.rs:1:12
|
1 | struct Foo<T> {
| ^
|
= help: consider removing `T` or using a marker such as `std::marker::PhantomData`
error: aborting due to previous error
The second error here isn't actually relevant and should be turned off because the first error was emitted.
cc @nrc
cc @jonathandturner