Auto merge of #61172 - matthewjasper:cleanup-implied-bounds-lint, r=varkor

Improve the explicit_outlives_requirements lint

* Don't use Strings to compare parameters
* Extend the lint to lifetime bounds
* Extend the lint to enums and unions
* Use the correct span for where clauses in tuple structs
* Try to early-out where possible
* Remove unnecessary bounds in rustc crates
This commit is contained in:
bors 2019-06-19 12:41:38 +00:00
commit e79b2a18a2
20 changed files with 3498 additions and 617 deletions

View file

@ -1,8 +1,8 @@
error[E0646]: `main` function is not allowed to have a `where` clause
--> $DIR/E0646.rs:1:17
--> $DIR/E0646.rs:1:11
|
LL | fn main() where (): Copy {}
| ^^^^^^^^ `main` cannot have a `where` clause
| ^^^^^^^^^^^^^^ `main` cannot have a `where` clause
error: aborting due to previous error

View file

@ -1,8 +1,8 @@
error[E0647]: start function is not allowed to have a `where` clause
--> $DIR/E0647.rs:7:56
--> $DIR/E0647.rs:7:50
|
LL | fn start(_: isize, _: *const *const u8) -> isize where (): Copy {
| ^^^^^^^^ start function cannot have a `where` clause
| ^^^^^^^^^^^^^^ start function cannot have a `where` clause
error: aborting due to previous error

View file

@ -1,8 +1,8 @@
error[E0647]: start function is not allowed to have a `where` clause
--> $DIR/issue-50714-1.rs:9:56
--> $DIR/issue-50714-1.rs:9:50
|
LL | fn start(_: isize, _: *const *const u8) -> isize where fn(&()): Eq {
| ^^^^^^^^^^^ start function cannot have a `where` clause
| ^^^^^^^^^^^^^^^^^ start function cannot have a `where` clause
error: aborting due to previous error

View file

@ -1,8 +1,8 @@
error[E0646]: `main` function is not allowed to have a `where` clause
--> $DIR/issue-50714.rs:3:17
--> $DIR/issue-50714.rs:3:11
|
LL | fn main() where fn(&()): Eq {}
| ^^^^^^^^^^^ `main` cannot have a `where` clause
| ^^^^^^^^^^^^^^^^^ `main` cannot have a `where` clause
error: aborting due to previous error

View file

@ -1,75 +1,368 @@
#![allow(unused)]
#![deny(explicit_outlives_requirements)]
use std::fmt::{Debug, Display};
// These examples should live in edition-lint-infer-outlives.rs, but are split
// into this separate file because they can't be `rustfix`'d (and thus, can't
// be part of a `run-rustfix` test file) until rust-lang-nursery/rustfix#141
// is solved
struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
mod structs {
use std::fmt::Debug;
struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>
where U: 'a + Debug + 'b, 'b: 'a
//~^ ERROR outlives requirements can be inferred
{
tee: T,
yoo: &'a &'b U
}
}
struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
mod tuple_structs {
use std::fmt::Debug;
struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct BeeWhereAyTeeYooWhereAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U)
where U: 'a + Debug + 'b, 'b: 'a;
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
mod enums {
use std::fmt::Debug;
enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, },
W(&'a &'b U),
}
enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T, yoo: &'b U },
W,
}
enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
V(&'a T, &'b U),
W,
}
enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W(&'b U),
}
enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a T, &'b U),
W,
}
enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W(&'b U)
}
enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T, yoo: &'b U },
W,
}
enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a T, &'b U),
W,
}
enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W,
}
enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a &'b U),
}
enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
}
}
struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
mod unions {
use std::fmt::Debug;
struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: &'b U
}
union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
}
fn main() {}

View file

