rust-在“std::thread::JoinHandle”中找不到方法或关联的常量“join”`
发布时间:2022-06-28 09:38:50 297
相关标签: # html# rust
pub type RunnableJoinHandle = Box;
pub trait RunnableJoinHandleTrait {
fn join(self) -> Result<(), ()>;
}
impl RunnableJoinHandleTrait for std::thread::JoinHandle<()> {
fn join(self) -> Result<(), ()> {
>::join(self)
}
}
错误:
error[E0576]: cannot find method or associated constant `join` in `std::thread::JoinHandle`
--> src/lib.rs:7:48
|
7 | >::join(self)
| ^^^^ not found in `std::thread::JoinHandle`
但很明显,这种方法是存在的https://doc.rust-lang.org/stable/std/thread/struct.JoinHandle.html
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报