Skip to content

Rollup of PRs in the queue #22397

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 65 commits into from
Feb 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f89622f
Updated darwin types
vhbit Feb 12, 2015
6b784ba
creader: Clean up macro/plugin API
kmcallister Feb 12, 2015
6864792
Separate macro and plugin loading
kmcallister Feb 12, 2015
b7683fc
Warn when linking a plugin into a non-plugin crate
kmcallister Feb 12, 2015
3d9528a
Unstabilise `words` for now.
huonw Feb 13, 2015
84cb71b
Audit integer type usage in `core::ptr`
nikomatsakis Feb 13, 2015
6d6c360
Audit integer type usage in `core::option`
nikomatsakis Feb 13, 2015
e727378
add an associated `Item` type to `IntoIterator`
Feb 13, 2015
1c935f1
docs.mk: use posix arguments for cp
semarie Feb 14, 2015
ff1181d
Only set --bench for crate tests when PLEASE_BENCH is set
fhahn Feb 14, 2015
6a67d86
Count and show the deprecated attribute again
nagisa Feb 13, 2015
58b7efe
Stabilise ExactSizeIterator::len
nagisa Feb 14, 2015
3e9e325
doc: fix and expand File::create explanation
tshepang Feb 15, 2015
42f5ac5
Fix tests that fail on FreeBSD
wg Feb 15, 2015
eb8e113
openbsd: disable test_file_desc test
semarie Feb 15, 2015
40571ec
markdown file with links to configs
serejkus Feb 15, 2015
336dd6c
book: link to a file with configs links
serejkus Feb 15, 2015
109e118
Apply adjustments to the retslot type in trans_ret
dotdash Feb 15, 2015
89822e1
Book - short explanation of arity
Feb 15, 2015
690cc13
Add styles for docblock tables
nagisa Feb 15, 2015
d7f673c
Audit integer types in ops.
nikomatsakis Feb 15, 2015
a43daa6
Audit integer types in result.
nikomatsakis Feb 15, 2015
8eb3859
Audit integer types in finally.
nikomatsakis Feb 15, 2015
6514c3a
Don't panic if there's no command line arguments
bombless Feb 15, 2015
74864b3
lint: fixup extraneous #[allow]
richo Feb 15, 2015
6171c35
Change arbirary types from `usize` to `u32`.
nikomatsakis Feb 15, 2015
4cf4e8b
glossary
Feb 15, 2015
74ba529
Added explanation to trpl of integer types.
jxcl Feb 15, 2015
9783cc2
improve text
Feb 15, 2015
428733d
reference: fix outdated link for Compiler plugins
Feb 16, 2015
be7b20e
Stop advertisting the `old_impl_check` feature. We can't ENTIRELY
nikomatsakis Feb 16, 2015
4115931
Update std::os deprecation warnings
aturon Feb 16, 2015
5ebf4c4
remove 'crate files' sentence
steveklabnik Feb 16, 2015
441e09b
Add missing Copy trait for enums
GuillaumeGomez Feb 16, 2015
318f262
Remove warning instead of implementing Copy trait
GuillaumeGomez Feb 16, 2015
9462a20
Make orphan check diagnostics clearer
Feb 16, 2015
c24f353
rustup: Fix for locale bug
posixphreak Feb 16, 2015
d660739
Rollup merge of #22253 - huonw:unstable-words, r=aturon
Manishearth Feb 16, 2015
b0d2c6a
Rollup merge of #22294 - nikomatsakis:integer-audit, r=huonw
Manishearth Feb 16, 2015
6cab5bb
Rollup merge of #22341 - fhahn:issue-22291-PLEASE-FAIL, r=alexcrichton
Manishearth Feb 16, 2015
1c8e592
Rollup merge of #22353 - tshepang:improve-fs-create-docs, r=alexcrichton
Manishearth Feb 16, 2015
cdf0cb0
Rollup merge of #22360 - wg:master, r=alexcrichton
Manishearth Feb 16, 2015
3e7af91
Rollup merge of #22363 - semarie:openbsd-test_file_desc, r=alexcrichton
Manishearth Feb 16, 2015
e0477fa
Rollup merge of #22365 - serejkus:configs-link, r=steveklabnik
Manishearth Feb 16, 2015
f28d89f
Rollup merge of #22366 - dotdash:ret_adjust, r=alexcrichton
Manishearth Feb 16, 2015
fe3b6a1
Rollup merge of #22368 - thiagooak:book-arity, r=steveklabnik
Manishearth Feb 16, 2015
6847244
Rollup merge of #22369 - nagisa:docblock-table, r=steveklabnik
Manishearth Feb 16, 2015
bc0d545
Rollup merge of #22373 - bombless:fix-rustbook, r=steveklabnik
Manishearth Feb 16, 2015
96a4756
Rollup merge of #22374 - richo:warn-fixup, r=huonw
Manishearth Feb 16, 2015
47814a4
Rollup merge of #22377 - thiagooak:book-glossary, r=steveklabnik
Manishearth Feb 16, 2015
adea99c
Rollup merge of #22378 - jxcl:master, r=steveklabnik
Manishearth Feb 16, 2015
4780321
Rollup merge of #22392 - laijs:fix-reference-md-plugin-link, r=stevek…
Manishearth Feb 16, 2015
8a6b724
Rollup merge of #22344 - nagisa:exactsizediter, r=alexcrichton
Manishearth Feb 16, 2015
e337a57
Rollup merge of #22326 - semarie:compat-cp, r=alexcrichton
Manishearth Feb 16, 2015
d264ef2
Rollup merge of #22313 - japaric:iter, r=aturon
Manishearth Feb 16, 2015
a03ce81
Rollup merge of #22273 - nagisa:doc-deprecated, r=alexcrichton
Manishearth Feb 16, 2015
02fb58a
Rollup merge of #22225 - vhbit:darwin-types, r=alexcrichton
Manishearth Feb 16, 2015
901d2c7
Rollup merge of #22241 - kmcallister:macro-plugin-cleanup, r=sfackler
Manishearth Feb 16, 2015
b491b16
Rollup merge of #22394 - alexcrichton:vec-from-iter-comment, r=brson
Manishearth Feb 16, 2015
a97ffa2
Rollup merge of #22413 - steveklabnik:gh22386, r=alexcrichton
Manishearth Feb 17, 2015
23306de
Rollup merge of #22411 - aturon:fix-os-deprecation, r=alexcrichton
Manishearth Feb 17, 2015
bc48107
Rollup merge of #22418 - japaric:diagnostics, r=nikomatsakis
Manishearth Feb 17, 2015
8c639d3
Rollup merge of #22420 - posixphreak:fix-rustup-locale, r=brson
Manishearth Feb 17, 2015
a555fbd
Rollup merge of #22416 - GuillaumeGomez:copy, r=eddyb
Manishearth Feb 17, 2015
35ee895
Rollup merge of #22409 - nikomatsakis:stop-advertisting-old-impl-chec…
Manishearth Feb 17, 2015
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
8 changes: 4 additions & 4 deletions mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,21 @@ doc/:
HTML_DEPS += doc/rust.css
doc/rust.css: $(D)/rust.css | doc/
@$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null
$(Q)cp -PRp $< $@ 2> /dev/null

