rust/src/test/ui/in-band-lifetimes
bors ffaf3d2567 Auto merge of #52069 - zackmdavis:elided_states_of_america—and_to_the_re-pub-lic, r=nikomatsakis
add structured suggestions and fix false-positive for elided-lifetimes-in-paths lint

This adds structured suggestions to the elided-lifetimes-in-paths lint (introduced in Nov. 2017's #46254), prevents it from emitting a false-positive on anonymous (underscore) lifetimes (!), and adds it to the idioms-2018 group (#52041).

~~As an aside, "elided-lifetimes-in-paths" seems like an unfortunate name, because it's not clear exactly what "elided" means. The motivation for this lint (see original issue #45992, and [RFC 2115](e978a8d301/text/2115-argument-lifetimes.md (motivation))) seems to be specifically about not supplying angle-bracketed lifetime arguments to non-`&` types, but (1) the phrase "lifetime elision" has historically also referred to the ability to not supply a lifetime name to `&` references, and (2) an `is_elided` method in the HIR returns true for anoymous/underscore lifetimes, which is _not_ what we're trying to lint here. (That naming confusion is almost certainly what led to the false positive addressed here.) Given that the lint is relatively new and is allow-by-default, is it too late to rename it ... um, _again_ (#50879)?~~

~~This does _not_ address a couple of other false positives discovered in https://github.com/rust-lang/rust/issues/52041#issuecomment-402547901.~~

![elided_states](https://user-images.githubusercontent.com/1076988/42302137-2bf9479c-7fce-11e8-8bd0-f29aefc802b6.png)

r? @nikomatsakis
cc @nrc @petrochenkov
2018-07-22 20:54:05 +00:00
..
impl Fallback to general error handling in ICE cases. 2018-07-22 12:53:55 +01:00
E0687_where.rs
E0687_where.stderr
E0687.rs
E0687.stderr
E0688.rs
E0688.stderr
elided-lifetimes.fixed in which the elided-lifetimes-in-paths lint undergoes a revolution 2018-07-22 08:27:10 -07:00
elided-lifetimes.rs in which the elided-lifetimes-in-paths lint undergoes a revolution 2018-07-22 08:27:10 -07:00
elided-lifetimes.stderr in which the elided-lifetimes-in-paths lint undergoes a revolution 2018-07-22 08:27:10 -07:00
mismatched_trait_impl-2.rs
mismatched_trait_impl-2.stderr add dyn to display of dynamic (trait) type names 2018-06-23 18:10:25 -07:00
mismatched_trait_impl.rs
mismatched_trait_impl.stderr Also point to free named region on lifetime errors 2018-06-28 11:12:44 -07:00
mismatched_trait.nll.stderr
mismatched_trait.rs
mismatched_trait.stderr
mismatched.nll.stderr
mismatched.rs
mismatched.stderr
mut_while_borrow.nll.stderr
mut_while_borrow.rs
mut_while_borrow.stderr
no_in_band_in_struct.rs
no_in_band_in_struct.stderr
no_introducing_in_band_in_locals.rs
no_introducing_in_band_in_locals.stderr
shadow.rs
shadow.stderr