Add slight variation to feature-gate ergonomic clones test

This commit is contained in:
Santiago Pastorino 2025-03-06 22:36:07 -03:00
parent d7104dc3f5
commit d2bde63b7a
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF
2 changed files with 17 additions and 4 deletions

View File

@ -9,6 +9,9 @@ fn ergonomic_clone(x: i32) -> i32 {
#[derive(Clone)]
struct Foo;
fn foo<T: UseCloned>() {}
//~^ ERROR use of unstable library feature `ergonomic_clones` [E0658]
impl UseCloned for Foo {}
//~^ ERROR use of unstable library feature `ergonomic_clones` [E0658]

View File

@ -9,7 +9,7 @@ LL | x.use
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: ergonomic clones are experimental
--> $DIR/feature-gate-ergonomic-clones.rs:18:14
--> $DIR/feature-gate-ergonomic-clones.rs:21:14
|
LL | let f2 = use || {
| ^^^
@ -19,7 +19,7 @@ LL | let f2 = use || {
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: ergonomic clones are experimental
--> $DIR/feature-gate-ergonomic-clones.rs:23:14
--> $DIR/feature-gate-ergonomic-clones.rs:26:14
|
LL | let f3 = use || {
| ^^^
@ -39,7 +39,17 @@ LL | use std::clone::UseCloned;
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: use of unstable library feature `ergonomic_clones`
--> $DIR/feature-gate-ergonomic-clones.rs:12:6
--> $DIR/feature-gate-ergonomic-clones.rs:12:11
|
LL | fn foo<T: UseCloned>() {}
| ^^^^^^^^^
|
= note: see issue #132290 <https://github.com/rust-lang/rust/issues/132290> for more information
= help: add `#![feature(ergonomic_clones)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: use of unstable library feature `ergonomic_clones`
--> $DIR/feature-gate-ergonomic-clones.rs:15:6
|
LL | impl UseCloned for Foo {}
| ^^^^^^^^^
@ -48,6 +58,6 @@ LL | impl UseCloned for Foo {}
= help: add `#![feature(ergonomic_clones)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: aborting due to 5 previous errors
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0658`.