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

Error while building #10

Open
Ella-Alinda opened this issue May 13, 2024 · 1 comment
Open

Error while building #10

Ella-Alinda opened this issue May 13, 2024 · 1 comment

Comments

@Ella-Alinda
Copy link

System: Arch Linux

rustc: rustc 1.77.2 (25ef9e3d8 2024-04-09) (Arch Linux rust 1:1.77.2-1)

cargo: cargo 1.77.2

error[E0310]: the parameter type `T` may not live long enough
    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustc-serialize-0.3.24/src/serialize.rs:1155:5
     |
1155 |     fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |     |
     |     the parameter type `T` must be valid for the static lifetime...
     |     ...so that the type `T` will meet its required lifetime bounds...
     |
note: ...that is required by this bound
    --> /usr/src/debug/rust/rustc-1.77.2-src/library/alloc/src/borrow.rs:180:30
help: consider adding an explicit lifetime bound
     |
1151 | impl<'a, T: ?Sized + 'static> Decodable for Cow<'a, T>
     |                    +++++++++

For more information about this error, try `rustc --explain E0310`.
error: could not compile `rustc-serialize` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@niuhuan
Copy link
Owner

niuhuan commented May 14, 2024

请您安装rust最新版,执行cargo update,之后再编译。(亲测update之前无法编译,update之后成功编译)

同时您需要注意以下几点:

  1. bilibili仓库使用中文即可
  2. 您如果想改进代码请同时clone依赖仓库 niuhuan/bilirust , 并改依赖path="",(为了复用我拆成了两个仓库)
  3. 也许rust升级了几个版本,有一些代码并不兼容旧版本。这是因为rust的迭代是非常快的。
  4. 尽管这段代码之前可以用于下载各种番剧,但是已经无法登录成功了
  5. 欢迎您改进它,如果请您将代码PR给我。

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

2 participants