@ -1,8 +1,8 @@
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:11:43
--> $DIR/edition-lint-infer-outlives-multispan.rs:13:47
|
LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
|
note: lint level defined here
--> $DIR/edition-lint-infer-outlives-multispan.rs:2:9
@ -11,108 +11,678 @@ LL | #![deny(explicit_outlives_requirements)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- --
LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:16:57
--> $DIR/edition-lint-infer-outlives-multispan.rs:18:61
|
LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
| ^^^^^ ^^^^^
LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- --
LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:21:49
--> $DIR/edition-lint-infer-outlives-multispan.rs:23:53
|
LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:27:44
--> $DIR/edition-lint-infer-outlives-multispan.rs:29:48
|
LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
| ^^^^ ^^^^^
LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
| -- --
LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:33:44
--> $DIR/edition-lint-infer-outlives-multispan.rs:35:48
|
LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
| ^^^^ ^^^^^
LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:39:42
--> $DIR/edition-lint-infer-outlives-multispan.rs:41:46
|
LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
| ^^^^ ^^^^^^^^^^^^
LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
| ^^^^ ^^^^^^^^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
| -- --
LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:45:63
--> $DIR/edition-lint-infer-outlives-multispan.rs:47:67
|
LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
| ^^^^^ ^^^^^
LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:51:49
--> $DIR/edition-lint-infer-outlives-multispan.rs:53:53
|
LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
| ^^^^ ^^^^^
LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:57:49
--> $DIR/edition-lint-infer-outlives-multispan.rs:59:53
|
LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
| ^^^^ ^^^^^
LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:63:65
--> $DIR/edition-lint-infer-outlives-multispan.rs:65:69
|
LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
| ^^^^^^^ ^^^^^
LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:69:65
--> $DIR/edition-lint-infer-outlives-multispan.rs:71:69
|
LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
| ^^^^^^^ ^^^^^
LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: aborting due to 11 previous errors
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:77:38
|
LL | struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
| ^^^^ ^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeBee<'a, 'b, T> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:82:40
|
LL | struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
| ^^^^ ^^^^^^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeAyBee<'a, 'b, T> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:87:55
|
LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:92:68
|
LL | struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
| ^^^^^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:97:58
|
LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:104:18
|
LL | where U: 'a + Debug + 'b, 'b: 'a
| ^^^^^ ^^^^^ ^^^^^^
help: remove these bounds
|
LL | where U: Debug,
| -- ----
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:115:47
|
LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T);
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T);
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:118:72
|
LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b;
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:121:53
|
LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U);
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:124:48
|
LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U);
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug>(&'a T, &'b U);
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:127:48
|
LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U);
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug>(&'a T, &'b U);
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:130:46
|
LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b;
| ^^^^ ^^^^^^^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U>(&'a T, &'b U) ;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:133:81
|
LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b;
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:136:53
|
LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug;
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:139:53
|
LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b;
| ^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:142:75
|
LL | struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug;
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:145:75
|
LL | struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b;
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug;
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:148:38
|
LL | struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T);
| ^^^^ ^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeBee<'a, 'b, T>(&'a &'b T);
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:151:40
|
LL | struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T);
| ^^^^ ^^^^^^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeAyBee<'a, 'b, T>(&'a &'b T);
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:154:55
|
LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T);
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T);
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:157:71
|
LL | struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b;
| ^^^^^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug;
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:160:58
|
LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U);
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:164:18
|
LL | where U: 'a + Debug + 'b, 'b: 'a;
| ^^^^^ ^^^^^ ^^^^^^
help: remove these bounds
|
LL | where U: Debug, ;
| -- ----
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:171:45
|
LL | enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:176:59
|
LL | enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:181:51
|
LL | enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:187:46
|
LL | enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:193:46
|
LL | enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:199:44
|
LL | enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
| ^^^^ ^^^^^^^^^^^^
help: remove these bounds
|
LL | enum TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:205:65
|
LL | enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:211:51
|
LL | enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:217:51
|
LL | enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:223:67
|
LL | enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:229:67
|
LL | enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:235:36
|
LL | enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
| ^^^^ ^^^^
help: remove these bounds
|
LL | enum BeeOutlivesAyTeeBee<'a, 'b, T> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:240:38
|
LL | enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
| ^^^^ ^^^^^^^^^
help: remove these bounds
|
LL | enum BeeOutlivesAyTeeAyBee<'a, 'b, T> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:246:53
|
LL | enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:251:66
|
LL | enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
| ^^^^^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:256:56
|
LL | enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:262:75
|
LL | enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a {
| ^^^^^ ^^^^^ ^^^^^^
help: remove these bounds
|
LL | enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, {
| -- ----
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:271:46
|
LL | union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:276:60
|
LL | union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:281:52
|
LL | union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:287:47
|
LL | union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:293:47
|
LL | union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:299:45
|
LL | union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b {
| ^^^^ ^^^^^^^^^^^^
help: remove these bounds
|
LL | union TeeOutlivesAyYooWhereBee<'a, 'b, T, U> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:305:66
|
LL | union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b {
| ^^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:311:52
|
LL | union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:317:52
|
LL | union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b {
| ^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:323:68
|
LL | union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug {
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:329:68
|
LL | union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b {
| ^^^^^^^ ^^^^^
help: remove these bounds
|
LL | union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:335:37
|
LL | union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> {
| ^^^^ ^^^^
help: remove these bounds
|
LL | union BeeOutlivesAyTeeBee<'a, 'b, T> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:340:39
|
LL | union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> {
| ^^^^ ^^^^^^^^^
help: remove these bounds
|
LL | union BeeOutlivesAyTeeAyBee<'a, 'b, T> {
| -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:345:54
|
LL | union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> {
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:350:67
|
LL | union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b {
| ^^^^^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:355:57
|
LL | union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> {
| ^^^^ ^^^^^ ^^^^^
help: remove these bounds
|
LL | union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> {
| -- -- --
error: outlives requirements can be inferred
--> $DIR/edition-lint-infer-outlives-multispan.rs:361:76
|
LL | union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a {
| ^^^^^ ^^^^^ ^^^^^^
help: remove these bounds
|
LL | union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, {
| -- ----
error: aborting due to 68 previous errors

View file

@ -3,9 +3,6 @@
#![allow(unused)]
#![deny(explicit_outlives_requirements)]
use std::fmt::{Debug, Display};
// Programmatically generated examples!
//
// Exercise outlives bounds for each of the following parameter/position
@ -17,177 +14,773 @@ use std::fmt::{Debug, Display};
// • two parameters (T and U), one bound inline, one with a where clause
// • two parameters (T and U), both with where clauses
//
// —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1
// trait bounds distributed among said parameters (subject to no where clause
// being empty and the struct having at least one lifetime).
// —and for every permutation of 1 or 2 lifetimes to outlive and 0 or 1 trait
// bounds distributed among said parameters (subject to no where clause being
// empty and the struct having at least one lifetime).
//
// —and for each of tuple structs, enums and unions.
mod structs {
use std::fmt::Debug;
struct TeeOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
struct TeeOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeOutlivesAyIsDebug<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeIsDebugOutlivesAy<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooOutlivesAyIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeOutlivesAyYooIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
struct TeeYooOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
struct TeeYooWhereOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
struct BeeOutlivesAy<'a, 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
struct BeeWhereOutlivesAy<'a, 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
struct BeeOutlivesAyTee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeOutlivesAyTeeDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
}
struct TeeOutlivesAyIsDebug<'a, T: Debug> {
mod tuple_structs {
use std::fmt::Debug;
struct TeeOutlivesAy<'a, T>(&'a T);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyIsDebug<'a, T: Debug>(&'a T);
//~^ ERROR outlives requirements can be inferred
struct TeeIsDebugOutlivesAy<'a, T: Debug>(&'a T);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBee<'a, 'b, T>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAy<'a, T>(&'a T) ;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyIsDebug<'a, T>(&'a T) where T: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereIsDebugOutlivesAy<'a, T>(&'a T) where T: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyBee<'a, 'b, T>(&'a &'b T) ;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T>(&'a &'b T) where T: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAy<'a, T, U>(T, &'a U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyIsDebug<'a, T, U: Debug>(T, &'a U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug>(T, &'a U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooIsDebug<'a, T, U: Debug>(&'a T, U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug>(&'a &'b T, U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAy<'a, T, U>(T, &'a U) ;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyIsDebug<'a, T, U>(T, &'a U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereIsDebugOutlivesAy<'a, T, U>(T, &'a U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) ;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U>(T, &'a &'b U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAy<'a, 'b>(&'a &'b ());
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAy<'a, 'b>(&'a &'b ()) ;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTee<'a, 'b, T>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTee<'a, 'b, T>(&'a &'b T) ;
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T>(&'a &'b T) ;
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T>(&'a &'b T) ;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTeeDebug<'a, 'b, T: Debug>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T>(&'a &'b T) where T: Debug;
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeIsDebugOutlivesAy<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
mod enums {
use std::fmt::Debug;
enum TeeOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
}
enum TeeOutlivesAyIsDebug<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
V(&'a T),
}
enum TeeIsDebugOutlivesAy<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W,
}
enum TeeOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum TeeWhereOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W,
}
enum TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a T),
W,
}
enum TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
}
enum TeeWhereOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W,
}
enum TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum TeeYooOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a U),
}
enum TeeYooOutlivesAyIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a U },
W,
}
enum TeeYooIsDebugOutlivesAy<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V(T, &'a U),
W,
}
enum TeeOutlivesAyYooIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W(U),
}
enum TeeYooOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V(T, &'a &'b U),
W,
}
enum TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T, U),
W,
}
enum TeeYooWhereOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a U),
}
enum TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a U },
W,
}
enum TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V(T, &'a U),
W,
}
enum TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W(U),
}
enum TeeYooWhereOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V(T, &'a &'b U),
W,
}
enum TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a &'b U),
}
enum TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T, yoo: U },
W,
}
enum TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a T, U),
W,
}
enum TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W(U),
}
enum BeeOutlivesAy<'a, 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b () },
}
enum BeeWhereOutlivesAy<'a, 'b> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b ()),
}
enum BeeOutlivesAyTee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W,
}
enum BeeWhereOutlivesAyTee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum BeeOutlivesAyTeeDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
}
struct TeeOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
mod unions {
use std::fmt::Debug;
struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeOutlivesAyIsDebug<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
union TeeIsDebugOutlivesAy<'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
union TeeOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
union TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeWhereOutlivesAy<'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeYooOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeYooOutlivesAyIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeWhereOutlivesAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeOutlivesAyYooIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
union TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooOutlivesAyIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooIsDebugOutlivesAy<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
union TeeOutlivesAyYooIsDebug<'a, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: *const U
}
struct TeeYooWhereOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeYooOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
union TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: *const U
}
struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooWhereOutlivesAy<'a, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
union TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: *const U
}
struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
union TeeYooWhereOutlivesAyBee<'a, 'b, T, U> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
union TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
union TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
union TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: *const U
}
union TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: *const U
}
union TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: *const U
}
union BeeOutlivesAy<'a, 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
union BeeWhereOutlivesAy<'a, 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
union BeeOutlivesAyTee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeOutlivesAyTeeDebug<'a, 'b, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
}

