gpt4 book ai didi

compiler-errors - 无法构建插件示例

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

我正在尝试构建 the plugin example从书中,但它不会工作:

rustc failed to resolve: could not find `quote` in `ext`

我该怎么办?该示例甚至没有任何构建说明。这是故意的吗?

最佳答案

code in the unstable bookcode in current source of rust是不同的。

在代码中,它说:

This code also appears in src/doc/unstable-book/src/language-features/plugin.md.

Please keep the two copies in sync! FIXME: have rustdoc read this file

但似乎直到现在还没有修复。

你的错误发生在不稳定书中的use syntax::ext::quote::rt::Span;,目前应该是use syntax_pos::Span;

由于这本书是针对 rust 中的不稳定特性,并且根据 top page of the book ,

Because this documentation relates to unstable features, we make no guarantees that what is contained here is accurate or up to date. It's developed on a best-effort basis. Each page will have a link to its tracking issue with the latest developments; you might want to check those as well.

因此,本书的其他代码也可能存在类似的问题。

关于compiler-errors - 无法构建插件示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54585780/

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