2012-01-24 22:29:59 -06:00
|
|
|
// no-reformat
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/*!
|
|
|
|
* A demonstration module
|
|
|
|
*
|
|
|
|
* Contains documentation in various forms that rustdoc understands,
|
|
|
|
* for testing purposes. It doesn't surve any functional
|
|
|
|
* purpose. This here, for instance, is just some filler text.
|
|
|
|
*
|
|
|
|
* FIXME (#1654): It would be nice if we could run some automated
|
|
|
|
* tests on this file
|
|
|
|
*/
|
|
|
|
|
|
|
|
/// The base price of a muffin on a non-holiday
|
2012-01-24 22:29:59 -06:00
|
|
|
const price_of_a_muffin: float = 70f;
|
|
|
|
|
2012-09-18 18:48:40 -05:00
|
|
|
type WaitPerson = {
|
2012-07-14 00:57:48 -05:00
|
|
|
hair_color: ~str
|
2012-01-24 22:29:59 -06:00
|
|
|
};
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/// The type of things that produce omnomnom
|
2012-09-18 18:48:40 -05:00
|
|
|
enum OmNomNomy {
|
2012-07-04 16:53:12 -05:00
|
|
|
/// Delicious sugar cookies
|
2012-09-18 18:48:40 -05:00
|
|
|
Cookie,
|
2012-07-04 16:53:12 -05:00
|
|
|
/// It's pizza
|
2012-09-18 18:48:40 -05:00
|
|
|
PizzaPie(~[uint])
|
2012-01-24 22:29:59 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn take_my_order_please(
|
2012-09-18 18:48:40 -05:00
|
|
|
_waitperson: WaitPerson,
|
|
|
|
_order: ~[OmNomNomy]
|
2012-01-24 22:29:59 -06:00
|
|
|
) -> uint {
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/*!
|
|
|
|
* OMG would you take my order already?
|
|
|
|
*
|
|
|
|
* # Arguments
|
|
|
|
*
|
2012-07-30 17:51:12 -05:00
|
|
|
* * _waitperson - The waitperson that you want to bother
|
2012-07-04 16:53:12 -05:00
|
|
|
* * _order - The order vector. It should be filled with food
|
|
|
|
*
|
|
|
|
* # Return
|
|
|
|
*
|
|
|
|
* The price of the order, including tax
|
|
|
|
*
|
|
|
|
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec
|
|
|
|
* molestie nisl. Duis massa risus, pharetra a scelerisque a,
|
|
|
|
* molestie eu velit. Donec mattis ligula at ante imperdiet ut
|
|
|
|
* dapibus mauris malesuada.
|
|
|
|
*
|
|
|
|
* Sed gravida nisi a metus elementum sit amet hendrerit dolor
|
|
|
|
* bibendum. Aenean sit amet neque massa, sed tempus tortor. Sed ut
|
|
|
|
* lobortis enim. Proin a mauris quis nunc fermentum ultrices eget a
|
|
|
|
* erat. Mauris in lectus vitae metus sodales auctor. Morbi nunc
|
|
|
|
* quam, ultricies at venenatis non, pellentesque ac dui.
|
|
|
|
*
|
|
|
|
* # Failure
|
|
|
|
*
|
|
|
|
* This function is full of fail
|
|
|
|
*/
|
2012-03-08 15:44:39 -06:00
|
|
|
|
|
|
|
fail;
|
|
|
|
}
|
|
|
|
|
2012-01-24 22:29:59 -06:00
|
|
|
mod fortress_of_solitude {
|
2012-09-21 20:10:45 -05:00
|
|
|
#[legacy_exports];
|
2012-07-04 16:53:12 -05:00
|
|
|
/*!
|
|
|
|
* Superman's vacation home
|
|
|
|
*
|
|
|
|
* The fortress of solitude is located in the Arctic and it is
|
|
|
|
* cold. What you may not know about the fortress of solitude
|
|
|
|
* though is that it contains two separate bowling alleys. One of
|
|
|
|
* them features bumper-bowling and is kind of lame.
|
|
|
|
*
|
|
|
|
* Really, it's pretty cool.
|
|
|
|
*/
|
2012-01-24 22:29:59 -06:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mod blade_runner {
|
2012-09-21 20:10:45 -05:00
|
|
|
#[legacy_exports];
|
2012-07-04 16:53:12 -05:00
|
|
|
/*!
|
|
|
|
* Blade Runner is probably the best movie ever
|
|
|
|
*
|
|
|
|
* I like that in the world of Blade Runner it is always
|
|
|
|
* raining, and that it's always night time. And Aliens
|
|
|
|
* was also a really good movie.
|
|
|
|
*
|
|
|
|
* Alien 3 was crap though.
|
|
|
|
*/
|
2012-03-09 18:44:22 -06:00
|
|
|
}
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/**
|
|
|
|
* Bored
|
|
|
|
*
|
|
|
|
* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec
|
|
|
|
* molestie nisl. Duis massa risus, pharetra a scelerisque a,
|
|
|
|
* molestie eu velit. Donec mattis ligula at ante imperdiet ut
|
|
|
|
* dapibus mauris malesuada. Sed gravida nisi a metus elementum sit
|
|
|
|
* amet hendrerit dolor bibendum. Aenean sit amet neque massa, sed
|
|
|
|
* tempus tortor. Sed ut lobortis enim. Proin a mauris quis nunc
|
|
|
|
* fermentum ultrices eget a erat. Mauris in lectus vitae metus
|
|
|
|
* sodales auctor. Morbi nunc quam, ultricies at venenatis non,
|
|
|
|
* pellentesque ac dui.
|
|
|
|
*
|
|
|
|
* Quisque vitae est id eros placerat laoreet sit amet eu
|
|
|
|
* nisi. Curabitur suscipit neque porttitor est euismod
|
|
|
|
* lacinia. Curabitur non quam vitae ipsum adipiscing
|
|
|
|
* condimentum. Mauris ut ante eget metus sollicitudin
|
|
|
|
* blandit. Aliquam erat volutpat. Morbi sed nisl mauris. Nulla
|
|
|
|
* facilisi. Phasellus at mollis ipsum. Maecenas sed convallis
|
|
|
|
* sapien. Nullam in ligula turpis. Pellentesque a neque augue. Sed
|
|
|
|
* eget ante feugiat tortor congue auctor ac quis ante. Proin
|
|
|
|
* condimentum lacinia tincidunt.
|
|
|
|
*/
|
2012-09-18 18:48:40 -05:00
|
|
|
struct Bored {
|
2012-09-06 21:40:15 -05:00
|
|
|
bored: bool,
|
2012-06-24 17:09:57 -05:00
|
|
|
drop { log(error, self.bored); }
|
2012-01-30 22:54:02 -06:00
|
|
|
}
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/**
|
|
|
|
* The Shunned House
|
|
|
|
*
|
|
|
|
* From even the greatest of horrors irony is seldom absent. Sometimes it
|
|
|
|
* enters directly into the composition of the events, while sometimes it
|
|
|
|
* relates only to their fortuitous position among persons and
|
|
|
|
* places. The latter sort is splendidly exemplified by a case in the
|
|
|
|
* ancient city of Providence, where in the late forties Edgar Allan Poe
|
|
|
|
* used to sojourn often during his unsuccessful wooing of the gifted
|
|
|
|
* poetess, Mrs. Whitman. Poe generally stopped at the Mansion House in
|
|
|
|
* Benefit Street--the renamed Golden Ball Inn whose roof has sheltered
|
|
|
|
* Washington, Jefferson, and Lafayette--and his favorite walk led
|
|
|
|
* northward along the same street to Mrs. Whitman's home and the
|
|
|
|
* neighboring hillside churchyard of St. John's, whose hidden expanse of
|
|
|
|
* Eighteenth Century gravestones had for him a peculiar fascination.
|
|
|
|
*/
|
2012-09-18 18:48:40 -05:00
|
|
|
trait TheShunnedHouse {
|
2012-07-04 16:53:12 -05:00
|
|
|
/**
|
|
|
|
* Now the irony is this. In this walk, so many times repeated, the
|
|
|
|
* world's greatest master of the terrible and the bizarre was
|
|
|
|
* obliged to pass a particular house on the eastern side of the
|
|
|
|
* street; a dingy, antiquated structure perched on the abruptly
|
|
|
|
* rising side hill, with a great unkempt yard dating from a time
|
|
|
|
* when the region was partly open country. It does not appear that
|
|
|
|
* he ever wrote or spoke of it, nor is there any evidence that he
|
|
|
|
* even noticed it. And yet that house, to the two persons in
|
|
|
|
* possession of certain information, equals or outranks in horror
|
|
|
|
* the wildest fantasy of the genius who so often passed it
|
|
|
|
* unknowingly, and stands starkly leering as a symbol of all that is
|
|
|
|
* unutterably hideous.
|
|
|
|
*
|
|
|
|
* # Arguments
|
|
|
|
*
|
|
|
|
* * unkempt_yard - A yard dating from a time when the region was partly
|
|
|
|
* open country
|
|
|
|
*/
|
2012-03-09 18:44:22 -06:00
|
|
|
fn dingy_house(unkempt_yard: int);
|
2012-01-30 22:54:02 -06:00
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/**
|
|
|
|
* The house was--and for that matter still is--of a kind to attract
|
|
|
|
* the attention of the curious. Originally a farm or semi-farm
|
|
|
|
* building, it followed the average New England colonial lines of
|
|
|
|
* the middle Eighteenth Century--the prosperous peaked-roof sort,
|
|
|
|
* with two stories and dormerless attic, and with the Georgian
|
|
|
|
* doorway and interior panelling dictated by the progress of taste
|
|
|
|
* at that time. It faced south, with one gable end buried to the
|
|
|
|
* lower windows in the eastward rising hill, and the other exposed
|
|
|
|
* to the foundations toward the street. Its construction, over a
|
|
|
|
* century and a half ago, had followed the grading and straightening
|
|
|
|
* of the road in that especial vicinity; for Benefit Street--at
|
|
|
|
* first called Back Street--was laid out as a lane winding amongst
|
|
|
|
* the graveyards of the first settlers, and straightened only when
|
|
|
|
* the removal of the bodies to the North Burial Ground made it
|
|
|
|
* decently possible to cut through the old family plots.
|
|
|
|
*/
|
2012-01-30 22:54:02 -06:00
|
|
|
fn construct() -> bool;
|
2012-01-31 22:59:42 -06:00
|
|
|
}
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/// Whatever
|
2012-09-18 18:48:40 -05:00
|
|
|
impl OmNomNomy: TheShunnedHouse {
|
2012-01-31 22:59:42 -06:00
|
|
|
fn dingy_house(_unkempt_yard: int) {
|
|
|
|
}
|
|
|
|
|
|
|
|
fn construct() -> bool {
|
|
|
|
fail;
|
|
|
|
}
|
2012-07-30 17:51:12 -05:00
|
|
|
}
|