]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoUpgrade to rust-llvm-2016-07-09
Jan-Erik Rediger [Tue, 12 Jul 2016 22:29:47 +0000 (00:29 +0200)]
Upgrade to rust-llvm-2016-07-09

7 years agoAuto merge of #34967 - TimNN:mipsel-musl-soft-float, r=alexcrichton
bors [Fri, 29 Jul 2016 01:31:54 +0000 (18:31 -0700)]
Auto merge of #34967 - TimNN:mipsel-musl-soft-float, r=alexcrichton

switch mipsel-musl to soft float

Closes #34922.

r? @alexcrichton

7 years agoAuto merge of #34956 - nikomatsakis:incr-comp-o-files, r=mw
bors [Thu, 28 Jul 2016 21:17:54 +0000 (14:17 -0700)]
Auto merge of #34956 - nikomatsakis:incr-comp-o-files, r=mw

Enable reuse of `.o` files if nothing has changed

This PR completes a first "spike" for incremental compilation by enabling us to reuse `.o` files when nothing has changed. When in incr. mode, we will save `.o` files into the temporary directory, then copy them back out again if they are still valid. The code is still a bit rough but it does seem to work. =)

r? @michaelwoerister

Fixes #34036
Fixes #34037
Fixes #34038

7 years agomake it possible to track where hash diverges
Niko Matsakis [Thu, 28 Jul 2016 19:39:34 +0000 (15:39 -0400)]
make it possible to track where hash diverges

7 years agohash def-path's better
Niko Matsakis [Thu, 28 Jul 2016 19:39:02 +0000 (15:39 -0400)]
hash def-path's better

actually we shouldn't even hash nested items at all, but that is
addressed in a followup PR

7 years agoAuto merge of #34485 - tbu-:pr_unicode_debug_str, r=alexcrichton
bors [Thu, 28 Jul 2016 18:20:33 +0000 (11:20 -0700)]
Auto merge of #34485 - tbu-:pr_unicode_debug_str, r=alexcrichton

Escape fewer Unicode codepoints in `Debug` impl of `str`

Use the same procedure as Python to determine whether a character is
printable, described in [PEP 3138]. In particular, this means that the
following character classes are escaped:

- Cc (Other, Control)
- Cf (Other, Format)
- Cs (Other, Surrogate), even though they can't appear in Rust strings
- Co (Other, Private Use)
- Cn (Other, Not Assigned)
- Zl (Separator, Line)
- Zp (Separator, Paragraph)
- Zs (Separator, Space), except for the ASCII space `' '` `0x20`

This allows for user-friendly inspection of strings that are not
English (e.g. compare `"\u{e9}\u{e8}\u{ea}"` to `"éèê"`).

Fixes #34318.
CC #34422.

[PEP 3138]: https://www.python.org/dev/peps/pep-3138/

7 years agoKeep multiple files per work-product
Niko Matsakis [Mon, 25 Jul 2016 14:51:14 +0000 (10:51 -0400)]
Keep multiple files per work-product

In the older version, a `.o` and ` .bc` file were separate
work-products.  This newer version keeps, for each codegen-unit, a set
of files of different kinds. We assume that if any kinds are available
then all the kinds we need are available, since the precise set of
switches will depend on attributes and command-line switches.

Should probably test this: the effect of changing attributes in
particular might not be successfully tracked?

7 years agoAddress mw nits
Niko Matsakis [Fri, 22 Jul 2016 14:39:30 +0000 (10:39 -0400)]
Address mw nits

7 years agoAdd a testing mechanism and a simple spike test
Niko Matsakis [Thu, 21 Jul 2016 16:50:15 +0000 (12:50 -0400)]
Add a testing mechanism and a simple spike test

7 years agoModify trans to skip generating `.o` files
Niko Matsakis [Thu, 21 Jul 2016 16:49:59 +0000 (12:49 -0400)]
Modify trans to skip generating `.o` files

This checks the `previous_work_products` data from the dep-graph and
tries to simply copy a `.o` file if possible.  We also add new
work-products into the dep-graph, and create edges to/from the dep-node
for a work-product.

7 years agoCode to save/load the work-products map from disk
Niko Matsakis [Thu, 21 Jul 2016 16:44:59 +0000 (12:44 -0400)]
Code to save/load the work-products map from disk

Work products are deleted if any of their inputs are dirty.

7 years agoStore `crate_disambiguator` as an `InternedString`
Niko Matsakis [Thu, 21 Jul 2016 16:41:29 +0000 (12:41 -0400)]
Store `crate_disambiguator` as an `InternedString`

