Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl Trait in associated types is unstable #118

Open
ctaoist opened this issue Jun 26, 2023 · 3 comments
Open

impl Trait in associated types is unstable #118

ctaoist opened this issue Jun 26, 2023 · 3 comments

Comments

@ctaoist
Copy link

ctaoist commented Jun 26, 2023

编译提示如下错误:

error[E0658]: `impl Trait` in associated types is unstable
   .../ricq-core-0.1.19/src/msg/mod.rs:101:19
    |
101 |   type IntoIter = impl Iterator<Item = RQElem> + 'static;
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
    = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ricq-core` (lib) due to previous error

编译器版本:nightly-x86_64_linux_1.72

@lz1998
Copy link
Owner

lz1998 commented Jul 3, 2023

  1. lib.rsmain.rs 第一行加上 #![feature(impl_trait_in_assoc_type)]
  2. 执行 rustup default nightly 更新到 nightly
  3. 如果还是不行,可以尝试 git 依赖 master 分支的版本

@ctaoist
Copy link
Author

ctaoist commented Jul 4, 2023

  1. 我看你的 ricq-core 的 lib.rs 已经有这一句,在自己包的 main.rs 中添加没有效果
  2. 目前rust的版本: rustc 1.72.0-nightly (839e9a6e1 2023-07-02
  3. 用的就是 master 分支

问题依旧。

@WUST-mengqinyu
Copy link

同样的问题,为什么不发布 ricq 0.1.20?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants