Skip to content

Commit bc450e6

Browse files
committed
rustdoc: Add ifaces to demo module
1 parent 38197d8 commit bc450e6

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

src/rustdoc/demo.rs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,73 @@ mod blade_runner {
9898
")]
9999
resource bored(bored: bool) {
100100
log(error, bored);
101+
}
102+
103+
#[doc(
104+
brief = "The Shunned House",
105+
desc = "
106+
107+
From even the greatest of horrors irony is seldom absent. Sometimes it
108+
enters directly into the composition of the events, while sometimes it
109+
relates only to their fortuitous position among persons and
110+
places. The latter sort is splendidly exemplified by a case in the
111+
ancient city of Providence, where in the late forties Edgar Allan Poe
112+
used to sojourn often during his unsuccessful wooing of the gifted
113+
poetess, Mrs. Whitman. Poe generally stopped at the Mansion House in
114+
Benefit Street--the renamed Golden Ball Inn whose roof has sheltered
115+
Washington, Jefferson, and Lafayette--and his favorite walk led
116+
northward along the same street to Mrs. Whitman's home and the
117+
neighboring hillside churchyard of St. John's, whose hidden expanse of
118+
Eighteenth Century gravestones had for him a peculiar fascination.
119+
120+
")]
121+
iface the_shunned_house {
122+
#[doc(
123+
desc = "
124+
125+
Now the irony is this. In this walk, so many times repeated, the
126+
world's greatest master of the terrible and the bizarre was
127+
obliged to pass a particular house on the eastern side of the
128+
street; a dingy, antiquated structure perched on the abruptly
129+
rising side hill, with a great unkempt yard dating from a time
130+
when the region was partly open country. It does not appear that
131+
he ever wrote or spoke of it, nor is there any evidence that he
132+
even noticed it. And yet that house, to the two persons in
133+
possession of certain information, equals or outranks in horror
134+
the wildest fantasy of the genius who so often passed it
135+
unknowingly, and stands starkly leering as a symbol of all that is
136+
unutterably hideous.
137+
138+
",
139+
args(
140+
a =
141+
"A yard dating from a time when the region was partly
142+
open country"
143+
))]
144+
fn dingy_house(unkempt_yard: int);
145+
146+
#[doc(
147+
desc = "
148+
149+
The house was--and for that matter still is--of a kind to attract
150+
the attention of the curious. Originally a farm or semi-farm
151+
building, it followed the average New England colonial lines of
152+
the middle Eighteenth Century--the prosperous peaked-roof sort,
153+
with two stories and dormerless attic, and with the Georgian
154+
doorway and interior panelling dictated by the progress of taste
155+
at that time. It faced south, with one gable end buried to the
156+
lower windows in the eastward rising hill, and the other exposed
157+
to the foundations toward the street. Its construction, over a
158+
century and a half ago, had followed the grading and straightening
159+
of the road in that especial vicinity; for Benefit Street--at
160+
first called Back Street--was laid out as a lane winding amongst
161+
the graveyards of the first settlers, and straightened only when
162+
the removal of the bodies to the North Burial Ground made it
163+
decently possible to cut through the old family plots.
164+
165+
",
166+
return = "A dingy house with an unkempt yard",
167+
failure = "Will fail if bodies are removed from premises"
168+
)]
169+
fn construct() -> bool;
101170
}

0 commit comments

Comments
 (0)