HTML_DEPS += doc/favicon.inc
doc/favicon.inc: $(D)/favicon.inc | doc/
@$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null
$(Q)cp -PRp $< $@ 2> /dev/null

doc/full-toc.inc: $(D)/full-toc.inc | doc/
@$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null
$(Q)cp -PRp $< $@ 2> /dev/null

HTML_DEPS += doc/footer.inc
doc/footer.inc: $(D)/footer.inc | doc/
@$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null
$(Q)cp -PRp $< $@ 2> /dev/null

# The (english) documentation for each doc item.

Expand Down
10 changes: 5 additions & 5 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ ifdef CHECK_IGNORED
TESTARGS += --ignored
endif


# Arguments to the cfail/rfail/rpass/bench tests
ifdef CFG_VALGRIND
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
endif

ifdef PLEASE_BENCH
TESTARGS += --bench
endif

# Arguments to the perf tests
ifdef CFG_PERF_TOOL
CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
endif

CTEST_TESTARGS := $(TESTARGS)

# --bench is only relevant for crate tests, not for the compile tests
ifdef PLEASE_BENCH
TESTARGS += --bench
endif

ifdef VERBOSE
CTEST_TESTARGS += --verbose
endif
Expand Down
7 changes: 3 additions & 4 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ All of the above extensions are expressions with values.

Users of `rustc` can define new syntax extensions in two ways:

* [Compiler plugins](book/syntax-extensions.html) can include arbitrary
* [Compiler plugins][plugin] can include arbitrary
Rust code that manipulates syntax trees at compile time.

