forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#97980 - Dylan-DPC:rollup-l8exe4b, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - rust-lang#96868 (Stabilize explicit_generic_args_with_impl_trait) - rust-lang#97703 (some additional `need_type_info.rs` cleanup) - rust-lang#97812 (Suggest to swap a struct and a trait in trait impls) - rust-lang#97958 (ExitStatus docs fixups) - rust-lang#97967 (Mention `infer::Trace` methods on `infer::At` methods' docs) - rust-lang#97972 (Update #[doc(html_playground_url)] documentation to mention what the request will be) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Showing
51 changed files
with
495 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
...oc/unstable-book/src/language-features/explicit-generic-args-with-impl-trait.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/test/ui/const-generics/impl-trait-with-const-arguments.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...est/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#![feature(explicit_generic_args_with_impl_trait)] | ||
|
||
fn foo<T: ?Sized>(_f: impl AsRef<T>) {} | ||
|
||
fn main() { | ||
|
4 changes: 2 additions & 2 deletions
4
...ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args-for-impl.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/explicit-generic-args.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/feature-gate.rs
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/feature-gate.stderr
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/issue-87718.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/not-enough-args.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/test/ui/impl-trait/issues/universal-issue-48703.stderr
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/test/ui/impl-trait/issues/universal-turbofish-in-method-issue-50950.rs
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/test/ui/impl-trait/issues/universal-turbofish-in-method-issue-50950.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
trait Ambiguous<A> { | ||
fn method() {} | ||
} | ||
|
||
struct One; | ||
struct Two; | ||
struct Struct; | ||
|
||
impl Ambiguous<One> for Struct {} | ||
impl Ambiguous<Two> for Struct {} | ||
|
||
fn main() { | ||
<Struct as Ambiguous<_>>::method(); | ||
//~^ ERROR type annotations needed | ||
//~| ERROR type annotations needed | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/concrete-impl.rs:13:5 | ||
| | ||
LL | <Struct as Ambiguous<_>>::method(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `Ambiguous` | ||
| | ||
help: consider specifying the generic argument | ||
| | ||
LL | <Struct as Ambiguous::<_>>::method(); | ||
| ~~~~~ | ||
|
||
error[E0283]: type annotations needed | ||
--> $DIR/concrete-impl.rs:13:5 | ||
| | ||
LL | <Struct as Ambiguous<_>>::method(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `Ambiguous` | ||
| | ||
note: multiple `impl`s satisfying `Struct: Ambiguous<_>` found | ||
--> $DIR/concrete-impl.rs:9:1 | ||
| | ||
LL | impl Ambiguous<One> for Struct {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
LL | impl Ambiguous<Two> for Struct {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
help: consider specifying the generic argument | ||
| | ||
LL | <Struct as Ambiguous::<_>>::method(); | ||
| ~~~~~ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0282, E0283. | ||
For more information about an error, try `rustc --explain E0282`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Test that we don't ICE when encountering a `Self` in a path. | ||
struct TestErr<T>(T); | ||
|
||
impl<T> TestErr<T> { | ||
fn func_a<U>() {} | ||
|
||
fn func_b() { | ||
Self::func_a(); | ||
//~^ ERROR type annotations needed | ||
} | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/inference/need_type_info/self-ty-in-path.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/self-ty-in-path.rs:8:9 | ||
| | ||
LL | Self::func_a(); | ||
| ^^^^^^^^^^^^ cannot infer type of the type parameter `U` declared on the associated function `func_a` | ||
| | ||
help: consider specifying the generic argument | ||
| | ||
LL | Self::func_a::<U>(); | ||
| +++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
18 changes: 18 additions & 0 deletions
18
src/test/ui/inference/need_type_info/type-alias-indirect.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// An addition to the `type-alias.rs` test, | ||
// see the FIXME in that file for why this test | ||
// exists. | ||
// | ||
// If there is none, feel free to remove this test | ||
// again. | ||
struct Ty<T>(T); | ||
impl<T> Ty<T> { | ||
fn new() {} | ||
} | ||
|
||
type IndirectAlias<T> = Ty<Box<T>>; | ||
fn indirect_alias() { | ||
IndirectAlias::new(); | ||
//~^ ERROR type annotations needed | ||
} | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
src/test/ui/inference/need_type_info/type-alias-indirect.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/type-alias-indirect.rs:14:5 | ||
| | ||
LL | IndirectAlias::new(); | ||
| ^^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the type alias `IndirectAlias` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Test the inference errors in case the relevant path | ||
// uses a type alias. | ||
// | ||
// Regression test for #97698. | ||
struct Ty<T>(T); | ||
impl<T> Ty<T> { | ||
fn new() {} | ||
} | ||
|
||
type DirectAlias<T> = Ty<T>; | ||
fn direct_alias() { | ||
DirectAlias::new() | ||
//~^ ERROR type annotations needed | ||
} | ||
|
||
type IndirectAlias<T> = Ty<Box<T>>; | ||
fn indirect_alias() { | ||
IndirectAlias::new(); | ||
// FIXME: This should also emit an error. | ||
// | ||
// Added it separately as `type-alias-indirect.rs` | ||
// where it does error. | ||
} | ||
|
||
struct TyDefault<T, U = u32>(T, U); | ||
impl<T> TyDefault<T> { | ||
fn new() {} | ||
} | ||
|
||
type DirectButWithDefaultAlias<T> = TyDefault<T>; | ||
fn direct_but_with_default_alias() { | ||
DirectButWithDefaultAlias::new(); | ||
//~^ ERROR type annotations needed | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/type-alias.rs:12:5 | ||
| | ||
LL | DirectAlias::new() | ||
| ^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` | ||
|
||
error[E0282]: type annotations needed | ||
--> $DIR/type-alias.rs:32:5 | ||
| | ||
LL | DirectButWithDefaultAlias::new(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
22 changes: 22 additions & 0 deletions
22
src/test/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// edition:2021 | ||
|
||
pub trait Trait<'a, T> {} | ||
|
||
pub struct Struct<T>; | ||
pub enum Enum<T> {} | ||
|
||
pub union Union<T> { | ||
f1: usize, | ||
} | ||
|
||
impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
//~^ ERROR expected trait, found struct `Struct` | ||
//~| ERROR trait objects must include the `dyn` keyword | ||
|
||
impl<'a, T> Enum<T> for Trait<'a, T> {} | ||
//~^ ERROR expected trait, found enum `Enum` | ||
|
||
impl<'a, T> Union<T> for Trait<'a, T> {} | ||
//~^ ERROR expected trait, found union `Union` | ||
|
||
fn main() {} |
49 changes: 49 additions & 0 deletions
49
src/test/ui/suggestions/suggest-swapping-self-ty-and-trait-edition-2021.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
error[E0404]: expected trait, found struct `Struct` | ||
--> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:12:13 | ||
| | ||
LL | impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
| ^^^^^^^^^ not a trait | ||
| | ||
help: `impl` items mention the trait being implemented first and the type it is being implemented for second | ||
| | ||
LL | impl<'a, T> Trait<'a, T> for Struct<T> {} | ||
| ~~~~~~~~~~~~ ~~~~~~~~~ | ||
|
||
error[E0404]: expected trait, found enum `Enum` | ||
--> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:16:13 | ||
| | ||
LL | impl<'a, T> Enum<T> for Trait<'a, T> {} | ||
| ^^^^^^^ not a trait | ||
| | ||
help: `impl` items mention the trait being implemented first and the type it is being implemented for second | ||
| | ||
LL | impl<'a, T> Trait<'a, T> for Enum<T> {} | ||
| ~~~~~~~~~~~~ ~~~~~~~ | ||
|
||
error[E0404]: expected trait, found union `Union` | ||
--> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:19:13 | ||
| | ||
LL | impl<'a, T> Union<T> for Trait<'a, T> {} | ||
| ^^^^^^^^ not a trait | ||
| | ||
help: `impl` items mention the trait being implemented first and the type it is being implemented for second | ||
| | ||
LL | impl<'a, T> Trait<'a, T> for Union<T> {} | ||
| ~~~~~~~~~~~~ ~~~~~~~~ | ||
|
||
error[E0782]: trait objects must include the `dyn` keyword | ||
--> $DIR/suggest-swapping-self-ty-and-trait-edition-2021.rs:12:27 | ||
| | ||
LL | impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
| ^^^^^^^^^^^^ | ||
| | ||
help: add `dyn` keyword before this trait | ||
| | ||
LL - impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
LL + impl<'a, T> Struct<T> for dyn Trait<'a, T> {} | ||
| | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
Some errors have detailed explanations: E0404, E0782. | ||
For more information about an error, try `rustc --explain E0404`. |
21 changes: 21 additions & 0 deletions
21
src/test/ui/suggestions/suggest-swapping-self-ty-and-trait.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
pub trait Trait<'a, T> {} | ||
|
||
pub struct Struct<T>; | ||
pub enum Enum<T> {} | ||
|
||
pub union Union<T> { | ||
f1: usize, | ||
} | ||
|
||
impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
//~^ ERROR expected trait, found struct `Struct` | ||
//~| WARNING trait objects without an explicit `dyn` are deprecated | ||
//~| WARNING this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! | ||
|
||
impl<'a, T> Enum<T> for Trait<'a, T> {} | ||
//~^ ERROR expected trait, found enum `Enum` | ||
|
||
impl<'a, T> Union<T> for Trait<'a, T> {} | ||
//~^ ERROR expected trait, found union `Union` | ||
|
||
fn main() {} |
51 changes: 51 additions & 0 deletions
51
src/test/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
error[E0404]: expected trait, found struct `Struct` | ||
--> $DIR/suggest-swapping-self-ty-and-trait.rs:10:13 | ||
| | ||
LL | impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
| ^^^^^^^^^ not a trait | ||
| | ||
help: `impl` items mention the trait being implemented first and the type it is being implemented for second | ||
| | ||
LL | impl<'a, T> Trait<'a, T> for Struct<T> {} | ||
| ~~~~~~~~~~~~ ~~~~~~~~~ | ||
|
||
error[E0404]: expected trait, found enum `Enum` | ||
--> $DIR/suggest-swapping-self-ty-and-trait.rs:15:13 | ||
| | ||
LL | impl<'a, T> Enum<T> for Trait<'a, T> {} | ||
| ^^^^^^^ not a trait | ||
| | ||
help: `impl` items mention the trait being implemented first and the type it is being implemented for second | ||
| | ||
LL | impl<'a, T> Trait<'a, T> for Enum<T> {} | ||
| ~~~~~~~~~~~~ ~~~~~~~ | ||
|
||
error[E0404]: expected trait, found union `Union` | ||
--> $DIR/suggest-swapping-self-ty-and-trait.rs:18:13 | ||
| | ||
LL | impl<'a, T> Union<T> for Trait<'a, T> {} | ||
| ^^^^^^^^ not a trait | ||
| | ||
help: `impl` items mention the trait being implemented first and the type it is being implemented for second | ||
| | ||
LL | impl<'a, T> Trait<'a, T> for Union<T> {} | ||
| ~~~~~~~~~~~~ ~~~~~~~~ | ||
|
||
warning: trait objects without an explicit `dyn` are deprecated | ||
--> $DIR/suggest-swapping-self-ty-and-trait.rs:10:27 | ||
| | ||
LL | impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(bare_trait_objects)]` on by default | ||
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! | ||
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> | ||
help: use `dyn` | ||
| | ||
LL - impl<'a, T> Struct<T> for Trait<'a, T> {} | ||
LL + impl<'a, T> Struct<T> for dyn Trait<'a, T> {} | ||
| | ||
|
||
error: aborting due to 3 previous errors; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0404`. |