We used to use `Name`, but the session outlives the tokenizer, which
means that attempts to read this field after trans has complete
otherwise panic. All reads want an `InternedString` anyhow.

7 years agoExtend DepGraph so it can track "work-products"
Niko Matsakis [Thu, 21 Jul 2016 16:33:23 +0000 (12:33 -0400)]
Extend DepGraph so it can track "work-products"

A work product right now is just a `.o` file. In the future it probably
includes other kinds of files, such as `.bc` files saving the
unoptimized LLVM IR.

However, because WorkProductIds must be independent of DefIds, so that
they don't need translation, this system may not be suitable *as is* for
storing fine-grained information (such as the MIR for individual defs),
as it was originally intended. We will want to refactor some for that.

7 years agoAuto merge of #35086 - Manishearth:rollup, r=Manishearth
bors [Thu, 28 Jul 2016 15:19:33 +0000 (08:19 -0700)]
Auto merge of #35086 - Manishearth:rollup, r=Manishearth

Rollup of 7 pull requests

- Successful merges: #34951, #34963, #34969, #35013, #35037, #35040, #35058
- Failed merges:

7 years agoRollup merge of #35040 - soltanmm:couple-is-a-pun, r=nikomatsakis
Manish Goregaokar [Thu, 28 Jul 2016 10:50:11 +0000 (16:20 +0530)]
Rollup merge of #35040 - soltanmm:couple-is-a-pun, r=nikomatsakis

Use &mut for `CombineFields` in inference relations

Because dropping obligations on the floor makes a mess.

r? @nikomatsakis

7 years agoRollup merge of #35037 - ollie27:rustdoc_tuple_struct_where, r=alexcrichton
Manish Goregaokar [Thu, 28 Jul 2016 10:50:11 +0000 (16:20 +0530)]
Rollup merge of #35037 - ollie27:rustdoc_tuple_struct_where, r=alexcrichton

rustdoc: Fix tuple struct where clause rendering

For tuple structs the where clause comes after the definition.

Fixes #34928

7 years agoRollup merge of #35013 - tamird:coerce-match-valgrind, r=alexcrichton
Manish Goregaokar [Thu, 28 Jul 2016 10:50:11 +0000 (16:20 +0530)]
Rollup merge of #35013 - tamird:coerce-match-valgrind, r=alexcrichton

move coerce-match{,-calls} into run-pass-valgrind

Closes #21696.

7 years agoRollup merge of #34969 - jseyfried:fix_cfg_feature, r=nrc
Manish Goregaokar [Thu, 28 Jul 2016 10:50:10 +0000 (16:20 +0530)]
Rollup merge of #34969 - jseyfried:fix_cfg_feature, r=nrc

Avoid processing `feature`s on unconfigured crates

Fixes #34932, a regression caused by #34272.
r? @nrc

7 years agoRollup merge of #34963 - petrochenkov:useerr, r=jseyfried
Manish Goregaokar [Thu, 28 Jul 2016 10:50:10 +0000 (16:20 +0530)]
Rollup merge of #34963 - petrochenkov:useerr, r=jseyfried

resolve: Fix ICE and extra diagnostics happening when unresolved imports are used in patterns

Closes https://github.com/rust-lang/rust/issues/34933

r? @jseyfried

7 years agoRollup merge of #34951 - tomgarcia:covariant-vec, r=brson
Manish Goregaokar [Thu, 28 Jul 2016 10:50:10 +0000 (16:20 +0530)]
Rollup merge of #34951 - tomgarcia:covariant-vec, r=brson

Make vec::Drain and binary_heap::Drain covariant

I removed all mutable pointers/references, and added covariance tests similar to the ones in #32635. It builds and passes the tests, but I noticed that there weren't any tests of Drain's behaviour (at least not in libcollectionstest), so I'm not sure if my changes accidently broke Drain's behaviour. Should I add some tests for that (and if so, what should the tests include)?

7 years agoAuto merge of #34951 - tomgarcia:covariant-vec, r=brson
bors [Thu, 28 Jul 2016 12:24:31 +0000 (05:24 -0700)]
Auto merge of #34951 - tomgarcia:covariant-vec, r=brson

Make vec::Drain and binary_heap::Drain covariant

I removed all mutable pointers/references, and added covariance tests similar to the ones in #32635. It builds and passes the tests, but I noticed that there weren't any tests of Drain's behaviour (at least not in libcollectionstest), so I'm not sure if my changes accidently broke Drain's behaviour. Should I add some tests for that (and if so, what should the tests include)?

