rust private

To start a new build commit change to repository or click New build button.
Auto merge of #52168 - nikomatsakis:nll-region-name, r=estebank
find and highlight the `&` or `'_` in `region_name` Before: ``` --> $DIR/dyn-trait-underscore.rs:18:5 | LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> { - | ----- lifetime `'1` appears in this argument LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'1` must outlive `'static` ``` After: ``` --> $DIR/dyn-trait-underscore.rs:18:5 | LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> { + | - let's call the lifetime of this reference `'1` LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^^^^^^^^^^^^^^^^^^ cast requires that `'1` must outlive `'static` ``` Not intended as the final end point necessarily in any sense. I intentionally left some to-do points to fill in later: - Does not apply to upvars in closures yet (should be relatively easy) - Does not handle the case where we can't find a precise match very well - And of course we can still tweak wording but shows the basic idea of how to make the `Ty` and `hir::Ty` to find a good spot to highlight. r? @estebank cc @davidtwco
1.0.8091
7 years ago by bors
7 years ago in 1 hr 55 min
Job name
Tests
Status