View file

@ -3,9 +3,6 @@
#![allow(unused)]
#![deny(explicit_outlives_requirements)]
use std::fmt::{Debug, Display};
// Programmatically generated examples!
//
// Exercise outlives bounds for each of the following parameter/position
@ -17,177 +14,773 @@ use std::fmt::{Debug, Display};
// • two parameters (T and U), one bound inline, one with a where clause
// • two parameters (T and U), both with where clauses
//
// —and for every permutation of 0, 1, or 2 lifetimes to outlive and 0 or 1
// trait bounds distributed among said parameters (subject to no where clause
// being empty and the struct having at least one lifetime).
// —and for every permutation of 1 or 2 lifetimes to outlive and 0 or 1 trait
// bounds distributed among said parameters (subject to no where clause being
// empty and the struct having at least one lifetime).
//
// —and for each of tuple structs, enums and unions.
mod structs {
use std::fmt::Debug;
struct TeeOutlivesAy<'a, T: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
struct TeeOutlivesAy<'a, T: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAy<'a, T> where T: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooOutlivesAy<'a, T, U: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
struct TeeYooWhereOutlivesAy<'a, T, U> where U: 'a {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
struct BeeOutlivesAy<'a, 'b: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
struct BeeWhereOutlivesAy<'a, 'b> where 'b: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
struct BeeOutlivesAyTee<'a, 'b: 'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
}
struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug> {
mod tuple_structs {
use std::fmt::Debug;
struct TeeOutlivesAy<'a, T: 'a>(&'a T);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug>(&'a T);
//~^ ERROR outlives requirements can be inferred
struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a>(&'a T);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAy<'a, T>(&'a T) where T: 'a;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyIsDebug<'a, T>(&'a T) where T: 'a + Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereIsDebugOutlivesAy<'a, T>(&'a T) where T: Debug + 'a;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: 'a + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T>(&'a &'b T) where T: 'a + 'b + Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: Debug + 'a + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAy<'a, T, U: 'a>(T, &'a U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug>(T, &'a U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a>(T, &'a U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug>(&'a T, U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b>(T, &'a &'b U);
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug>(&'a &'b T, U);
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAy<'a, T, U>(T, &'a U) where U: 'a;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyIsDebug<'a, T, U>(T, &'a U) where U: 'a + Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereIsDebugOutlivesAy<'a, T, U>(T, &'a U) where U: Debug + 'a;
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U>(&'a T, U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + 'b + Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug + 'a + 'b;
//~^ ERROR outlives requirements can be inferred
struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U>(&'a &'b T, U) where U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where T: 'a, U: Debug;
//~^ ERROR outlives requirements can be inferred
struct TeeWhereAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where T: 'a + 'b, U: Debug;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAy<'a, 'b: 'a>(&'a &'b ());
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAy<'a, 'b>(&'a &'b ()) where 'b: 'a;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTee<'a, 'b: 'a, T>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTee<'a, 'b, T>(&'a &'b T) where 'b: 'a;
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'b;
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + 'b;
//~^ ERROR outlives requirements can be inferred
struct BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug>(&'a &'b T);
//~^ ERROR outlives requirements can be inferred
struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: Debug;
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
mod enums {
use std::fmt::Debug;
enum TeeOutlivesAy<'a, T: 'a> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
}
enum TeeOutlivesAyIsDebug<'a, T: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
V(&'a T),
}
enum TeeIsDebugOutlivesAy<'a, T: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W,
}
enum TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum TeeWhereOutlivesAy<'a, T> where T: 'a {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W,
}
enum TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a T),
W,
}
enum TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
}
enum TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W,
}
enum TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum TeeYooOutlivesAy<'a, T, U: 'a> {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a U),
}
enum TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a U },
W,
}
enum TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
V(T, &'a U),
W,
}
enum TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W(U),
}
enum TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
V(T, &'a &'b U),
W,
}
enum TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T, U),
W,
}
enum TeeYooWhereOutlivesAy<'a, T, U> where U: 'a {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a U),
}
enum TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a U },
W,
}
enum TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
V(T, &'a U),
W,
}
enum TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a T },
W(U),
}
enum TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
V { tee: T, yoo: &'a &'b U },
W,
}
enum TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
V(T, &'a &'b U),
W,
}
enum TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
V { tee: T },
W(&'a &'b U),
}
enum TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T, yoo: U },
W,
}
enum TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a T, U),
W,
}
enum TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W(U),
}
enum BeeOutlivesAy<'a, 'b: 'a> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b () },
}
enum BeeWhereOutlivesAy<'a, 'b> where 'b: 'a {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b ()),
}
enum BeeOutlivesAyTee<'a, 'b: 'a, T> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
W,
}
enum BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
enum BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
W,
}
enum BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
V { tee: &'a &'b T },
}
enum BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug {
//~^ ERROR outlives requirements can be inferred
V(&'a &'b T),
}
}
struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
mod unions {
use std::fmt::Debug;
struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeOutlivesAy<'a, T: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeOutlivesAyIsDebug<'a, T: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAy<'a, T> where T: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
union TeeIsDebugOutlivesAy<'a, T: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
union TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
union TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeWhereOutlivesAy<'a, T> where T: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
union TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeYooOutlivesAy<'a, T, U: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a T
}
struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
union TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T
}
struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooOutlivesAy<'a, T, U: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
union TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: *const U
}
struct TeeYooWhereOutlivesAy<'a, T, U> where U: 'a {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a U
}
union TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
union TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: *const U
}
struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooWhereOutlivesAy<'a, T, U> where U: 'a {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: T,
yoo: &'a &'b U
}
union TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a U
}
struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
}
union TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: *const U
}
struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: U
}
union TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: U
union TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
union TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: *const T,
yoo: &'a &'b U
}
union TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: *const U
}
union TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a T,
yoo: *const U
}
union TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
yoo: *const U
}
union BeeOutlivesAy<'a, 'b: 'a> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
union BeeWhereOutlivesAy<'a, 'b> where 'b: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b (),
}
union BeeOutlivesAyTee<'a, 'b: 'a, T> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
union BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug {
//~^ ERROR outlives requirements can be inferred
tee: &'a &'b T,
}
}

File diff suppressed because it is too large Load diff