From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- ...where-clause-inherent-impl-ampersand-rust2015.fixed | 17 +++++++++++++++++ .../where-clause-inherent-impl-ampersand-rust2015.rs | 17 +++++++++++++++++ ...here-clause-inherent-impl-ampersand-rust2015.stderr | 14 ++++++++++++++ ...where-clause-inherent-impl-ampersand-rust2018.fixed | 18 ++++++++++++++++++ .../where-clause-inherent-impl-ampersand-rust2018.rs | 18 ++++++++++++++++++ ...here-clause-inherent-impl-ampersand-rust2018.stderr | 14 ++++++++++++++ .../where-clause-inherent-impl-ampersand.rs | 18 ------------------ ...here-clause-inherent-impl-ampersand.rust2015.stderr | 15 --------------- ...here-clause-inherent-impl-ampersand.rust2018.stderr | 15 --------------- .../where-clause-trait-impl-region-2015.fixed | 14 ++++++++++++++ .../where-clause-trait-impl-region-2015.rs | 14 ++++++++++++++ .../where-clause-trait-impl-region-2015.stderr | 14 ++++++++++++++ .../where-clause-trait-impl-region-2018.fixed | 15 +++++++++++++++ .../where-clause-trait-impl-region-2018.rs | 15 +++++++++++++++ .../where-clause-trait-impl-region-2018.stderr | 14 ++++++++++++++ .../where-clause-trait-impl-region.rs | 15 --------------- .../where-clause-trait-impl-region.rust2015.stderr | 15 --------------- .../where-clause-trait-impl-region.rust2018.stderr | 15 --------------- 18 files changed, 184 insertions(+), 93 deletions(-) create mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed create mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs create mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr create mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed create mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs create mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr delete mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs delete mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr delete mode 100644 tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr create mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed create mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs create mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr create mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed create mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs create mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr delete mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs delete mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr delete mode 100644 tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr (limited to 'tests/ui/underscore-lifetime') diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed new file mode 100644 index 000000000..5be6ff8e7 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.fixed @@ -0,0 +1,17 @@ +// run-rustfix + +trait WithType {} +trait WithRegion<'a> { } + +#[allow(dead_code)] +struct Foo { + t: T +} + +impl Foo +where + T: for<'a> WithType<&'a u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs new file mode 100644 index 000000000..d7072aa11 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.rs @@ -0,0 +1,17 @@ +// run-rustfix + +trait WithType {} +trait WithRegion<'a> { } + +#[allow(dead_code)] +struct Foo { + t: T +} + +impl Foo +where + T: WithType<&u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr new file mode 100644 index 000000000..3e197dc9a --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2015.stderr @@ -0,0 +1,14 @@ +error[E0637]: `&` without an explicit lifetime name cannot be used here + --> $DIR/where-clause-inherent-impl-ampersand-rust2015.rs:13:17 + | +LL | T: WithType<&u32> + | ^ explicit lifetime name needed here + | +help: consider introducing a higher-ranked lifetime here + | +LL | T: for<'a> WithType<&'a u32> + | +++++++ ++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed new file mode 100644 index 000000000..0f1be5865 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.fixed @@ -0,0 +1,18 @@ +// edition:2018 +// run-rustfix + +trait WithType {} +trait WithRegion<'a> { } + +#[allow(dead_code)] +struct Foo { + t: T +} + +impl Foo +where + T: for<'a> WithType<&'a u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs new file mode 100644 index 000000000..59f7e472e --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.rs @@ -0,0 +1,18 @@ +// edition:2018 +// run-rustfix + +trait WithType {} +trait WithRegion<'a> { } + +#[allow(dead_code)] +struct Foo { + t: T +} + +impl Foo +where + T: WithType<&u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr new file mode 100644 index 000000000..08b4268e5 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand-rust2018.stderr @@ -0,0 +1,14 @@ +error[E0637]: `&` without an explicit lifetime name cannot be used here + --> $DIR/where-clause-inherent-impl-ampersand-rust2018.rs:14:17 + | +LL | T: WithType<&u32> + | ^ explicit lifetime name needed here + | +help: consider introducing a higher-ranked lifetime here + | +LL | T: for<'a> WithType<&'a u32> + | +++++++ ++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs deleted file mode 100644 index 43de30944..000000000 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rs +++ /dev/null @@ -1,18 +0,0 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 - -trait WithType {} -trait WithRegion<'a> { } - -struct Foo { - t: T -} - -impl Foo -where - T: WithType<&u32> -//[rust2015]~^ ERROR `&` without an explicit lifetime name cannot be used here -//[rust2018]~^^ ERROR `&` without an explicit lifetime name cannot be used here -{ } - -fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr deleted file mode 100644 index f4d14b5f8..000000000 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2015.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-inherent-impl-ampersand.rs:13:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - | -help: consider introducing a higher-ranked lifetime here with `for<'a>` - --> $DIR/where-clause-inherent-impl-ampersand.rs:13:8 - | -LL | T: WithType<&u32> - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr b/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr deleted file mode 100644 index f4d14b5f8..000000000 --- a/tests/ui/underscore-lifetime/where-clause-inherent-impl-ampersand.rust2018.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-inherent-impl-ampersand.rs:13:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - | -help: consider introducing a higher-ranked lifetime here with `for<'a>` - --> $DIR/where-clause-inherent-impl-ampersand.rs:13:8 - | -LL | T: WithType<&u32> - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed new file mode 100644 index 000000000..55c747096 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.fixed @@ -0,0 +1,14 @@ +// run-rustfix + +trait WithType {} +trait WithRegion<'a> { } + +trait Foo { } + +impl Foo for Vec +where + T: for<'a> WithType<&'a u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs new file mode 100644 index 000000000..42a35b021 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.rs @@ -0,0 +1,14 @@ +// run-rustfix + +trait WithType {} +trait WithRegion<'a> { } + +trait Foo { } + +impl Foo for Vec +where + T: WithType<&u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr new file mode 100644 index 000000000..8c5bbb631 --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2015.stderr @@ -0,0 +1,14 @@ +error[E0637]: `&` without an explicit lifetime name cannot be used here + --> $DIR/where-clause-trait-impl-region-2015.rs:10:17 + | +LL | T: WithType<&u32> + | ^ explicit lifetime name needed here + | +help: consider introducing a higher-ranked lifetime here + | +LL | T: for<'a> WithType<&'a u32> + | +++++++ ++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed new file mode 100644 index 000000000..09b96fe5e --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.fixed @@ -0,0 +1,15 @@ +// run-rustfix +// edition:2018 + +trait WithType {} +trait WithRegion<'a> { } + +trait Foo { } + +impl Foo for Vec +where + T: for<'a> WithType<&'a u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs new file mode 100644 index 000000000..445f38cbe --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.rs @@ -0,0 +1,15 @@ +// run-rustfix +// edition:2018 + +trait WithType {} +trait WithRegion<'a> { } + +trait Foo { } + +impl Foo for Vec +where + T: WithType<&u32> +//~^ ERROR `&` without an explicit lifetime name cannot be used here +{ } + +fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr new file mode 100644 index 000000000..0268c59fa --- /dev/null +++ b/tests/ui/underscore-lifetime/where-clause-trait-impl-region-2018.stderr @@ -0,0 +1,14 @@ +error[E0637]: `&` without an explicit lifetime name cannot be used here + --> $DIR/where-clause-trait-impl-region-2018.rs:11:17 + | +LL | T: WithType<&u32> + | ^ explicit lifetime name needed here + | +help: consider introducing a higher-ranked lifetime here + | +LL | T: for<'a> WithType<&'a u32> + | +++++++ ++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs b/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs deleted file mode 100644 index 09e5bbd84..000000000 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rs +++ /dev/null @@ -1,15 +0,0 @@ -// revisions: rust2015 rust2018 -//[rust2018] edition:2018 - -trait WithType {} -trait WithRegion<'a> { } - -trait Foo { } - -impl Foo for Vec -where - T: WithType<&u32> -//[rust2015,rust2018]~^ ERROR `&` without an explicit lifetime name cannot be used here -{ } - -fn main() {} diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr deleted file mode 100644 index 63fc1a19b..000000000 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2015.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-trait-impl-region.rs:11:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - | -help: consider introducing a higher-ranked lifetime here with `for<'a>` - --> $DIR/where-clause-trait-impl-region.rs:11:8 - | -LL | T: WithType<&u32> - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. diff --git a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr b/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr deleted file mode 100644 index 63fc1a19b..000000000 --- a/tests/ui/underscore-lifetime/where-clause-trait-impl-region.rust2018.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/where-clause-trait-impl-region.rs:11:17 - | -LL | T: WithType<&u32> - | ^ explicit lifetime name needed here - | -help: consider introducing a higher-ranked lifetime here with `for<'a>` - --> $DIR/where-clause-trait-impl-region.rs:11:8 - | -LL | T: WithType<&u32> - | ^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0637`. -- cgit v1.2.3