* [Macros](book/macros.html) define new syntax in a higher-level,
Expand Down Expand Up @@ -818,9 +818,8 @@ item : extern_crate_decl | use_decl | mod_item | fn_item | type_item
| extern_block ;
```

An _item_ is a component of a crate; some module items can be defined in crate
files, but most are defined in source files. Items are organized within a crate
by a nested set of [modules](#modules). Every crate has a single "outermost"
An _item_ is a component of a crate. Items are organized within a crate by a
nested set of [modules](#modules). Every crate has a single "outermost"
anonymous module; all further items within the crate have [paths](#paths)
within the module tree of the crate.

Expand Down
1 change: 1 addition & 0 deletions src/doc/trpl/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@
* [Macros](macros.md)
* [Compiler Plugins](plugins.md)
* [Conclusion](conclusion.md)
* [Glossary](glossary.md)
3 changes: 2 additions & 1 deletion src/doc/trpl/compound-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ This pattern is very powerful, and we'll see it repeated more later.

There are also a few things you can do with a tuple as a whole, without
destructuring. You can assign one tuple into another, if they have the same
arity and contained types.
contained types and arity. Tuples have the same arity when they have the same
length.

```rust
let mut x = (1, 2); // x: (i32, i32)
Expand Down
16 changes: 16 additions & 0 deletions src/doc/trpl/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
% Glossary

Not every Rustacean has a background in systems programming, nor in computer
science, so we've added explanations of terms that might be unfamiliar.

### Arity

Arity refers to the number of arguments a function or operation takes.

```rust
let x = (2, 3);
let y = (4, 6);
let z = (8, 2, 6);
```

