小编Ken*_*ete的帖子

为什么编译bitflags 1.0会产生"expect ident,found#"错误?

当我尝试使用macOS Sierra 10.12.6中的bitflags v1.0.1在Rust中构建项目时,代码失败并出现以下错误:

Compiling bitflags v1.0.1
error: expected ident, found #
   --> /Users/kenneth.marete/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-1.0.1/src/lib.rs:423:29
    |
423 |                               #[allow(deprecated)]
    |                               ^
    | 
   ::: /Users/kenneth.marete/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-1.0.1/src/example_generated.rs
    |
4   | / bitflags! {
5   | |     /// This is the same `Flags` struct defined in the [crate level example](../index.html#example).
6   | |     /// Note that this struct is just for documentation purposes only, it must not be used outside
7   | |     /// this crate.
...   |
13  | |     }
14  | | …
Run Code Online (Sandbox Code Playgroud)

bitflags rust

2
推荐指数
1
解决办法
227
查看次数

标签 统计

bitflags ×1

rust ×1