diff options
| author | kennytm <kennytm@gmail.com> | 2018-02-06 02:13:45 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-06 02:13:45 +0800 |
| commit | cde119db8e27da1b8e8be376449e71e62cc80e11 (patch) | |
| tree | 75fbe3e14e6188e6741a1e910534457392f79039 /src/test | |
| parent | eb5a4617a5ef4cb8840ae40a31cd56f9ed243ee5 (diff) | |
| parent | 5a350c137196f0a192b632f0380a8e3e5ab71fb3 (diff) | |
| download | rust-cde119db8e27da1b8e8be376449e71e62cc80e11.tar.gz rust-cde119db8e27da1b8e8be376449e71e62cc80e11.zip | |
Rollup merge of #47496 - QuietMisdreavus:rls-doc-include, r=estebank
add documentation from doc(include) to analysis data cc #44732 Currently save-analysis only loads docs from plain doc comments and doc attributes. Since `#[doc(include="filename.md")]` doesn't create a plain doc attribute when it loads the file, we need to be sure to pick up this info for the analysis data.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-make/save-analysis/extra-docs.md | 1 | ||||
| -rw-r--r-- | src/test/run-make/save-analysis/foo.rs | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/test/run-make/save-analysis/extra-docs.md b/src/test/run-make/save-analysis/extra-docs.md new file mode 100644 index 00000000000..0605ca517ff --- /dev/null +++ b/src/test/run-make/save-analysis/extra-docs.md @@ -0,0 +1 @@ +Extra docs for this struct. diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs index 834a7554a55..5b4e4802957 100644 --- a/src/test/run-make/save-analysis/foo.rs +++ b/src/test/run-make/save-analysis/foo.rs @@ -12,6 +12,7 @@ #![feature(box_syntax)] #![feature(rustc_private)] #![feature(associated_type_defaults)] +#![feature(external_doc)] extern crate graphviz; // A simple rust project @@ -461,3 +462,6 @@ impl Iterator for SilenceGenerator { trait Foo { type Bar = FrameBuffer; } + +#[doc(include="extra-docs.md")] +struct StructWithDocs; |
