-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`A-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics

Description
struct U <T> {
wtf: Option<Box<U<T>>>
}
fn main() {
U{ wtf: Some(Box(U{ wtf: None })) };
}
<anon>:5:19: 5:33 error: mismatched types:
expected `core::ptr::Unique<_>`,
found `U<_>`
(expected struct `core::ptr::Unique`,
found struct `U`) [E0308]
<anon>:5 U{ wtf: Some(Box(U{ wtf: None })) };
^~~~~~~~~~~~~~
<anon>:5:15: 5:34 error: mismatched types:
expected `Box<U<_>>`,
found `alloc::boxed::Box<_>`
(expected box,
found struct `alloc::boxed::Box`) [E0308]
<anon>:5 U{ wtf: Some(Box(U{ wtf: None })) };
^~~~~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
playpen: application terminated with error code 101
Could someone change the bad title? I am not good for english.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`A-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics