ActivityWatch / ActivityWatch/aw-watcher-window-wayland

error[E0310]: the parameter type `T` may not live long enough

未關閉
#38 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
100
分支
21
PR 合併指標
30 天內沒有已合併 PR

描述

i'm using hyprland in arch. but i'm getting this error.

```
error[E0310]: the parameter type `T` may not live long enough
--> /home/ingenarel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustc-serialize-0.3.24/src/serialize.rs:1155:5
|
1155 | fn decode(d: &mut D) -> Result, 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.79.0-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...
==> ERROR: A failure occurred in build().
Aborting...
error: failed to build 'aw-watcher-window-wayland-git-r33.6108ad3-1':
error: packages failed to build: aw-watcher-window-wayland-git-r33.6108ad3-1
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Reproduce the Arch build failure and read rustc-serialize-0.3.24/src/serialize.rs around lines 1151-1155, along with the output of `rustc --explain E0310`. Verify the aw-watcher-window-wayland-git package builds successfully without the E0310 error; the payload names no repository files or tests.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust
領域
build-system
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。