7 years agoAuto merge of #34908 - jseyfried:improve_tt_matchers, r=nrc
bors [Thu, 28 Jul 2016 07:01:54 +0000 (00:01 -0700)]
Auto merge of #34908 - jseyfried:improve_tt_matchers, r=nrc

macros: Improve `tt` matchers

Fixes #5846, fixes #22819.
r? @nrc

7 years agoAdd regression test
Jeffrey Seyfried [Sun, 17 Jul 2016 18:28:48 +0000 (18:28 +0000)]
Add regression test

7 years agoAuto merge of #34946 - alexcrichton:fix-cfg, r=brson
bors [Thu, 28 Jul 2016 01:58:04 +0000 (18:58 -0700)]
Auto merge of #34946 - alexcrichton:fix-cfg, r=brson

std: Fix usage of SOCK_CLOEXEC

This code path was intended to only get executed on Linux, but unfortunately the
`cfg!` was malformed so it actually never got executed.

7 years agoRename `char::escape` to `char::escape_debug` and add tracking issue
Tobias Bucher [Wed, 27 Jul 2016 10:10:31 +0000 (12:10 +0200)]
Rename `char::escape` to `char::escape_debug` and add tracking issue

7 years agoAuto merge of #34907 - arielb1:found-parse-error, r=nikomatsakis
bors [Wed, 27 Jul 2016 21:28:06 +0000 (14:28 -0700)]
Auto merge of #34907 - arielb1:found-parse-error, r=nikomatsakis

Centralize and clean type error reporting

Refactors the code that handles type errors to be cleaner and fixes various edge cases.

This made the already-bad "type mismatch resolving" error message somewhat uglier. I want to fix that in another commit before this PR is merged.

Fixes #31173

r? @jonathandturner, cc @nikomatsakis

7 years agoAuto merge of #34856 - jseyfried:refactor_reset_tls, r=nrc
bors [Wed, 27 Jul 2016 17:16:36 +0000 (10:16 -0700)]
Auto merge of #34856 - jseyfried:refactor_reset_tls, r=nrc

Avoid reseting the thread local interner at the beginning of `phase_1_parse_input`

The thread local interner is used before `phase_1_parse_input` to create `InternedString`s, which currently wrap `Rc<String>`s. Once `InternedString` is refactored to be an interned string id (like `Name`), resetting will invalidate everything that was interned before `phase_1_parse_input`.

The resets were only useful for the `rusti` project, which can now use `driver::reset_thread_local_state`.

r? @nrc

7 years agoAuto merge of #33363 - japaric:target, r=japaric
bors [Wed, 27 Jul 2016 12:50:27 +0000 (05:50 -0700)]
Auto merge of #33363 - japaric:target, r=japaric

fix built-in target detection

previously the logic was accepting wrong triples (like
`x86_64_unknown-linux-musl`) as valid ones (like `x86_64-unknown-linux-musl`) if
they contained an underscore instead of a dash.

fixes #33329

---

r? @brson

I wanted to use a compile-fail test at first. But, you can't pass an extra `--target` flag to `rustc` for those because they already call `rustc --target $HOST` so you get a `error: Option 'target' given more than once.`. The run-make test used here works fine though.

7 years agoAuto merge of #33312 - Byron:double-ended-iterator-for-args, r=alexcrichton
bors [Wed, 27 Jul 2016 09:26:37 +0000 (02:26 -0700)]
Auto merge of #33312 - Byron:double-ended-iterator-for-args, r=alexcrichton

DoubleEndedIterator for Args

This PR implements the DoubleEndedIterator trait for the `std::env::Args[Os]` structure, as well
as the internal implementations.

It is primarily motivated by me, as I happened to implement a simple `reversor` program many times
now, which so far had to use code like this:

```Rust
for arg in std::env::args().skip(1).collect::<Vec<_>>().iter().rev() {}
```

... even though I would have loved to do this instead:

```Rust
for arg in std::env::args().skip(1).rev() {}
```

The latter is more natural, and I did not find a reason for not implementing it.
After all, on every system, the number of arguments passed to the program are known
at runtime.

To my mind, it follows KISS, and does not try to be smart at all. Also, there are no unit-tests,
primarily as I did not find any existing tests for the `Args` struct either.

The windows implementation is basically a copy-pasted variant of the `next()` method implementation,
and I could imagine sharing most of the code instead. Actually I would be happy if the reviewer would
ask for it.

