]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/playground.rs
Rollup merge of #71829 - kper:issue71136, r=matthewjasper
[rust.git] / src / test / rustdoc / playground.rs
1 // ignore-tidy-linelength
2
3 #![crate_name = "foo"]
4
5 #![doc(html_playground_url = "https://www.example.com/")]
6
7 //! module docs
8 //!
9 //! ```
10 //! println!("Hello, world!");
11 //! ```
12 //!
13 //! ```
14 //! fn main() {
15 //!     println!("Hello, world!");
16 //! }
17 //! ```
18 //!
19 //! ```
20 //! #![feature(something)]
21 //!
22 //! fn main() {
23 //!     println!("Hello, world!");
24 //! }
25 //! ```
26
27 // @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D&edition=2015"]' "Run"
28 // @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Aprintln!(%22Hello%2C%20world!%22)%3B%0A%7D&edition=2015"]' "Run"
29 // @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(something)%5D%0A%0Afn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D&version=nightly&edition=2015"]' "Run"