diff options
| author | bors <bors@rust-lang.org> | 2018-03-24 13:23:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-03-24 13:23:17 +0000 |
| commit | b4aa80dd73df9708022cc383aad8da1dcf38d1df (patch) | |
| tree | 96feb584c23b8680534b22f984fe70834ead5ec2 /src/rustllvm/RustWrapper.cpp | |
| parent | a0b0f5fba5d7bf18b24d1fa0e454a4fe871fecee (diff) | |
| parent | 94468dac6350a29dc2eb1eed01308ec78224f7ba (diff) | |
| download | rust-b4aa80dd73df9708022cc383aad8da1dcf38d1df.tar.gz rust-b4aa80dd73df9708022cc383aad8da1dcf38d1df.zip | |
Auto merge of #49251 - nikomatsakis:issue-15872-elision-impl-header, r=cramertj
support elision in impl headers
You can now do things like:
```
impl MyTrait<'_> for &u32 { ... }
```
Each `'_` or elided lifetime is a fresh parameter. `'_` and elision are still not permitted in associated type values. (Plausibly we could support that if there is a single input lifetime.) The original lifetime elision RFC was a bit unclear on this point: [as documented here, I think this is the correct interpretation, both because it fits existing impls and it's most analogous to the behavior in fns](https://github.com/rust-lang/rust/issues/15872#issuecomment-338700138).
We do not support elision with deprecated forms:
```
impl MyTrait for std::cell::Ref<u32> { } // ERROR
```
Builds on the in-band lifetime stuff.
r? @cramertj
Fixes #15872
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
