|
| 1 | +// no-reformat |
| 2 | + |
| 3 | +#[doc = " |
| 4 | +
|
| 5 | + A demonstration module |
| 6 | +
|
| 7 | + Contains documentation in various forms that rustdoc understands, |
| 8 | + for testing purposes. It doesn't surve any functional |
| 9 | + purpose. This here, for instance, is just some filler text. |
| 10 | +
|
| 11 | + FIXME (1654): It would be nice if we could run some automated |
| 12 | + tests on this file |
| 13 | +
|
| 14 | +"]; |
| 15 | + |
| 16 | +#[doc = "The base price of a muffin on a non-holiday"] |
| 17 | +const price_of_a_muffin: float = 70f; |
| 18 | + |
| 19 | +type waitress = { |
| 20 | + hair_color: str |
| 21 | +}; |
| 22 | + |
| 23 | +enum omnomnomy { |
| 24 | + cookie, |
| 25 | + pizza_pie([uint]) |
| 26 | +} |
| 27 | + |
| 28 | +fn take_my_order_please( |
| 29 | + _waitress: waitress, |
| 30 | + _order: [omnomnomy] |
| 31 | +) -> uint { |
| 32 | + |
| 33 | + #[doc( |
| 34 | + desc = "OMG would you take my order already?", |
| 35 | + args(_waitress = "The waitress that you want to bother", |
| 36 | + _order = "The order vector. It should be filled with food."), |
| 37 | + return = "The price of the order, including tax", |
| 38 | + failure = "This function is full of fail" |
| 39 | + )]; |
| 40 | + |
| 41 | + fail; |
| 42 | +} |
| 43 | + |
| 44 | +mod fortress_of_solitude { |
| 45 | + #[doc( |
| 46 | + brief = "Superman's vacation home", |
| 47 | + desc = " |
| 48 | +
|
| 49 | + The fortress of solitude is located in the Arctic and it is |
| 50 | + cold. What you may not know about the fortress of solitude |
| 51 | + though is that it contains two separate bowling alleys. One of |
| 52 | + them features bumper-bowling and is kind of lame. |
| 53 | +
|
| 54 | + Really, it's pretty cool. |
| 55 | +
|
| 56 | + ")]; |
| 57 | + |
| 58 | +} |
| 59 | + |
| 60 | +mod blade_runner { |
| 61 | + #[doc( |
| 62 | + brief = "Blade Runner is probably the best movie ever", |
| 63 | + desc = "I like that in the world of Blade Runner it is always |
| 64 | + raining, and that it's always night time. And Aliens |
| 65 | + was also a really good movie. |
| 66 | +
|
| 67 | + Alien 3 was crap though." |
| 68 | + )]; |
| 69 | +} |
0 commit comments