]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #24461 - nikomatsakis:issue-22077-unused-lifetimes, r=aturon
authorbors <bors@rust-lang.org>
Fri, 17 Apr 2015 20:38:18 +0000 (20:38 +0000)
committerbors <bors@rust-lang.org>
Fri, 17 Apr 2015 20:38:18 +0000 (20:38 +0000)
This makes it illegal to have unconstrained lifetimes that appear in an associated type definition. Arguably, we should prohibit all unconstrained lifetimes -- but it would break various macros. It'd be good to evaluate how large a break change it would be. But this seems like the minimal change we need to do to establish soundness, so we should land it regardless. Another variant would be to prohibit all lifetimes that appear in any impl item, not just associated types. I don't think that's necessary for soundness -- associated types are different because they can be projected -- but it would feel a bit more consistent and "obviously" safe. I'll experiment with that in the meantime.

r? @aturon

Fixes #22077.

1  2 
src/librustc/util/ppaux.rs

Simple merge