Closed
Description
The following code fails to compile, but it seems correct to me:
struct Foo(u32);
type Bar = Foo;
fn main() {
let foo = Foo(1);
let bar = Bar(2);
// error[E0423]: expected function, found type alias `Bar`
}
One alternative is use Foo as Bar;
, but that doesn't allow me to give a different doc comment for Bar
.
#42601 is a closely related issue (or even the same).
Meta
rustc 1.18.0 (03fc9d6 2017-06-06)
binary: rustc
commit-hash: 03fc9d6
commit-date: 2017-06-06
host: x86_64-unknown-linux-gnu
release: 1.18.0
LLVM version: 3.9
Metadata
Metadata
Assignees
Labels
No labels