diff options
| author | bors <bors@rust-lang.org> | 2022-09-19 14:06:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-19 14:06:23 +0000 |
| commit | a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52 (patch) | |
| tree | 2de5a3c571f7f5b54f4922b644f72f33786eb0e0 /src/test | |
| parent | b31188e88b245f48b364c6cb186b821bd472bd8a (diff) | |
| parent | 7358a9b03e5d22ea4d74d89cb00d3985fc89c773 (diff) | |
| download | rust-1.64.0.tar.gz rust-1.64.0.zip | |
Auto merge of #102018 - pietroalbini:pa-1.64.0, r=pietroalbini 1.64.0
[stable] Prepare 1.64.0 release This PR prepares the 1.64.0 stable release builds. In addition to bumping the channel and including the latest release notes changes, this PR also backports the following PRs: * #100852 * #101366 * #101468 * #101922 This PR also reverts the following PRs, as decided in https://github.com/rust-lang/rust/issues/101899#issuecomment-1250996783: * https://github.com/rust-lang/rust/pull/95295 * https://github.com/rust-lang/rust/pull/99136 (followup to the previous PR) r? `@ghost` cc `@rust-lang/release`
Diffstat (limited to 'src/test')
3 files changed, 43 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr b/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr new file mode 100644 index 00000000000..fd2e454e7e4 --- /dev/null +++ b/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr @@ -0,0 +1,9 @@ +error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied + --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 + | +LL | fn ice() -> impl AsRef<Fn(&())> { + | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr new file mode 100644 index 00000000000..c01c33a8931 --- /dev/null +++ b/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr @@ -0,0 +1,22 @@ +error[E0782]: trait objects must include the `dyn` keyword + --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24 + | +LL | fn ice() -> impl AsRef<Fn(&())> { + | ^^^^^^^ + | +help: add `dyn` keyword before this trait + | +LL - fn ice() -> impl AsRef<Fn(&())> { +LL + fn ice() -> impl AsRef<dyn Fn(&())> { + | + +error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied + --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 + | +LL | fn ice() -> impl AsRef<Fn(&())> { + | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()` + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0277, E0782. +For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs new file mode 100644 index 00000000000..856dc7a3f5a --- /dev/null +++ b/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs @@ -0,0 +1,12 @@ +// revisions: edition2015 edition2021 +//[edition2021]edition:2021 + +#![allow(warnings)] + +fn ice() -> impl AsRef<Fn(&())> { + //~^ ERROR: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied [E0277] + //[edition2021]~| ERROR: trait objects must include the `dyn` keyword [E0782] + todo!() +} + +fn main() {} |
