rust-lang / rust-lang/rust

minor docs: mention `#![doc = include_str!("../README.md")]`

Open
#148,592 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location (URL)

https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html

Summary

https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html reads: "Cargo currently does not understand standalone Markdown files"

Suggest to mention that in src/lib.rs we can have (for example) #![doc = include_str!("../README.md")]. This may be mentioned elsewhere, but I believe it's worth mentioning here, too.

I'm willing to provide a pull request. Does that sound OK?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rustdoc page at https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html and locate its source in the repository. Add a brief mention that src/lib.rs can use the shown doc = include_str!("../README.md") form, and verify that the page accurately explains this workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.