Skip to content

Rolling up PRs in the queue #19958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 106 commits into from
Dec 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
31b240d
Add comments with type annotations.
steveklabnik Dec 11, 2014
e92e8ac
Use rust-installer for installation
brson Nov 21, 2014
577f742
serialize: Avoid stray nul characters when auto-serializing char.
lifthrasiir Dec 12, 2014
19eb4bf
Add coercions from *mut to *const and from &mut to *const.
nrc Dec 12, 2014
8abe784
Deprecate more in-tree libs for crates.io
alexcrichton Dec 13, 2014
81f9a31
Change `VecMap`'s iterators to use wrapper structs instead of typedefs.
csouth3 Dec 11, 2014
7d1fa4e
rustc: Start the deprecation of libserialize
alexcrichton Dec 11, 2014
f053f29
Fix mispelling in char.rs error message
mchaput Dec 14, 2014
ac7dc03
libsyntax: Make deriving also respect where bounds.
luqmana Dec 14, 2014
ab1bdde
libsyntax: Output where clauses in pretty printer for structs.
luqmana Dec 14, 2014
c2b0d7d
Modify `regex::Captures::{at,name}` to return `Option`
emk Dec 13, 2014
5966815
InvariantLifetime is Copy-able
shepmaster Dec 14, 2014
2f7a5f4
libcore: make iterator adaptors `Clone`able
Dec 14, 2014
5c29df6
Fix indentation in a code example in the ownership guide.
jbranchaud Dec 14, 2014
a333e01
Fix typo: intuitive -> unintuitive
nicholasbishop Dec 14, 2014
1fbca88
std: Fully stabilize Option<T>
alexcrichton Dec 14, 2014
0a968ef
Add test for #19129
Dec 15, 2014
0d38cae
std: Bind port early to make a test more reliable
alexcrichton Dec 15, 2014
f63784f
impl `Copy` for `NoSend`/`NoSync`
Dec 15, 2014
c270390
Fix Markdown syntax in docs for OsRng
sourcefrog Dec 15, 2014
8d6895a
Free stdin on exit
sfackler Dec 15, 2014
8fcc832
Standardize some usages of "which" in docstrings
drewm1980 Dec 15, 2014
4df66cd
Resolve lifetimes in associated types
sanxiyn Dec 15, 2014
2e74291
remove explicit if_let and tuple_indexing feature enables as they now…
Dec 15, 2014
c9ea7c9
serialize: Change some FnOnce bounds to FnMut
alexcrichton Dec 15, 2014
556d971
Remove internal uses of `marker::NoCopy`
Dec 14, 2014
c3778fa
libstd: add a dummy field to `OsRng` to avoid out of module construction
Dec 15, 2014
c500b63
libgraphviz: add `label` and `escaped` ctors taking any `str::IntoMay…
pnkfelix Dec 15, 2014
a5e0624
libgraphviz: extend API with flags to indicate options like "do not i…
pnkfelix Dec 15, 2014
d6d0bb2
Added `-Z print-region-graph` debugging option; produces graphviz
pnkfelix Dec 15, 2014
72608eb
Fixed a small spelling mistake
YafahEdelman Dec 15, 2014
a9dbb79
Add a doctest for the string Add function.
jbranchaud Dec 15, 2014
765806e
Use wrapper structs for `BTreeMap`'s iterators.
csouth3 Dec 12, 2014
a81c3ab
Use wrapper structs for `BTreeSet`'s iterators.
csouth3 Dec 13, 2014
85fe141
Use wrapper structs for `HashMap`'s iterators.
csouth3 Dec 12, 2014
341cf40
Use wrapper structs for `HashSet`'s iterators.
csouth3 Dec 13, 2014
13e7f9c
Handle higher-rank lifetimes when generating type IDs
bkoropoff Dec 13, 2014
3925b4d
Add regression test for #19791
bkoropoff Dec 13, 2014
0a1798d
Fix pretty printing of HRTB syntax
bkoropoff Dec 14, 2014
23bae85
std: Second-pass stabilization of `mem`
alexcrichton Dec 16, 2014
9021f61
std: Second pass stabilization of `default`
alexcrichton Dec 16, 2014
4ecad89
Add probe and var for file
AaronFriel Dec 16, 2014
3a073e3
Tuple test no longer needed. Is already in run-pass tests
mdinger Dec 16, 2014
127dac4
Don't make unboxed closures implicitly copiable
flaper87 Dec 15, 2014
7d4e7f0
AST refactor: make the place in ExprBox an option.
pnkfelix Dec 16, 2014
b7ba69d
Fixed iOS build after oibit
vhbit Dec 11, 2014
375b79a
Followup fixes that I missed during an earlier rebase.
pnkfelix Dec 16, 2014
8f4e9c2
Fix `make TAGS.emacs`.
pnkfelix Dec 16, 2014
df5404c
std: Change escape_unicode to use new escapes
alexcrichton Dec 15, 2014
73d395e
Change 'if' to lowercase, so it displays better on the site
cllns Dec 16, 2014
570325d
Use the sugary syntax to print the `Fn` traits in error messages
ftxqxd Dec 16, 2014
c42e2f6
Small cleanups in HashMap based off of new rust features.
Dec 16, 2014
c1b69c7
guide-ownership.md, guide-testing.md: fix typos
Dec 7, 2014
033a792
Document std::mem
steveklabnik Dec 16, 2014
59d4153
Implement remove for RingBuf
pczarn Dec 16, 2014
18c420e
Improve docs for std::vec
steveklabnik Dec 17, 2014
2ba2843
Minor changes to Rust Language FAQ
iKevinY Dec 15, 2014
9caa66f
Implement BorrowFrom<Arc<T>> for T
csouth3 Dec 17, 2014
7120123
rollup merge of #19720: csouth3/vecmap-newtypes
alexcrichton Dec 17, 2014
c43a807
rollup merge of #19729: vhbit/ios-oibit-fix
alexcrichton Dec 17, 2014
bfb5f8b
rollup merge of #19743: steveklabnik/gh16143
alexcrichton Dec 17, 2014
58020d3
rollup merge of #19753: brson/rust-installer
alexcrichton Dec 17, 2014
fc1b437
rollup merge of #19755: alexcrichton/rust-serialize
alexcrichton Dec 17, 2014
6089699
rollup merge of #19764: lifthrasiir/that-stray-nul
alexcrichton Dec 17, 2014
126a83f
rollup merge of #19766: nick29581/coerce-raw
alexcrichton Dec 17, 2014
974e17b
rollup merge of #19770: csouth3/iterator-wrapperstructs
alexcrichton Dec 17, 2014
5294ceb
rollup merge of #19818: emk/regex_at_name_opt
alexcrichton Dec 17, 2014
be0c8fb
rollup merge of #19820: alexcrichton/deprecate-some-more-libs
alexcrichton Dec 17, 2014
b530221
rollup merge of #19821: bkoropoff/issue-19791
alexcrichton Dec 17, 2014
f9ff55e
rollup merge of #19827: japaric/clone-uc
alexcrichton Dec 17, 2014
823cd7a
rollup merge of #19830: mchaput/patch-1
alexcrichton Dec 17, 2014
bdb1146
rollup merge of #19831: luqmana/deriving-where
alexcrichton Dec 17, 2014
dbd68c7
rollup merge of #19832: japaric/no-nocopy
alexcrichton Dec 17, 2014
924cd5a
rollup merge of #19838: shepmaster/invariant-lifetime-copy
alexcrichton Dec 17, 2014
f7cb5b6
rollup merge of #19845: jbranchaud/fix-indentation-in-ownership-guide
alexcrichton Dec 17, 2014
dea69e6
rollup merge of #19846: nicholasbishop/bishops_magical_intuition
alexcrichton Dec 17, 2014
137a3db
rollup merge of #19849: alexcrichton/second-pass-option
alexcrichton Dec 17, 2014
991bd04
rollup merge of #19856: iKevinY/faq-fixes
alexcrichton Dec 17, 2014
75a84f9
rollup merge of #19857: japaric/test-19129
alexcrichton Dec 17, 2014
de0570d
rollup merge of #19859: alexcrichton/flaky-test
alexcrichton Dec 17, 2014
67237a7
rollup merge of #19860: japaric/copy-markers
alexcrichton Dec 17, 2014
03e970f
rollup merge of #19868: sourcefrog/master
alexcrichton Dec 17, 2014
64faa74
rollup merge of #19869: sfackler/free-stdin
alexcrichton Dec 17, 2014
272f203
rollup merge of #19871: pczarn/ring_buf-remove
alexcrichton Dec 17, 2014
cd07efd
rollup merge of #19873: drewm1980/master
alexcrichton Dec 17, 2014
c4c892d
rollup merge of #19880: sanxiyn/assoc-resolve-lifetime
alexcrichton Dec 17, 2014
3315a3b
rollup merge of #19881: larroy/master
alexcrichton Dec 17, 2014
31e2161
rollup merge of #19885: alexcrichton/char-escape
alexcrichton Dec 17, 2014
1a05f95
rollup merge of #19887: alexcrichton/serialize-fn-mut
alexcrichton Dec 17, 2014
56fb9bc
rollup merge of #19889: FlaPer87/unboxed-closure
alexcrichton Dec 17, 2014
4a77570
rollup merge of #19892: pnkfelix/region-graphviz
alexcrichton Dec 17, 2014
1f2a18c
rollup merge of #19893: JacobEdelman/patch-1
alexcrichton Dec 17, 2014
cada943
rollup merge of #19895: jbranchaud/add-string-add-doctest
alexcrichton Dec 17, 2014
3369b33
rollup merge of #19902: alexcrichton/second-pass-mem
alexcrichton Dec 17, 2014
cce3fc0
rollup merge of #19905: AaronFriel/patch-1
alexcrichton Dec 17, 2014
1b92909
rollup merge of #19911: mdinger/tuple_tests2
alexcrichton Dec 17, 2014
b496ada
rollup merge of #19912: P1start/fn-formatting
alexcrichton Dec 17, 2014
a02885e
rollup merge of #19918: pnkfelix/ast-refactor-make-place-in-exprbox-a…
alexcrichton Dec 17, 2014
b56d4bf
rollup merge of #19923: pnkfelix/fix-make-tags.emacs
alexcrichton Dec 17, 2014
42dbee0
rollup merge of #19930: cllns/lowercase-if
alexcrichton Dec 17, 2014
a7bb479
rollup merge of #19935: cgaebel/hashmap-tuple-indexing
alexcrichton Dec 17, 2014
1b9b647
rollup merge of #19940: phi-gamma/canonical-master
alexcrichton Dec 17, 2014
cbc3cf7
rollup merge of #19942: steveklabnik/doc_std_mem
alexcrichton Dec 17, 2014
7ffbd8b
rollup merge of #19943: steveklabnik/doc_std_vec
alexcrichton Dec 17, 2014
76fbb5d
rollup merge of #19947: csouth3/arc-borrowfrom
alexcrichton Dec 17, 2014
5c98952
Test fixes and rebase conflicts
alexcrichton Dec 17, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
[submodule "src/jemalloc"]
path = src/jemalloc
url = https://github.com/rust-lang/jemalloc.git
[submodule "src/rust-installer"]
path = src/rust-installer
url = https://github.com/rust-lang/rust-installer
2 changes: 1 addition & 1 deletion mk/ctags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
$(patsubst ${CFG_SRC_DIR}src/rt/msvc,, \
$(patsubst ${CFG_SRC_DIR}src/rt/vg,, \
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \
)))))))))
))))))))
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=-javascript --recurse ${CTAGS_LOCATIONS}
# We could use `--languages=Rust`, but there is value in producing tags for the
# C++ parts of the code base too (at the time of writing, those are .h and .cpp
Expand Down
22 changes: 15 additions & 7 deletions mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ PKG_FILES := \
rt \
rustllvm \
snapshots.txt \
rust-installer \
test) \
$(PKG_GITMODULES) \
$(filter-out config.stamp, \
Expand Down Expand Up @@ -209,33 +210,40 @@ distcheck-osx: dist-osx
# Unix binary installer tarballs
######################################################################

NON_INSTALLED_PREFIXES=COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,doc

define DEF_INSTALLER

$$(eval $$(call DEF_PREPARE,dir-$(1)))

dist-install-dir-$(1): PREPARE_HOST=$(1)
dist-install-dir-$(1): PREPARE_TARGETS=$(2)
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)-image
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
dist-install-dir-$(1): PREPARE_CLEAN=true
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
> tmp/dist/manifest-$(1).in
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
# Add remaining non-installed files
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)

dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
@$(call E, build: $$@)
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)
$$(Q)$$(S)src/rust-installer/gen-installer.sh \
--product-name=Rust \
--verify-bin=rustc \
--rel-manifest-dir=rustlib \
--success-message=Rust-is-ready-to-roll. \
--image-dir=tmp/dist/$$(PKG_NAME)-$(1)-image \
--work-dir=tmp/dist \
--output-dir=dist \
--non-installed-prefixes=$$(NON_INSTALLED_PREFIXES) \
--package-name=$$(PKG_NAME)-$(1)
$$(Q)rm -R tmp/dist/$$(PKG_NAME)-$(1)-image

endef

Expand Down
4 changes: 2 additions & 2 deletions mk/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif
# Remove tmp files because it's a decent amount of disk space
$(Q)rm -R tmp/dist

prepare_install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
prepare_install: dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz | tmp/empty_dir

uninstall:
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
Expand All @@ -38,7 +38,7 @@ endif
# Remove tmp files because it's a decent amount of disk space
$(Q)rm -R tmp/dist

prepare_uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
prepare_uninstall: dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz | tmp/empty_dir

.PHONY: install prepare_install uninstall prepare_uninstall

Expand Down
4 changes: 2 additions & 2 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {

match re.captures(full_version_line) {
Some(captures) => {
Some(captures.at(2).to_string())
Some(captures.at(2).unwrap_or("").to_string())
}
None => {
println!("Could not extract GDB version from line '{}'",
Expand Down Expand Up @@ -428,7 +428,7 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {

match re.captures(full_version_line) {
Some(captures) => {
Some(captures.at(1).to_string())
Some(captures.at(1).unwrap_or("").to_string())
}
None => {
println!("Could not extract LLDB version from line '{}'",
Expand Down
8 changes: 4 additions & 4 deletions src/compiletest/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ fn parse_expected(last_nonfollow_error: Option<uint>,
line: &str,
re: &Regex) -> Option<(WhichLine, ExpectedError)> {
re.captures(line).and_then(|caps| {
let adjusts = caps.name("adjusts").len();
let kind = caps.name("kind").to_ascii_lower();
let msg = caps.name("msg").trim().to_string();
let follow = caps.name("follow").len() > 0;
let adjusts = caps.name("adjusts").unwrap_or("").len();
let kind = caps.name("kind").unwrap_or("").to_ascii_lower();
let msg = caps.name("msg").unwrap_or("").trim().to_string();
let follow = caps.name("follow").unwrap_or("").len() > 0;

let (which, line) = if follow {
assert!(adjusts == 0, "use either //~| or //~^, not both.");
Expand Down
28 changes: 16 additions & 12 deletions src/doc/complement-lang-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Some examples that demonstrate different aspects of the language:
[HashMap]: https://github.com/rust-lang/rust/blob/master/src/libcollections/hashmap.rs
[json]: https://github.com/rust-lang/rust/blob/master/src/libserialize/json.rs

You may also be interested in browsing [GitHub's Rust][github-rust] page.
You may also be interested in browsing [trending Rust repositories][github-rust] on GitHub.

[github-rust]: https://github.com/trending?l=rust

Expand All @@ -42,7 +42,7 @@ Let the fact that this is an easily countable number be a warning.

## Does it run on Windows?

Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
Yes. All development happens in lockstep on all 3 target platforms (using MinGW, not Cygwin). Note that the Windows implementation currently has some limitations; in particular, the 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].

[win64]: https://github.com/rust-lang/rust/issues/1237
[libgcc]: https://github.com/rust-lang/rust/issues/11782
Expand Down Expand Up @@ -104,7 +104,7 @@ Similar to the reasoning about default-sync: it wires fewer assumptions into the

## Why are strings UTF-8 by default? Why not UCS2 or UCS4?

The `str` type is UTF-8 because we observe more text in the wild in this encoding -- particularly in network transmissions, which are endian-agnostic -- and we think it's best that the default treatment of I/O not involve having to recode codepoints in each direction.
The `str` type is UTF-8 because we observe more text in the wild in this encoding particularly in network transmissions, which are endian-agnostic and we think it's best that the default treatment of I/O not involve having to recode codepoints in each direction.

This does mean that indexed access to a Unicode codepoint inside a `str` value is an O(n) operation. On the one hand, this is clearly undesirable; on the other hand, this problem is full of trade-offs and we'd like to point a few important qualifications:

Expand Down Expand Up @@ -145,23 +145,27 @@ For simplicity, we do not plan to do so. Implementing automatic semicolon insert

## How do I get my program to display the output of logging macros?

**Short answer** set the RUST_LOG environment variable to the name of your source file, sans extension.
**Short Answer**: Set the `RUST_LOG` environment variable to the name of your source file, sans extension.

```sh
rustc hello.rs
export RUST_LOG=hello
./hello
```

**Long answer** RUST_LOG takes a 'logging spec' that consists of a
**Long Answer**: `RUST_LOG` takes a 'logging spec' that consists of a
comma-separated list of paths, where a path consists of the crate name and
sequence of module names, each separated by double-colons. For standalone .rs
files the crate is implicitly named after the source file, so in the above
example we were setting RUST_LOG to the name of the hello crate. Multiple paths
sequence of module names, each separated by double-colons. For standalone `.rs`
files, the crate is implicitly named after the source file, so in the above
example we were setting `RUST_LOG` to the name of the hello crate. Multiple paths
can be combined to control the exact logging you want to see. For example, when
debugging linking in the compiler you might set
`RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath`
For a full description see [the logging crate][1].
debugging linking in the compiler, you might set the following:

```sh
RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath
```

For a full description, see [the logging crate][1].

## How fast is Rust?

Expand All @@ -172,6 +176,6 @@ performance.
That said, it is an explicit goal of Rust to be as fast as C++ for most things.
Language decisions are made with performance in mind, and we want Rust to be as
fast as possible. Given that Rust is built on top of LLVM, any performance
improvements in it also help us be faster.
improvements in it also help Rust become faster.

[1]:log/index.html
2 changes: 1 addition & 1 deletion src/doc/guide-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ early_return!(input_2, [T::SpecialB]);
As the above example demonstrates, `$(...)*` is also valid on the right-hand
side of a macro definition. The behavior of `*` in transcription,
especially in cases where multiple `*`s are nested, and multiple different
names are involved, can seem somewhat magical and intuitive at first. The
names are involved, can seem somewhat magical and unintuitive at first. The
system that interprets them is called "Macro By Example". The two rules to
keep in mind are (1) the behavior of `$(...)*` is to walk through one "layer"
of repetitions for all of the `$name`s it contains in lockstep, and (2) each
Expand Down
4 changes: 2 additions & 2 deletions src/doc/guide-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ fn main() {
{ // |
let y = &5i; // ---+ y goes into scope
let f = Foo { x: y }; // ---+ f goes into scope
x = &f.x; // | | error here
x = &f.x; // | | error here
} // ---+ f & y go out of scope
// |
println!("{}", x); // |
Expand Down Expand Up @@ -416,7 +416,7 @@ note: `car` moved here because it has type `Car`, which is non-copyable
```

We need our `Car` to be pointed to by multiple `Wheel`s. We can't do that with
`Box<T>`, because it has a single owner. We can do t with `Rc<T>` instead:
`Box<T>`, because it has a single owner. We can do it with `Rc<T>` instead:

```rust
use std::rc::Rc;
Expand Down
2 changes: 1 addition & 1 deletion src/doc/guide-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ Let's finally check out that third section: documentation tests.

Nothing is better than documentation with examples. Nothing is worse than
examples that don't actually work, because the code has changed since the
documentation has been written. To this end, Rust supports automaticaly
documentation has been written. To this end, Rust supports automatically
running examples in your documentation. Here's a fleshed-out `src/lib.rs`
with examples:

Expand Down
Loading