diff options
| author | bors <bors@rust-lang.org> | 2018-09-29 01:09:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-29 01:09:07 +0000 |
| commit | a0a6e43755f6e4126831f7553102350374fa99ad (patch) | |
| tree | 4d2a6af6f389de75b965288e383afba9492e3901 /src/rustllvm/RustWrapper.cpp | |
| parent | 63d51e89af33a7cc1c81bbaee335131b7bd00803 (diff) | |
| parent | 032d97fa018de3d50136b338e02dabe84ab9c695 (diff) | |
| download | rust-a0a6e43755f6e4126831f7553102350374fa99ad.tar.gz rust-a0a6e43755f6e4126831f7553102350374fa99ad.zip | |
Auto merge of #53013 - zackmdavis:infer_outlints, r=nikomatsakis
in which inferable outlives-requirements are linted RFC 2093 (tracking issue #44493) lets us leave off these commonsensically inferable `T: 'a` outlives requirements. (A separate feature-gate was split off for the case of 'static lifetimes, for which questions still remain.) Detecting these was requested as an idioms-2018 lint. Resolves #52042, an item under the fabulous metaïssue #52047. It's plausible that this shouldn't land until after `infer_outlives_requirements` has been stabilized ([final comment period started](https://github.com/rust-lang/rust/issues/44493#issuecomment-408852946) 4 days ago), but I think there's also a strong case to not-wait in order to maximize the time that [Edition Preview 2](https://internals.rust-lang.org/t/rust-2018-release-schedule-and-extended-beta/8076) users have to kick at it. (It's allow by default, so there's no impact unless you explicitly turn it or the rust-2018-idioms group up to `warn` or higher.) Questions— * Is `explicit-outlives-requirements` a good name? (I chose it as an [RFC 344](https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints)-compliant "inversion" of the feature-gate name, `infer_outlives_requirements`, but I could imagine someone arguing that the word `struct` should be part of the name somewhere, for specificity.) * Are there any false-positives or false-negatives? @nikomatsakis [said that](https://github.com/rust-lang/rust/issues/52042#issuecomment-406409795) getting this right would be "fairly hard", which makes me nervous that I'm missing something. The UI test in the initial submission of this pull request just exercises the examples [given in the Edition Guide](https://rust-lang-nursery.github.io/edition-guide/2018/transitioning/ownership-and-lifetimes/struct-inference.html).  r? @alexcrichton
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