7 years agoAuto merge of #35053 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 27 Jul 2016 03:52:24 +0000 (20:52 -0700)]
Auto merge of #35053 - steveklabnik:rollup, r=steveklabnik

Rollup of 15 pull requests

- Successful merges: #34461, #34609, #34732, #34850, #34935, #34974, #34990, #34995, #35001, #35009, #35010, #35019, #35028, #35029, #35043
- Failed merges:

7 years agoAuto merge of #35014 - vadimcn:travis-test, r=alexcrichton
bors [Wed, 27 Jul 2016 00:07:08 +0000 (17:07 -0700)]
Auto merge of #35014 - vadimcn:travis-test, r=alexcrichton

Fix Travis tests

r? @vadimcn

7 years agoRollup merge of #35043 - rahiel:patch-1, r=nikomatsakis
Steve Klabnik [Tue, 26 Jul 2016 21:21:14 +0000 (17:21 -0400)]
Rollup merge of #35043 - rahiel:patch-1, r=nikomatsakis

doc/book/trait-objects: remove empty lines at start of examples

I think it looks better without them.

7 years agoRollup merge of #35029 - eulerdisk:fix_missing_comma_in_csv_dumper, r=nrc
Steve Klabnik [Tue, 26 Jul 2016 21:21:14 +0000 (17:21 -0400)]
Rollup merge of #35029 - eulerdisk:fix_missing_comma_in_csv_dumper, r=nrc

Fixed missing comma in the csv dumper.

Added missing comma before `file_line_end`.

r? @nrc

7 years agoRollup merge of #35028 - abhijeetbhagat:patch-6, r=alexcrichton
Steve Klabnik [Tue, 26 Jul 2016 21:21:13 +0000 (17:21 -0400)]
Rollup merge of #35028 - abhijeetbhagat:patch-6, r=alexcrichton

