-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
struct Foo<Sized? T>;
impl<Sized? T> Foo<T> {
fn frob(self, bar: Box<T>) {}
}
fn main() {
let foo: Foo<Num> = Foo;
foo.frob(box 1i as Box<Num>);
}
yields the error
dstbug.rs:9:14: 9:32 error: mismatched types: expected `Box<core::num::Num>`, found `Box<core::num::Num>` (expected box, found box)
dstbug.rs:9 foo.frob(box 1i as Box<Num>);
^~~~~~~~~~~~~~~~~~
error: aborting due to previous error
cc @nick29581
Metadata
Metadata
Assignees
Labels
A-DSTsArea: Dynamically-sized types (DSTs)Area: Dynamically-sized types (DSTs)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints