]> git.lizzy.rs Git - rust.git/blob - src/test/ui/extern/external-doc-error.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / extern / external-doc-error.rs
1 // normalize-stderr-test: "not-a-file.md:.*\(" -> "not-a-file.md: $$FILE_NOT_FOUND_MSG ("
2
3 #![feature(external_doc)]
4
5 #[doc(include = "not-a-file.md")]
6 pub struct SomeStruct; //~^ ERROR couldn't read
7                        //~| HELP external doc paths are relative to the crate root
8
9 #[doc(include = "auxiliary/invalid-utf8.txt")]
10 pub struct InvalidUtf8; //~^ ERROR wasn't a utf-8 file
11
12 #[doc(include)]
13 pub struct MissingPath; //~^ ERROR expected path
14                         //~| HELP provide a file path with `=`
15                         //~| SUGGESTION include = "<path>"
16
17 #[doc(include("../README.md"))]
18 pub struct InvalidPathSyntax; //~^ ERROR expected path
19                               //~| HELP provide a file path with `=`
20                               //~| SUGGESTION include = "../README.md"
21
22 #[doc(include = 123)]
23 pub struct InvalidPathType; //~^ ERROR expected path
24                             //~| HELP provide a file path with `=`
25                             //~| SUGGESTION include = "<path>"
26
27 #[doc(include(123))]
28 pub struct InvalidPathSyntaxAndType; //~^ ERROR expected path
29                                      //~| HELP provide a file path with `=`
30                                      //~| SUGGESTION include = "<path>"
31
32 fn main() {}