summary refs log tree commit diff
path: root/src/test/ui/extern/external-doc-error.rs
blob: 4e89f7464da49219e786d25b96813cb790977823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// normalize-stderr-test: "not-a-file.md:.*\(" -> "not-a-file.md: $$FILE_NOT_FOUND_MSG ("

#![feature(external_doc)]

#[doc(include = "not-a-file.md")]
pub struct SomeStruct; //~^ ERROR couldn't read

#[doc(include = "auxiliary/invalid-utf8.txt")]
pub struct InvalidUtf8; //~^ ERROR wasn't a utf-8 file

#[doc(include)]
pub struct MissingPath; //~^ ERROR expected path
                        //~| HELP provide a file path with `=`
                        //~| SUGGESTION include = "<path>"

#[doc(include("../README.md"))]
pub struct InvalidPathSyntax; //~^ ERROR expected path
                              //~| HELP provide a file path with `=`
                              //~| SUGGESTION include = "../README.md"

#[doc(include = 123)]
pub struct InvalidPathType; //~^ ERROR expected path
                            //~| HELP provide a file path with `=`
                            //~| SUGGESTION include = "<path>"

#[doc(include(123))]
pub struct InvalidPathSyntaxAndType; //~^ ERROR expected path
                                     //~| HELP provide a file path with `=`
                                     //~| SUGGESTION include = "<path>"

fn main() {}