Remove no_stack_check tests (#34915)

Part of fixes for #34915

7 years agoRollup merge of #35019 - frewsxcv:slice-split, r=GuillaumeGomez
Steve Klabnik [Tue, 26 Jul 2016 21:21:13 +0000 (17:21 -0400)]
Rollup merge of #35019 - frewsxcv:slice-split, r=GuillaumeGomez

Rewrite/expansion of `slice::split` doc examples.

None

7 years agoRollup merge of #35010 - GuillaumeGomez:file_doc, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:13 +0000 (17:21 -0400)]
Rollup merge of #35010 - GuillaumeGomez:file_doc, r=steveklabnik

Improve Open doc

Part of #29356.

r? @steveklabnik

7 years agoRollup merge of #35009 - GuillaumeGomez:dir_entry_doc, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:13 +0000 (17:21 -0400)]
Rollup merge of #35009 - GuillaumeGomez:dir_entry_doc, r=steveklabnik

Dir entry doc

Part of #29356.

r? @steveklabnik

7 years agoRollup merge of #35001 - rdwilliamson:patch-1, r=alexcrichton
Steve Klabnik [Tue, 26 Jul 2016 21:21:13 +0000 (17:21 -0400)]
Rollup merge of #35001 - rdwilliamson:patch-1, r=alexcrichton

Fix HashMap's values_mut example to use println!

Fix HashMap's values_mut example to use println!

7 years agoRollup merge of #34995 - GuillaumeGomez:dir_builder_doc, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:12 +0000 (17:21 -0400)]
Rollup merge of #34995 - GuillaumeGomez:dir_builder_doc, r=steveklabnik

Add DirBuilder doc examples

r? @steveklabnik

Part of #29329 and of #29356.

7 years agoRollup merge of #34990 - abhijeetbhagat:patch-3, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:12 +0000 (17:21 -0400)]
Rollup merge of #34990 - abhijeetbhagat:patch-3, r=steveklabnik

Update underscore usage (#34903)

7 years agoRollup merge of #34974 - abhijeetbhagat:patch-2, r=GuillaumeGomez
Steve Klabnik [Tue, 26 Jul 2016 21:21:12 +0000 (17:21 -0400)]
Rollup merge of #34974 - abhijeetbhagat:patch-2, r=GuillaumeGomez

Update VecDeque documentation to specify direction of index 0 (#34920)

I mentioned the direction for all the methods that work with an index

7 years agoRollup merge of #34935 - GuillaumeGomez:hash_map_doc, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:12 +0000 (17:21 -0400)]
Rollup merge of #34935 - GuillaumeGomez:hash_map_doc, r=steveklabnik

Add HashMap Entry enums examples

Part of #29348.

r? @steveklabnik

7 years agoRollup merge of #34850 - tshepang:patch-3, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:11 +0000 (17:21 -0400)]
Rollup merge of #34850 - tshepang:patch-3, r=steveklabnik

doc: add missing pause

7 years agoRollup merge of #34732 - durka:patch-27, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:11 +0000 (17:21 -0400)]
Rollup merge of #34732 - durka:patch-27, r=steveklabnik

document DoubleEndedIterator::next_back

document DoubleEndedIterator::next_back

fixes #34726

7 years agoRollup merge of #34609 - ubsan:transmute_docs, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:11 +0000 (17:21 -0400)]
Rollup merge of #34609 - ubsan:transmute_docs, r=steveklabnik

Add more docs - mostly warnings - to std::mem::transmute

7 years agoRollup merge of #34461 - ubsan:master, r=steveklabnik
Steve Klabnik [Tue, 26 Jul 2016 21:21:10 +0000 (17:21 -0400)]
Rollup merge of #34461 - ubsan:master, r=steveklabnik

Fix ABI string docs in reference.md

7 years agoAuto merge of #34983 - alexcrichton:windows-flaky, r=brson
bors [Tue, 26 Jul 2016 20:51:34 +0000 (13:51 -0700)]
Auto merge of #34983 - alexcrichton:windows-flaky, r=brson

std: Ignore tests where threads outlive main

Long ago we discovered that threads which outlive main and then exit while the
rest of the program is exiting causes Windows to hang (#20704). That's what was
happening in this test so let's just not run this test any more.

7 years agoRestore `char::escape_default` and add `char::escape` instead
Tobias Bucher [Mon, 25 Jul 2016 23:39:54 +0000 (01:39 +0200)]
Restore `char::escape_default` and add `char::escape` instead

7 years agoDoubleEndedIterator for Args
Sebastian Thiel [Sat, 30 Apr 2016 14:37:44 +0000 (16:37 +0200)]
DoubleEndedIterator for Args

The number of arguments given to a process is always known, which
makes implementing DoubleEndedIterator possible.

That way, the Iterator::rev() method becomes usable, among others.

Signed-off-by: Sebastian Thiel <byronimo@gmail.com>
Tidy for DoubleEndedIterator

I chose to not create a new feature for it, even though
technically, this makes me lie about the original availability
of the implementation.

Verify with @alexchrichton

Setup feature flag for new std::env::Args iterators

Add test for Args reverse iterator

It's somewhat depending on the input of the test program,
but made in such a way that should be somewhat flexible to changes
to the way it is called.

Deduplicate windows ArgsOS code for DEI

DEI = DoubleEndedIterator

Move env::args().rev() test to run-pass

It must be controlling it's arguments for full isolation.

Remove superfluous feature name

Assert all arguments returned by env::args().rev()

Let's be very sure it works as we expect, why take chances.

Fix rval of os_string_from_ptr

A trait cannot be returned, but only the corresponding object.

Deref pointers to actually operate on the argument

Put unsafe to correct location

7 years agodoc/book/trait-objects: remove empty lines at start of examples
Rahiel Kasim [Tue, 26 Jul 2016 09:14:46 +0000 (11:14 +0200)]
doc/book/trait-objects: remove empty lines at start of examples

7 years agoTidy up
Masood Malekghassemi [Tue, 26 Jul 2016 00:46:01 +0000 (17:46 -0700)]
Tidy up

7 years agoUse &mut for CombineFields in inference relations
Masood Malekghassemi [Mon, 25 Jul 2016 23:37:30 +0000 (16:37 -0700)]
Use &mut for CombineFields in inference relations

7 years agoMove `a_is_expected` out of `CombineFields`
Masood Malekghassemi [Mon, 25 Jul 2016 22:07:57 +0000 (15:07 -0700)]
Move `a_is_expected` out of `CombineFields`

7 years agoRename infcx lifetimes in inference relations
Masood Malekghassemi [Mon, 25 Jul 2016 21:19:14 +0000 (14:19 -0700)]
Rename infcx lifetimes in inference relations

7 years agoRewrite/expansion of `slice::split` doc examples.
Corey Farwell [Mon, 25 Jul 2016 02:10:36 +0000 (22:10 -0400)]
Rewrite/expansion of `slice::split` doc examples.

7 years agoWeaken test `compile-fail/lifetime-inference-give-expl-lifetime-param`.
Jeffrey Seyfried [Fri, 22 Jul 2016 16:44:09 +0000 (09:44 -0700)]
Weaken test `compile-fail/lifetime-inference-give-expl-lifetime-param`.

7 years agoUnpublicize inference relations
Masood Malekghassemi [Mon, 25 Jul 2016 20:08:48 +0000 (13:08 -0700)]
Unpublicize inference relations

7 years agorustdoc: Fix tuple struct where clause rendering
Oliver Middleton [Mon, 25 Jul 2016 17:19:11 +0000 (18:19 +0100)]
rustdoc: Fix tuple struct where clause rendering

For tuple structs the where clause comes after the definition.

7 years agoLooser LSDA parsing
Vadim Chugunov [Mon, 25 Jul 2016 05:09:56 +0000 (22:09 -0700)]
Looser LSDA parsing

7 years agoFixed missing comma in the csv dumper.
Andrea Pretto [Mon, 25 Jul 2016 09:46:59 +0000 (11:46 +0200)]
Fixed missing comma in the csv dumper.

7 years agoRemove no_stack_check tests (#34915)
abhi [Mon, 25 Jul 2016 09:30:32 +0000 (15:00 +0530)]
Remove no_stack_check tests (#34915)

Part of fixes for #34915

7 years agoadd include ../tools.mk to the Makefile
Jorge Aparicio [Fri, 22 Jul 2016 22:11:38 +0000 (17:11 -0500)]
add include ../tools.mk to the Makefile

7 years agomove coerce-match{,-calls} into run-pass-valgrind
Tamir Duberstein [Sun, 24 Jul 2016 19:49:26 +0000 (15:49 -0400)]
move coerce-match{,-calls} into run-pass-valgrind

Closes #21696.

7 years agoAuto merge of #35006 - Manishearth:rollup, r=Manishearth
bors [Sun, 24 Jul 2016 18:42:06 +0000 (11:42 -0700)]
Auto merge of #35006 - Manishearth:rollup, r=Manishearth

Rollup of 7 pull requests

- Successful merges: #34965, #34972, #34975, #34976, #34977, #34988, #34989
- Failed merges:

7 years agoImprove Open doc
Guillaume Gomez [Sun, 24 Jul 2016 15:00:49 +0000 (17:00 +0200)]
Improve Open doc

7 years agoAdd DirEntry doc examples
Guillaume Gomez [Sun, 24 Jul 2016 14:52:28 +0000 (16:52 +0200)]
Add DirEntry doc examples

7 years agoAdd missing links
Guillaume Gomez [Sun, 24 Jul 2016 14:07:06 +0000 (16:07 +0200)]
Add missing links

7 years agoRollup merge of #34989 - frewsxcv:fix-set-len-doc-example, r=nagisa
Manish Goregaokar [Sun, 24 Jul 2016 09:48:48 +0000 (15:18 +0530)]
Rollup merge of #34989 - frewsxcv:fix-set-len-doc-example, r=nagisa

Fix incorrect 'memory leak' example for `Vec::set_len`.

Example was written in https://github.com/rust-lang/rust/pull/34911

Issue was brought up in this comment:

https://github.com/rust-lang/rust/commit/a005b2cd2ac679da7393e537aa05e2b7d32d36d5#commitcomment-18346958

7 years agoRollup merge of #34988 - frewsxcv:vec-windows, r=GuillaumeGomez
Manish Goregaokar [Sun, 24 Jul 2016 09:48:48 +0000 (15:18 +0530)]
Rollup merge of #34988 - frewsxcv:vec-windows, r=GuillaumeGomez

Doc example improvements for `slice::windows`.

* Modify existing example to not rely on printing to see results
* Add an example demonstrating when slice is shorter than `size`

7 years agoRollup merge of #34977 - wettowelreactor:patch-3, r=steveklabnik
Manish Goregaokar [Sun, 24 Jul 2016 09:48:48 +0000 (15:18 +0530)]
Rollup merge of #34977 - wettowelreactor:patch-3, r=steveklabnik

Fixed to spelling errors in char.rs

Fixed two small spelling mistakes (interator -> iterator) in the documentation for encode_utf8 and encode_utf16

7 years agoRollup merge of #34976 - GuillaumeGomez:build_hasher_doc, r=steveklabnik
Manish Goregaokar [Sun, 24 Jul 2016 09:48:48 +0000 (15:18 +0530)]
Rollup merge of #34976 - GuillaumeGomez:build_hasher_doc, r=steveklabnik

Add BuildHasher example

r? @steveklabnik

7 years agoRollup merge of #34975 - GuillaumeGomez:random_state_doc, r=steveklabnik
Manish Goregaokar [Sun, 24 Jul 2016 09:48:47 +0000 (15:18 +0530)]
Rollup merge of #34975 - GuillaumeGomez:random_state_doc, r=steveklabnik

Add Random state doc

Last part of #29348.

r? @steveklabnik

7 years agoRollup merge of #34972 - oli-obk:cant_cast_str_to_const_ptr, r=eddyb
Manish Goregaokar [Sun, 24 Jul 2016 09:48:47 +0000 (15:18 +0530)]
Rollup merge of #34972 - oli-obk:cant_cast_str_to_const_ptr, r=eddyb

improve const eval error reporting on "" and b"" casts

r? @eddyb

cc @ubsan

7 years agoRollup merge of #34965 - jonathandturner:multispan_cleanup, r=sanxiyn
Manish Goregaokar [Sun, 24 Jul 2016 09:48:47 +0000 (15:18 +0530)]
Rollup merge of #34965 - jonathandturner:multispan_cleanup, r=sanxiyn

Remove unused methods from MultiSpan

Removed a couple of unused methods from MultiSpan.  I thought about batching this with some other changes but wasn't sure when I'd get around to them, so PR for a tiny fix instead.

This can be rollup'd.

7 years agoFix HashMap's values_mut example to use println!
Robert Williamson [Sat, 23 Jul 2016 22:13:25 +0000 (16:13 -0600)]
Fix HashMap's values_mut example to use println!

7 years agomacros: Improve `tt` fragments
Jeffrey Seyfried [Sun, 17 Jul 2016 17:22:25 +0000 (17:22 +0000)]
macros: Improve `tt` fragments

7 years agoAuto merge of #34832 - vadimcn:rusty-personality, r=alexcrichton
bors [Sat, 23 Jul 2016 16:35:34 +0000 (09:35 -0700)]
Auto merge of #34832 - vadimcn:rusty-personality, r=alexcrichton

Implement rust_eh_personality in Rust, remove rust_eh_personality_catch.

Well, not quite: ARM EHABI platforms still use the old scheme -- for now.

r? @alexcrichton

7 years agoDoc example improvements for `slice::windows`.
Corey Farwell [Sat, 23 Jul 2016 00:23:25 +0000 (20:23 -0400)]
Doc example improvements for `slice::windows`.

* Modify existing example to not rely on printing to see results
* Add an example demonstrating when slice is shorter than `size`

7 years agoFix incorrect 'memory leak' example for `Vec::set_len`.
Corey Farwell [Sat, 23 Jul 2016 01:43:59 +0000 (21:43 -0400)]
Fix incorrect 'memory leak' example for `Vec::set_len`.

Example was written in https://github.com/rust-lang/rust/pull/34911

Issue was brought up in this comment:

https://github.com/rust-lang/rust/commit/a005b2cd2ac679da7393e537aa05e2b7d32d36d5#commitcomment-18346958

7 years agoAuto merge of #34925 - jseyfried:nested_macros, r=eddyb
bors [Sat, 23 Jul 2016 11:01:05 +0000 (04:01 -0700)]
Auto merge of #34925 - jseyfried:nested_macros, r=eddyb

Support nested `macro_rules!`

Fixes #6994.
r? @eddyb

7 years agoUpdate underscore usage (#34903)
abhi [Sat, 23 Jul 2016 07:45:09 +0000 (13:15 +0530)]
Update underscore usage (#34903)

7 years agoAdd DirBuilder doc examples
Guillaume Gomez [Fri, 22 Jul 2016 23:57:21 +0000 (01:57 +0200)]
Add DirBuilder doc examples

7 years agostd: Ignore tests where threads outlive main
Alex Crichton [Fri, 22 Jul 2016 23:21:51 +0000 (16:21 -0700)]
std: Ignore tests where threads outlive main

Long ago we discovered that threads which outlive main and then exit while the
rest of the program is exiting causes Windows to hang (#20704). That's what was
happening in this test so let's just not run this test any more.

7 years agoFix run-pass/ifmt test
Tobias Bucher [Wed, 29 Jun 2016 09:35:40 +0000 (11:35 +0200)]
Fix run-pass/ifmt test

7 years agoFix indentation in src/libcore/lib.rs
Tobias Bucher [Sun, 26 Jun 2016 13:23:44 +0000 (15:23 +0200)]
Fix indentation in src/libcore/lib.rs

7 years agoEscape fewer Unicode codepoints in `Debug` impl of `str`
Tobias Bucher [Sun, 26 Jun 2016 13:11:48 +0000 (15:11 +0200)]
Escape fewer Unicode codepoints in `Debug` impl of `str`

Use the same procedure as Python to determine whether a character is
printable, described in [PEP 3138]. In particular, this means that the
following character classes are escaped:

- Cc (Other, Control)
- Cf (Other, Format)
- Cs (Other, Surrogate), even though they can't appear in Rust strings
- Co (Other, Private Use)
- Cn (Other, Not Assigned)
- Zl (Separator, Line)
- Zp (Separator, Paragraph)
- Zs (Separator, Space), except for the ASCII space `' '` (`0x20`)

This allows for user-friendly inspection of strings that are not
English (e.g. compare `"\u{e9}\u{e8}\u{ea}"` to `"éèê"`).

Fixes #34318.

[PEP 3138]: https://www.python.org/dev/peps/pep-3138/

7 years agoImplement rust_eh_personality in Rust, remove rust_eh_personality_catch.
Vadim Chugunov [Fri, 22 Jul 2016 21:57:54 +0000 (14:57 -0700)]
Implement rust_eh_personality in Rust, remove rust_eh_personality_catch.

Well, not quite: ARM EHABI platforms still use the old scheme -- for now.

7 years agoaddress review comments
Ariel Ben-Yehuda [Fri, 22 Jul 2016 20:52:53 +0000 (23:52 +0300)]
address review comments

I split the RFC1592 commit out

7 years agoAdd regression test.
Jeffrey Seyfried [Thu, 21 Jul 2016 23:03:13 +0000 (23:03 +0000)]
Add regression test.

7 years agoAdd E0559 error explanation
ggomez [Thu, 21 Jul 2016 14:47:05 +0000 (16:47 +0200)]
Add E0559 error explanation

7 years agoAdd E0560 error explanation
ggomez [Thu, 21 Jul 2016 14:18:12 +0000 (16:18 +0200)]
Add E0560 error explanation

7 years agoAdd new error codes in librustc_typeck
ggomez [Thu, 21 Jul 2016 14:07:08 +0000 (16:07 +0200)]
Add new error codes in librustc_typeck

7 years agouse diagnostic-mutating style for `note_type_err` too
Ariel Ben-Yehuda [Thu, 21 Jul 2016 17:12:30 +0000 (20:12 +0300)]
use diagnostic-mutating style for `note_type_err` too

that is much cleaner than the `type_err!` style I used earlier.

7 years agorustc_errors: fix a few bugs
Ariel Ben-Yehuda [Thu, 21 Jul 2016 17:12:04 +0000 (20:12 +0300)]
rustc_errors: fix a few bugs

7 years agoAuto merge of #34924 - cgswords:empty_delim, r=nrc
bors [Fri, 22 Jul 2016 18:30:29 +0000 (11:30 -0700)]
Auto merge of #34924 - cgswords:empty_delim, r=nrc

Added empty CloseDelim to tokens for future use.

Description says it all. I added a new DelimToken type, Empty, to indicate a Delimited tokenstream with no actual delimiters (which are variously useful for constructing macro output).

r? @nrc

7 years agoFixed to spelling errors in char.rs
Camille Roussel [Fri, 22 Jul 2016 14:48:19 +0000 (10:48 -0400)]
Fixed to spelling errors in char.rs

Fixed two small spelling mistakes (interator -> iterator) in the documentation for encode_utf8 and encode_utf16

7 years agoAdd BuildHasher example
ggomez [Fri, 22 Jul 2016 14:38:16 +0000 (16:38 +0200)]
Add BuildHasher example

7 years agoAuto merge of #34917 - michaelwoerister:fix-internalize-symbols, r=eddyb
bors [Fri, 22 Jul 2016 14:25:06 +0000 (07:25 -0700)]
Auto merge of #34917 - michaelwoerister:fix-internalize-symbols, r=eddyb

Fix wrong condition in base::internalize_symbols().

Fix a typo that snuck into https://github.com/rust-lang/rust/pull/34899 (and completely broke `internalize_symbols()`).

7 years agoAdd Random state doc
ggomez [Fri, 22 Jul 2016 12:57:52 +0000 (14:57 +0200)]
Add Random state doc

7 years agoAdd HashMap Entry enums examples
ggomez [Wed, 20 Jul 2016 12:44:15 +0000 (14:44 +0200)]
Add HashMap Entry enums examples