1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Rust】cargo doc でエラーが起きた話

Posted at

Cargo doc したらエラー起きた

$ cargo doc
 Documenting pin-utils v0.1.0
 Documenting serde v1.0.123
 Documenting rocket_codegen v0.4.7
error[E0658]: linking to associated items of raw pointers is experimental
   |
   = note: see issue #80896 <https://github.com/rust-lang/rust/issues/80896> for more information
   = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable
   = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not document `pin-utils`

Caused by:
  process didnt exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name pin_utils /Users/macuser/.cargo/registry/src/github.com-1ecc6299db9ec823/pin-utils-0.1.0/src/lib.rs --cap-lints allow -o /Users/macuser/xxxxxxxxxxx/target/doc --error-format=json --json=diagnostic-rendered-ansi -L dependency=/Users/macuser/line-bot-sdk-rust/target/debug/deps --crate-version 0.1.0` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error[E0658]: linking to associated items of raw pointers is experimental
   |
   = note: see issue #80896 <https://github.com/rust-lang/rust/issues/80896> for more information
   = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable
   = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: build failed

どうやらpin-utilsって依存モジュールの doc 作成でエラってるっぽい。

cargo doc の公式ドキュメントを見てみる。
https://doc.rust-lang.org/cargo/commands/cargo-doc.html

OPTIONS

Documentation Options

--open
Open the docs in a browser after building them. This will use your default browser unless you define another one in the BROWSER environment variable.

--no-deps
Do not build documentation for dependencies.

--document-private-items
Include non-public items in the documentation.

依存モジュール実行しないってオプションあるやん。
なので、こうする。

$ cargo doc --no-deps
Finished dev [unoptimized + debuginfo] target(s) in 0.89s

おっけい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?