mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
52 lines
1.9 KiB
Plaintext
52 lines
1.9 KiB
Plaintext
error: item does not constrain `StateWidget::{opaque#0}`, but has it in its signature
|
|
--> $DIR/failed-to-normalize-ice-99945.rs:25:8
|
|
|
|
|
LL | fn make_state(&self) -> Self::State {}
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: consider moving the opaque type's declaration and defining uses into a separate module
|
|
note: this opaque type is in the signature
|
|
--> $DIR/failed-to-normalize-ice-99945.rs:20:24
|
|
|
|
|
LL | type StateWidget<'a> = impl Widget<&'a ()>;
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: item does not constrain `StateWidget::{opaque#0}`, but has it in its signature
|
|
--> $DIR/failed-to-normalize-ice-99945.rs:29:4
|
|
|
|
|
LL | fn new_stateful_widget<F: for<'a> Fn(&'a ()) -> StateWidget<'a>>(build: F) -> impl Widget<()> {
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: consider moving the opaque type's declaration and defining uses into a separate module
|
|
note: this opaque type is in the signature
|
|
--> $DIR/failed-to-normalize-ice-99945.rs:20:24
|
|
|
|
|
LL | type StateWidget<'a> = impl Widget<&'a ()>;
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/failed-to-normalize-ice-99945.rs:36:29
|
|
|
|
|
LL | type StateWidget<'a> = impl Widget<&'a ()>;
|
|
| ------------------- the expected opaque type
|
|
...
|
|
LL | new_stateful_widget(|_| ()).make_state();
|
|
| ^^ expected opaque type, found `()`
|
|
|
|
|
= note: expected opaque type `StateWidget<'_>`
|
|
found unit type `()`
|
|
|
|
error[E0792]: expected generic lifetime parameter, found `'a`
|
|
--> $DIR/failed-to-normalize-ice-99945.rs:31:5
|
|
|
|
|
LL | type StateWidget<'a> = impl Widget<&'a ()>;
|
|
| -- this generic parameter must be used with a generic lifetime parameter
|
|
...
|
|
LL | StatefulWidget(build)
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
Some errors have detailed explanations: E0308, E0792.
|
|
For more information about an error, try `rustc --explain E0308`.
|