►
Description
Unleash the Power of your Comments
A quick introduction to *rustdoc*, and how it helps you to make the probably most boring part of programming more pleasant.
Rust Linz:
https://twitter.com/rustlinz
https://rust-linz.at
https://sessionize.com/rust-linz
A
So,
okay,
now
that
you
said
it,
I
realized
that
the
title
of
my
presentation
is
a
bit
over
hyped,
but
it's
a
great
topic.
I
think
really,
so
I
couldn't
help
myself.
I
had
to
use
this
really
cool
animation
unleash
the
power
of
your
comments,
and
this
really
is.
I
want
to
provide
something
for
everyone,
if,
even
if
you're,
a
beginner
or
if
you're
a
long-term
rest
user,
I
want
to
show
some
tricks
everyone
can
use
for
the
projects.
A
A
I
am
the
first
to
rant
about
it.
If
it's
missing
it's
so
important
and
in
my
daily
work
I
have
to
do
with
a
lot
of
really
old
projects.
Just
today
I
discovered
a
dependency
on
a
2012
version
of
a
library,
so
comments
help
me
a
lot
and
I
miss
them
a
lot
too
in
those
projects,
but
at
the
same
time
I
struggle
with
them.
Good
comments
are
really
hard
to
do
and
with
rust
it's
always
the
ecosystem
that
gets
the
language
even
at
one
level
up,
so
that
that's
really
important
for
us.
A
I
think
that
you
not
only
look
at
the
language,
but
what's
already
there
to
help,
you
build
your
things
because
in
other
languages
it's
commenting
was
kind
of
an
add-on
and,
for
example,
in
php
you
have
various
commenting
system
and
there's
some
standard
stuff,
but
every
team
does
it
a
bit
different.
A
A
Okay,
so
I
have
prepared
some
code
well
rather
documentation.
I've
prepared
a
workspace
here
and
this
will
be
uploaded
to
github.
So
you
can
look
at
it
in
your
own
time
if
you
want
to
dive
deeper
into
it
and,
let's
just
start
with
a
really
simple
trust,
talk
comment.
My
font
is
so
big.
I
can't
fit
the
lines.
A
A
Now.
This
is
great
and
all
I
have
my
comments
here,
but
what
really
makes
it
just
that
much
better
is
that
you
get
rust
stock
when
you
install
cargo
or
the
rust
default
setup
from
bus,
stop
you
get
rust
dock
and
I'm
using
cargo
for
this
demo,
but
you
could
just
use
rust
dock,
so
I'm
going
to
execute
cargo
dock
with
the
open
parameter
that
builds
the
documentation
and
opens
it
in
my
default
browser.
A
A
I
get
some
navigation
some
pages,
I
even
get
a
search,
and
this
is
a
part
of
what
makes
rostock
so
great
because
you
don't
have
to
think
about
the
next
step.
What
libraries
do
I
need
to
use
to
get
a
nice
documentation
and
yeah?
So
that
was
one
of
the
points
where
I
was
like
whoa.
A
A
The
next
thing
I
added
was
documentation
for
a
module.
I'm
writing.
A
A
Top
level
comments
are
well
on
the
top
level
of
something,
so
you
can
provide
a
really
quick
overview
over
what's
happening
in
this
module
in
a
main
view
of
your
crate.
So
users
of
your
api
can
quickly
see
what's
going
on
in
there
and
jumping
really
quick,
I'm
way
quicker
than
I
thought
into
the
next
one.
A
So
I
can
write
an
extensive
comment
about
what
this
crate
tries
to
accomplish,
what
what
a
user
should
be
very
off
or
something
else
important
and
you
could
you
can
place
it
at
the
top
of
your
documentation
and
you
don't
need
to
clutter
up
some
different
files
or
include
something,
but
you
can
I'm
going
to
show
you
how
later?
A
Oh,
I
don't
think
I
do
because
it
was
nightly.
Well,
we
see
I
will
talk
about
advanced
features,
okay,
so
so
far
so
good,
we
have
some
great
level
comments,
module
level
comments,
function,
level,
comments
and
here's
something
really
clever.
I
guess
you
can
guess
it
from
the
great
name.
A
This
is
all
just
markdown
and
I
didn't
know
I
wanted
this
until
I
used
this
because
sometimes
in
documentation
you
need
to
emphasize
and
it's
easy
to
emphasize
with
markdown,
and
we
have
some
more
benefits
I
will
show
later
so
I
I
think
at
this
point
alone:
it's
amazing
what
rustoc
can
do
for
you.
It's
really
easy.
It's
really
in
the
programming
flow,
you
don't
have
to
think
a
lot
and
you
get
a
really
nice
documentation
out
of
it.
A
Now,
if
you
are
a
maintainer
of
some
library
or
you
are
a
draconian
product
manager
or
something
I
don't
know,
you
can
control
a
bit
what
what
you
expect
from
the
rust
stock
system.
So,
for
example,
with
this,
it's
called
lint.
I
think
you
can
just
crash
rustoc
when
there's
missing
documentation.
A
For
example,
about
you
can
get
a
warning
about
function,
names
that
have
a
big
letter
at
the
beginning
capital
letter
and
in
the
same
way
you
can
control
rustoc
yeah.
So
I'm
going
to
show
you
how
that
looks
in
the
browser,
because
again
it's
all
just
markdown,
and
that
means
those
are
nice
code
blocks
which
are,
I
don't
know
if
you
can
see
that
stream,
but
they
have
a
light
grey
background.
A
A
Here
you
can
already
see
visual
shooter
code
is
telling
you
me
to
run
dock
test
here.
I'm
gonna
show
you
what
stupid
does
in
a
moment.
A
When
you
put
examples
into
rust
stock
comments,
you
can
just
use
the
markdown
syntax
you
are
familiar
with
and
then
you
just
write
rust
code,
so
you
can
show
a
user
how
to
use
your
function
right
and
for
short
functions.
You
can
just
make
a
document
out
of
it,
so
I
just
said:
assert
equal
the
value
and
one
two
three,
by
the
way,
I'm
just
taking
a
string
into
here
and
making
an
unsigned
intent,
unsigned
integer
here
for
a
nice
test,
and
I
don't
know
if
first
code
can
run
it.
Let's
see.
A
No,
it
does
not
want
to
run
it.
I
think
I
know:
what's
the
problem
doc
now
wait
a
second
test.
Okay,
so
I
can
with
a
familiar
cargo
test
command
which
I
can
use
for
my
other
tests.
I've
set
up,
I
can
just
add
the
parameter
doc
and
when
I
run
this
yeah
great,
so
one
downside
is
it
only
works
with
libraries.
I
think
I
can.
A
A
No,
that's
not
going
anywhere
productive,
sorry
about
that,
but
they
do
work
for
libraries
wait!
A
second
did
I
no!
I
didn't
include
it.
Maybe
that's
the
problem,
doc.
It
works
right.
So
that's
what's
the
problem,
the
workspace
wasn't
aware
of
the
package
and
you
can
see
it
ran
one
test
in
my
mod
rs
and
it
passed
cool
and
you
can
for
libraries
even
say
that
every
public
api
needs
to
have
a
doc
test,
or
at
least
a
code
example.
A
A
There
are
some
feature:
discrepancies
with
rustoc
and
cargo
dock.
You
should
try
out
what
works
better
for
you.
I
decided
to
fall
back
to
cargo
dock
because
it
has
the
lower
features
and,
in
my
humble
opinion,
you
should
not
use
this
test
whole
modules.
You
should
not
use
it
to
have
a
complex
setup,
it's
great
for
the
things
where
you
have
a
one
line
or
two
liner
for
some
documentation,
and
you
can
just
make
a
quick
test
out
of
it
and
to
make
this
even
better
in
your
documentation.
There's
a
nice
little
trick.
A
A
That's
wrong
file
great!
I'm
a
bit
stressed
today,
I'm
so
sorry
guys!
A
Okay,
here
we
are
so,
as
you
can
see,
rustoc
only
takes
the
lines
without
the
hashtags
at
the
beginning
into
the
code
examples.
A
A
But
the
user
here
doesn't
have
to
worry
about
some
asset
in
in
their
code
example
this
because
they
don't
care
about
your
dog
tests
at
this
point
right,
so
I'm
going
to
slow
down
a
bit.
Now
I'm
going
to
jump
into
the
last
trade
here.
I
have
some
more
content
on
my
slides,
but
this
was.
I
really
wanted
to
show
this
because
it's
powerful,
we
have
again.
A
A
Yeah,
so
here
a
normal
link
is
just
a
link
and
this
automatically
links
to
the
symbol
named
links,
which
is
the
module
links.
I
should
have
thought
about
the
naming
a
bit
better,
but
you
can,
as
you
can
see
here
up
here,
if
you
just
write
my
mod
it
links
to
my
mod
and
when
we
jump
back
into
here,
you
can
see
down
here
that
this
just
works.
A
You
don't
have
to
think
about
if
you
are
linking
to
a
module,
a
function
or
anything
else,
but
if
you
have
to
think
about
it,
you
can
you
can
say
this
is
a
struct.
This
is
a
function,
and
sometimes
it
happens
that
in
one
creates
a
name
is
used
twice.
So
that's
a
great
way
to
link
to
the
correct
item.
A
Cool,
so
now
that
I
run
through
all
my
crates,
I
want
to
showcase
the
search
function
again,
because
it's
really
great
that
I
get
this
for
free.
I
I'm
amazed.
A
I
even
get
some
if
you're
a
dark
mode
user.
You
can
also
do
that
and
yeah.
So
that
was
the
coding
part,
and
now
I'm
going
to
jump
back
into
my
slideshow
and
I
have
some
more
topics
for
you.
Can
you
please
start?
Thank
you.
So
some
goodies
I
want
to
talk
about
are
the
links
I
slightly
touched
on
already.
External
files.
Aliasers
are
really
cool
and
the
ras
talkbook,
so
lins,
as
I
said,
make
sure
examples
exist
or
everything
is
documented.
A
You
can
check
for
broken
internal
links.
So
if
you
have
a
bigger
project
with
a
few
developers
and
someone
is
refactoring
something
and
you
link
to
it,
it
gets
notified
you
get
notified
in
in
the
building
process
because
the
link
is
broken
and
that
ensures
your
documentation
is
up
to
date
at
all
places
and
you
can
even
if
you're,
if
you
just
want
to
document
the
public
api,
for
example,
you
can
check
that
no
public
api
items
are
linking
to
private
api
items.
A
I
I'm
a
really
big
fan
of
the
search.
I
don't
know
if
you
noticed,
but
sometimes
it's
not
you.
It's
not
obvious
that
a
a
name
is
not
obvious.
So,
for
example,
you
have
a
struct
foo,
but
because
of
historical
reasons,
everyone
just
calls
it
bar,
and
for
that
you
can
just
use
aliases
for
your
struct.
In
this
example
from
the
rough
stock
book
they
used
x
and
big
as
aliases
for
big
x.
A
A
Why
is
my
external
files?
Not
here?
Well,
then
talk
about
it
and
then
we'll
talk
about
the
rest
book
now
the
rust.book
has
some
more
advanced
features
documented.
A
They
are
working
on
it
and
that's
a
really
big
point,
because
I
have
I
have
a
feeling
it's
a
very
active
small
community
around
rostock
and
they
have
a
lot
of
open
issues
and
they
have
a
lot
of
things
in
a
pipeline
which
are
really
really
cool
like
those
external
files
which
are
currently
a
nightly
feature.