summary refs log tree commit diff
path: root/src/test/ui/object-lifetime/object-lifetime-default-dyn-binding-static.rs
AgeCommit message (Collapse)AuthorLines
2019-08-19use static as object-lifetime default for type XX in `Foo<Item=XX>`Niko Matsakis-0/+28
Currently the default is "inherited" from context, so e.g. `&impl Foo<Item = dyn Bar>` would default to `&'x impl Foo<Item = dyn Bar + 'x>`, but this triggers an ICE and is not very consistent. This patch doesn't implement what I expect would be the correct semantics, because those are likely too complex. Instead, it handles what I'd expect to be the common case -- where the trait has no lifetime parameters.