diff --git a/src/librustc/infer/error_reporting/named_anon_conflict.rs b/src/librustc/infer/error_reporting/named_anon_conflict.rs index 4563d955413e..6d3b95078409 100644 --- a/src/librustc/infer/error_reporting/named_anon_conflict.rs +++ b/src/librustc/infer/error_reporting/named_anon_conflict.rs @@ -16,8 +16,8 @@ use infer::region_inference::RegionResolutionError; use ty; impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { - /// Generate an error message for when the function arguments consist of a named region and - /// an anonymous region and corresponds to `ConcreteFailure(..)` + /// When given a `ConcreteFailure` for a function with arguments containing a named region and + /// an anonymous region, emit an descriptive diagnostic error. pub fn try_report_named_anon_conflict(&self, error: &RegionResolutionError<'tcx>) -> bool { let (span, sub, sup) = match *error { ConcreteFailure(ref origin, sub, sup) => (origin.span(), sub, sup), diff --git a/src/test/ui/lifetime-errors/ex4-anon-named-regions.rs b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs similarity index 100% rename from src/test/ui/lifetime-errors/ex4-anon-named-regions.rs rename to src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs diff --git a/src/test/ui/lifetime-errors/ex4-anon-named-regions.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr similarity index 82% rename from src/test/ui/lifetime-errors/ex4-anon-named-regions.stderr rename to src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr index 4a127bbc551f..d1660a620b6c 100644 --- a/src/test/ui/lifetime-errors/ex4-anon-named-regions.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `other` - --> $DIR/ex4-anon-named-regions.rs:21:21 + --> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21 | 17 | fn bar(&self, other: Foo) -> Foo<'a> { | ----- consider changing the type of `other` to `Foo<'a>` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-earlybound-regions.rs b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs similarity index 100% rename from src/test/ui/lifetime-errors/ex3-both-anon-regions-earlybound-regions.rs rename to src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-earlybound-regions.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr similarity index 83% rename from src/test/ui/lifetime-errors/ex3-both-anon-regions-earlybound-regions.stderr rename to src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr index 6c5ed672604c..980f14a51d9b 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-earlybound-regions.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr @@ -1,5 +1,5 @@ error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex3-both-anon-regions-earlybound-regions.rs:17:12 + --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12 | 13 | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) | - consider changing the type of `y` to `&'a T`