Skip to content

Commit 805333b

Browse files
committed
review comments
1 parent de959af commit 805333b

5 files changed

+4
-4
lines changed

src/librustc/infer/error_reporting/named_anon_conflict.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use infer::region_inference::RegionResolutionError;
1616
use ty;
1717

1818
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
19-
/// Generate an error message for when the function arguments consist of a named region and
20-
/// an anonymous region and corresponds to `ConcreteFailure(..)`
19+
/// When given a `ConcreteFailure` for a function with arguments containing a named region and
20+
/// an anonymous region, emit an descriptive diagnostic error.
2121
pub fn try_report_named_anon_conflict(&self, error: &RegionResolutionError<'tcx>) -> bool {
2222
let (span, sub, sup) = match *error {
2323
ConcreteFailure(ref origin, sub, sup) => (origin.span(), sub, sup),

src/test/ui/lifetime-errors/ex4-anon-named-regions.stderr renamed to src/test/ui/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0621]: explicit lifetime required in the type of `other`
2-
--> $DIR/ex4-anon-named-regions.rs:21:21
2+
--> $DIR/ex1-return-one-existing-name-early-bound-in-struct.rs:21:21
33
|
44
17 | fn bar(&self, other: Foo) -> Foo<'a> {
55
| ----- consider changing the type of `other` to `Foo<'a>`

src/test/ui/lifetime-errors/ex3-both-anon-regions-earlybound-regions.stderr renamed to src/test/ui/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0621]: explicit lifetime required in the type of `y`
2-
--> $DIR/ex3-both-anon-regions-earlybound-regions.rs:17:12
2+
--> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:12
33
|
44
13 | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T)
55
| - consider changing the type of `y` to `&'a T`

0 commit comments

Comments
 (0)