Closed
Description
UPDATE: Mentoring instructions below.
Affected Versions
rustc 1.3.0 - 1.5.0
STR
#[derive(Clone)] struct Foo<'a>(&'a u32);
impl Copy for Foo<'static> {}
fn main() {
let s = 2;
let a = Foo(&s);
drop(a);
drop(a);
}
Expected Result
Foo<'a>
is not Copy
, so this should cause a borrowck error.
Actual Result
The code compiles :-).
Metadata
Metadata
Assignees
Labels
Area: Trait systemCategory: This is a bug.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.