@@ -469,5 +469,70 @@ help: one option is to consistently use `'a`
469
469
LL | fn multiple_outputs<'a>(v: &'a u8) -> (&'a u8, &'a u8) {
470
470
| ++ ++
471
471
472
- error: aborting due to 34 previous errors
472
+ error: lifetime flowing from input to output with different syntax can be confusing
473
+ --> $DIR/mismatched-lifetime-syntaxes.rs:230:45
474
+ |
475
+ LL | fn implicit_ref_to_implicit_path(v: &u8) -> ContainsLifetime;
476
+ | ^^^ ---------------- the lifetime gets resolved as `'_`
477
+ | |
478
+ | this lifetime flows to the output
479
+ |
480
+ help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
481
+ |
482
+ LL | fn implicit_ref_to_implicit_path(v: &u8) -> ContainsLifetime<'_>;
483
+ | ++++
484
+
485
+ error: lifetime flowing from input to output with different syntax can be confusing
486
+ --> $DIR/mismatched-lifetime-syntaxes.rs:233:49
487
+ |
488
+ LL | fn method_implicit_ref_to_implicit_path(&self) -> ContainsLifetime;
489
+ | ^^^^^ ---------------- the lifetime gets resolved as `'_`
490
+ | |
491
+ | this lifetime flows to the output
492
+ |
493
+ help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
494
+ |
495
+ LL | fn method_implicit_ref_to_implicit_path(&self) -> ContainsLifetime<'_>;
496
+ | ++++
497
+
498
+ error: lifetime flowing from input to output with different syntax can be confusing
499
+ --> $DIR/mismatched-lifetime-syntaxes.rs:238:45
500
+ |
501
+ LL | fn implicit_ref_to_implicit_path(v: &u8) -> ContainsLifetime {
502
+ | ^^^ ---------------- the lifetime gets resolved as `'_`
503
+ | |
504
+ | this lifetime flows to the output
505
+ |
506
+ help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
507
+ |
508
+ LL | fn implicit_ref_to_implicit_path(v: &u8) -> ContainsLifetime<'_> {
509
+ | ++++
510
+
511
+ error: lifetime flowing from input to output with different syntax can be confusing
512
+ --> $DIR/mismatched-lifetime-syntaxes.rs:243:49
513
+ |
514
+ LL | fn method_implicit_ref_to_implicit_path(&self) -> ContainsLifetime {
515
+ | ^^^^^ ---------------- the lifetime gets resolved as `'_`
516
+ | |
517
+ | this lifetime flows to the output
518
+ |
519
+ help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
520
+ |
521
+ LL | fn method_implicit_ref_to_implicit_path(&self) -> ContainsLifetime<'_> {
522
+ | ++++
523
+
524
+ error: lifetime flowing from input to output with different syntax can be confusing
525
+ --> $DIR/mismatched-lifetime-syntaxes.rs:257:45
526
+ |
527
+ LL | fn implicit_ref_to_implicit_path(v: &u8) -> ContainsLifetime;
528
+ | ^^^ ---------------- the lifetime gets resolved as `'_`
529
+ | |
530
+ | this lifetime flows to the output
531
+ |
532
+ help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
533
+ |
534
+ LL | fn implicit_ref_to_implicit_path(v: &u8) -> ContainsLifetime<'_>;
535
+ | ++++
536
+
537
+ error: aborting due to 39 previous errors
473
538
0 commit comments