review comments
This commit is contained in:
parent
de959afab5
commit
805333b2b5
@ -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),
|
||||
|
@ -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>`
|
@ -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`
|
Loading…
x
Reference in New Issue
Block a user