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