rust/tests/ui/delegation/unsupported.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
4.0 KiB
Plaintext
Raw Normal View History

2024-10-30 13:03:44 -05:00
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}`
--> $DIR/unsupported.rs:26:25
2023-11-26 06:57:31 -06:00
|
LL | reuse to_reuse::opaque_ret;
| ^^^^^^^^^^
2023-11-26 06:57:31 -06:00
|
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:26:25
2023-11-26 06:57:31 -06:00
|
LL | reuse to_reuse::opaque_ret;
| ^^^^^^^^^^
2024-10-30 13:03:44 -05:00
= note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>::{synthetic#0}`, completing the cycle
note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:25:5: 25:24>` is well-formed
--> $DIR/unsupported.rs:25:5
2023-11-26 06:57:31 -06:00
|
LL | impl ToReuse for u8 {
| ^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
2023-11-26 06:57:31 -06:00
2024-05-19 21:24:23 -05:00
warning: this function depends on never type fallback being `()`
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:13:9
2024-05-19 21:24:23 -05:00
|
LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: opaque::Trait` will fail
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:13:32
|
LL | pub fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^
2024-08-21 19:55:09 -05:00
= note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default
warning: this function depends on never type fallback being `()`
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:19:9
2024-08-21 19:55:09 -05:00
|
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #123748 <https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: opaque::Trait` will fail
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:19:28
2024-08-21 19:55:09 -05:00
|
LL | fn opaque_ret() -> impl Trait { unimplemented!() }
| ^^^^^^^^^^
2024-05-19 21:24:23 -05:00
2024-10-30 13:03:44 -05:00
error[E0391]: cycle detected when computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}`
--> $DIR/unsupported.rs:29:24
2023-11-26 06:57:31 -06:00
|
LL | reuse ToReuse::opaque_ret;
| ^^^^^^^^^^
|
note: ...which requires comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process...
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:29:24
|
LL | reuse ToReuse::opaque_ret;
| ^^^^^^^^^^
2024-10-30 13:03:44 -05:00
= note: ...which again requires computing type of `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>::{synthetic#0}`, completing the cycle
note: cycle used when checking that `opaque::<impl at $DIR/unsupported.rs:28:5: 28:25>` is well-formed
--> $DIR/unsupported.rs:28:5
|
LL | impl ToReuse for u16 {
| ^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
2023-11-26 06:57:31 -06:00
error: recursive delegation is not supported yet
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:42:22
2023-11-26 06:57:31 -06:00
|
LL | pub reuse to_reuse2::foo;
| --- callee defined here
...
LL | reuse to_reuse1::foo;
| ^^^
error[E0283]: type annotations needed
2024-10-30 13:03:44 -05:00
--> $DIR/unsupported.rs:52:18
|
LL | reuse Trait::foo;
| ^^^ cannot infer type
|
= note: cannot satisfy `_: effects::Trait`
error: aborting due to 4 previous errors; 2 warnings emitted
2023-11-26 06:57:31 -06:00
Some errors have detailed explanations: E0283, E0391.
For more information about an error, try `rustc --explain E0283`.