gpt4 book ai didi

Rust:类型必须根植

转载 作者:行者123 更新时间:2023-11-29 08:36:22 25 4
gpt4 key购买 nike

<分区>

这个 Rust 编译器错误是什么意思?我遇到了:

pub fn some_func(foo: Something<Else>) -> Another {
Another { foo: foo }
}

产生错误:

error: Type must be rooted
--> script/foo.rs:12:32
|
12 | pub fn some_func(foo: Something<Else>) -> Another {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[deny(unrooted_must_root)]` on by default

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com