pop-os / libcosmic

WIP library for COSMIC applications
https://pop-os.github.io/libcosmic/cosmic/
Mozilla Public License 2.0
427 stars 41 forks source link

Compile Error: restricted type `menu_inner::Direction` in public interface #514

Open andreytkachenko opened 3 months ago

andreytkachenko commented 3 months ago

I have an error building cosmic-comp:

error[E0446]: restricted type `menu_inner::Direction` in public interface
  --> /home/andrey/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/8c6f2c9/src/widget/menu/menu_bar.rs:34:5
   |
34 |     pub(crate) horizontal_direction: Direction,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak restricted type
   |
  ::: /home/andrey/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/8c6f2c9/src/widget/menu/menu_inner.rs:75:1
   |
75 | pub(super) enum Direction {
   | ------------------------- `menu_inner::Direction` declared as restricted

error[E0446]: restricted type `menu_inner::Direction` in public interface
  --> /home/andrey/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/8c6f2c9/src/widget/menu/menu_bar.rs:35:5
   |
35 |     pub(crate) vertical_direction: Direction,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak restricted type
   |
  ::: /home/andrey/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/8c6f2c9/src/widget/menu/menu_inner.rs:75:1
   |
75 | pub(super) enum Direction {
   | ------------------------- `menu_inner::Direction` declared as restricted

error[E0446]: restricted type `MenuState` in public interface
   --> /home/andrey/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/8c6f2c9/src/widget/menu/menu_bar.rs:36:5
    |
36  |     pub(crate) menu_states: Vec<MenuState>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak restricted type
    |
   ::: /home/andrey/.cargo/git/checkouts/libcosmic-b367e32ffc370f4f/8c6f2c9/src/widget/menu/menu_inner.rs:292:1
    |
292 | pub(super) struct MenuState {
    | --------------------------- `MenuState` declared as restricted
wiiznokes commented 3 months ago

Change 1.* to stable in toolchain.toml