In the example above `x` and `y` have arity 2. `z` has arity 3.
2 changes: 1 addition & 1 deletion src/doc/trpl/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ This line does all of the work in our little program. There are a number of
details that are important here. The first is that it's indented with four
spaces, not tabs. Please configure your editor of choice to insert four spaces
with the tab key. We provide some [sample configurations for various
editors](https://github.com/rust-lang/rust/tree/master/src/etc).
editors](https://github.com/rust-lang/rust/tree/master/src/etc/CONFIGS.md).

The second point is the `println!()` part. This is calling a Rust *macro*,
which is how metaprogramming is done in Rust. If it were a function instead, it
Expand Down
10 changes: 10 additions & 0 deletions src/doc/trpl/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ If present, arguments passed as `#![plugin(foo(... args ...))]` are not
interpreted by rustc itself. They are provided to the plugin through the
`Registry`'s [`args` method](../rustc/plugin/registry/struct.Registry.html#method.args).

In the vast majority of cases, a plugin should *only* be used through
`#![plugin]` and not through an `extern crate` item. Linking a plugin would
pull in all of libsyntax and librustc as dependencies of your crate. This is
generally unwanted unless you are building another plugin. The
`plugin_as_library` lint checks these guidelines.

The usual practice is to put compiler plugins in their own crate, separate from
any `macro_rules!` macros or ordinary Rust code meant to be used by consumers
of a library.

# Syntax extensions

Plugins can extend Rust's syntax in various ways. One kind of syntax extension
Expand Down
5 changes: 5 additions & 0 deletions src/doc/trpl/variable-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ let x: i32 = 5;
If I asked you to read this out loud to the rest of the class, you'd say "`x`
is a binding with the type `i32` and the value `five`."

In this case we chose to represent `x` as a 32-bit signed integer. Rust has
many different primitive integer types. They begin with `i` for signed integers
and `u` for unsigned integers. The possible integer sizes are 8, 16, 32, and 64
bits.

In future examples, we may annotate the type in a comment. The examples will
look like this:

Expand Down
10 changes: 10 additions & 0 deletions src/etc/CONFIGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Configs

Here are some links to repos with configs which ease the use of rust:

* [rust.vim](https://github.com/rust-lang/rust.vim)
* [emacs rust-mode](https://github.com/rust-lang/rust-mode)
* [gedit-config](https://github.com/rust-lang/gedit-config)
* [kate-config](https://github.com/rust-lang/kate-config)
* [nano-config](https://github.com/rust-lang/nano-config)
* [zsh-config](https://github.com/rust-lang/zsh-config)
3 changes: 3 additions & 0 deletions src/etc/rustup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ create_tmp_dir() {
echo $TMP_DIR
}

# Make `tr` locale independent
LC_CTYPE=C

probe_need CFG_CURL curl
probe_need CFG_TAR tar
probe_need CFG_FILE file
Expand Down
24 changes: 24 additions & 0 deletions src/libcollections/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ impl<T: Ord> FromIterator<T> for BinaryHeap<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T: Ord> IntoIterator for BinaryHeap<T> {
type IntoIter = IntoIter<T>;

Expand All @@ -663,6 +665,18 @@ impl<T: Ord> IntoIterator for BinaryHeap<T> {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<T: Ord> IntoIterator for BinaryHeap<T> {
type Item = T;
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
type IntoIter = Iter<'a, T>;

Expand All @@ -671,6 +685,16 @@ impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a, T> IntoIterator for &'a BinaryHeap<T> where T: Ord {
type Item = &'a T;
type IntoIter = Iter<'a, T>;

fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> Extend<T> for BinaryHeap<T> {
fn extend<Iter: Iterator<Item=T>>(&mut self, iter: Iter) {
Expand Down
24 changes: 24 additions & 0 deletions src/libcollections/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,8 @@ impl<'a> RandomAccessIterator for Iter<'a> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a> IntoIterator for &'a Bitv {
type IntoIter = Iter<'a>;

Expand All @@ -1078,6 +1080,16 @@ impl<'a> IntoIterator for &'a Bitv {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a> IntoIterator for &'a Bitv {
type Item = bool;
type IntoIter = Iter<'a>;

fn into_iter(self) -> Iter<'a> {
self.iter()
}
}

/// An implementation of a set using a bit vector as an underlying
/// representation for holding unsigned numerical elements.
///
Expand Down Expand Up @@ -1882,6 +1894,8 @@ impl<'a> Iterator for SymmetricDifference<'a> {
#[inline] fn size_hint(&self) -> (usize, Option<usize>) { self.0.size_hint() }
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a> IntoIterator for &'a BitvSet {
type IntoIter = SetIter<'a>;

Expand All @@ -1890,6 +1904,16 @@ impl<'a> IntoIterator for &'a BitvSet {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a> IntoIterator for &'a BitvSet {
type Item = usize;
type IntoIter = SetIter<'a>;

fn into_iter(self) -> SetIter<'a> {
self.iter()
}
}

#[cfg(test)]
mod tests {
use prelude::*;
Expand Down
36 changes: 36 additions & 0 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<K, V> IntoIterator for BTreeMap<K, V> {
type IntoIter = IntoIter<K, V>;

Expand All @@ -470,6 +472,18 @@ impl<K, V> IntoIterator for BTreeMap<K, V> {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<K, V> IntoIterator for BTreeMap<K, V> {
type Item = (K, V);
type IntoIter = IntoIter<K, V>;

fn into_iter(self) -> IntoIter<K, V> {
self.into_iter()
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
type IntoIter = Iter<'a, K, V>;

Expand All @@ -478,6 +492,18 @@ impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
type Item = (&'a K, &'a V);
type IntoIter = Iter<'a, K, V>;

fn into_iter(self) -> Iter<'a, K, V> {
self.iter()
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
type IntoIter = IterMut<'a, K, V>;

Expand All @@ -486,6 +512,16 @@ impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
type Item = (&'a K, &'a mut V);
type IntoIter = IterMut<'a, K, V>;

fn into_iter(mut self) -> IterMut<'a, K, V> {
self.iter_mut()
}
}

/// A helper enum useful for deciding whether to continue a loop since we can't
/// return from a closure
enum Continuation<A, B> {
Expand Down
24 changes: 24 additions & 0 deletions src/libcollections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ impl<T: Ord> FromIterator<T> for BTreeSet<T> {
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<T> IntoIterator for BTreeSet<T> {
type IntoIter = IntoIter<T>;

Expand All @@ -488,6 +490,18 @@ impl<T> IntoIterator for BTreeSet<T> {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<T> IntoIterator for BTreeSet<T> {
type Item = T;
type IntoIter = IntoIter<T>;

fn into_iter(self) -> IntoIter<T> {
self.into_iter()
}
}

// NOTE(stage0): remove impl after a snapshot
#[cfg(stage0)]
impl<'a, T> IntoIterator for &'a BTreeSet<T> {
type IntoIter = Iter<'a, T>;

Expand All @@ -496,6 +510,16 @@ impl<'a, T> IntoIterator for &'a BTreeSet<T> {
}
}

#[cfg(not(stage0))] // NOTE(stage0): remove cfg after a snapshot
impl<'a, T> IntoIterator for &'a BTreeSet<T> {
type Item = &'a T;
type IntoIter = Iter<'a, T>;

fn into_iter(self) -> Iter<'a, T> {
self.iter()
}
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> Extend<T> for BTreeSet<T> {
#[inline]
Expand Down
Loading