]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMerge branch 'fix/doc/rel-prev-next' of https://github.com/vincentbernat/rust into...
Steve Klabnik [Thu, 16 Jul 2015 21:53:26 +0000 (17:53 -0400)]
Merge branch 'fix/doc/rel-prev-next' of https://github.com/vincentbernat/rust into rollup_central

8 years agoFix diagnostics name clash
Manish Goregaokar [Thu, 16 Jul 2015 11:49:08 +0000 (17:19 +0530)]
Fix diagnostics name clash

8 years agoFixup test
Manish Goregaokar [Thu, 16 Jul 2015 11:07:30 +0000 (16:37 +0530)]
Fixup test

8 years agoFixup #27046 with pattern bindings
Manish Goregaokar [Thu, 16 Jul 2015 09:51:59 +0000 (15:21 +0530)]
Fixup #27046 with pattern bindings

8 years agoRollup merge of #27046 - nrc:driver-defaults, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:45:34 +0000 (14:15 +0530)]
Rollup merge of #27046 - nrc:driver-defaults, r=alexcrichton

8 years agoRollup merge of #27039 - bluss:siphash-tests, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:45:11 +0000 (14:15 +0530)]
Rollup merge of #27039 - bluss:siphash-tests, r=alexcrichton

 core: Revive SipHash's tests

These tests were bitrotting, include them in the crate and bring them up
to date and compiling.. and they pass.

8 years agoRollup merge of #27030 - nrc:save-ctors, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:44:54 +0000 (14:14 +0530)]
Rollup merge of #27030 - nrc:save-ctors, r=alexcrichton

8 years agoRollup merge of #27019 - akiss77:pr-aarch64-morestack-section, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:44:34 +0000 (14:14 +0530)]
Rollup merge of #27019 - akiss77:pr-aarch64-morestack-section, r=alexcrichton

 When building for AArch64/Linux, __morestack ends up in the .note.GNU-stack section,
which causes missing references for the linker. By using the func/endfunc macros
from macros.S we get __morestack right to .text (and a bit more on the side).

8 years agoRollup merge of #27018 - arielb1:enum-update, r=eddyb
Manish Goregaokar [Thu, 16 Jul 2015 08:44:19 +0000 (14:14 +0530)]
Rollup merge of #27018 - arielb1:enum-update, r=eddyb

 Fixes #26948.

r? @eddyb

8 years agoRollup merge of #26988 - frewsxcv:regression-tests, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:44:04 +0000 (14:14 +0530)]
Rollup merge of #26988 - frewsxcv:regression-tests, r=alexcrichton

   "body": null,

8 years agoRollup merge of #26950 - AlisdairO:memset, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:43:38 +0000 (14:13 +0530)]
Rollup merge of #26950 - AlisdairO:memset, r=alexcrichton

 In general, it's undesirable to have read_to_end use a buffer with uninitialized memory, as that could lead to undefined behaviour in the event of a bad Read implementation.  Since we control the implementations of Read for Stdin and File, however, it should be okay for us to specialise them to improve performance.  This PR is to do that!

Adds some unsafe code to deal with creating the buffers.  Since the read_to_end function needed to be used from the io and fs crates, I moved it into a newly-created sys::common::io module.  Alternatively we could expose the new read_to_end functions to allow people to create their own read_to_end implementations for code they trust.

Benchmarks:

Read a 2.5MB file:
sys_common::io::tests::bench_init_file      ... bench:  27,473,317 ns/iter (+/- 2,490,767)
sys_common::io::tests::bench_uninit_file    ... bench:  25,611,793 ns/iter (+/- 2,137,387)

Read a buffer full of constant values
sys_common::io::tests::bench_uninitialized  ... bench:  12,877,645 ns/iter (+/- 931,025)
sys_common::io::tests::bench_zeroed         ... bench:  18,581,082 ns/iter (+/- 1,541,108)

So, approx a 7% speedup for file reading, which I think is worthwhile.

8 years agoRollup merge of #26898 - GuillaumeGomez:fixup, r=eddyb
Manish Goregaokar [Thu, 16 Jul 2015 08:43:25 +0000 (14:13 +0530)]
Rollup merge of #26898 - GuillaumeGomez:fixup, r=eddyb

 r? @eddyb

First part of the improvement. I then intend to improve resolve_error as indicated by @eddyb. Do not merge for now (please !).

8 years agoRollup merge of #26838 - P1start:refactor-diagnostic, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 08:43:10 +0000 (14:13 +0530)]
Rollup merge of #26838 - P1start:refactor-diagnostic, r=alexcrichton

8 years agoRollup merge of #26819 - P1start:ref-suggestion, r=nikomatsakis
Manish Goregaokar [Thu, 16 Jul 2015 08:42:57 +0000 (14:12 +0530)]
Rollup merge of #26819 - P1start:ref-suggestion, r=nikomatsakis

 The error now looks like this:

```
<anon>:4:9: 4:10 error: use of moved value: `x` [E0382]
<anon>:4     foo(x);
                 ^
<anon>:3:9: 3:10 note: `x` moved here because it has type `Box<i32>`, which is moved by default
<anon>:3     let y = x;
                 ^
<anon>:3:9: 3:10 help: use `ref` to take a reference instead:
<anon>:      let ref y = x;
```

8 years agoRollup merge of #27029 - nrc:save-pub-gen-code, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 05:19:37 +0000 (10:49 +0530)]
Rollup merge of #27029 - nrc:save-pub-gen-code, r=alexcrichton

8 years agoRollup merge of #27028 - Gankro:travis, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 05:19:23 +0000 (10:49 +0530)]
Rollup merge of #27028 - Gankro:travis, r=alexcrichton

 This has travis build LLVM and rustc up to stage1, but not run any tests. It seems wasteful to have the ultimate might of travis running on every PR just to check for whitespace errors. This is a pure subset of the bootstrap, so it shouldn't ever spuriously break.

`make tidy` still runs first, so we still get \"fast errors\" on bad style. However once make tidy passes, the build will simply keep running to try to make rustc. `tidy` takes ~3 mins to complete, so if your build runs longer you can be confident we've gone on to build LLVM/rustc. In principle this is configured to use ccache (it shows up in the build logs as uploaded/downloaded), but I found no actual performance changes in using it.

Maybe someone at @travis-ci knows what's up with that.

For reference, here is a successful build with ccache enabled: https://travis-ci.org/Gankro/rust/builds/70821237

and one without: https://travis-ci.org/Gankro/rust/builds/70812814

Builds seem to take about 41mins regardless.

r? @alexcrichton

8 years agoRollup merge of #27020 - goyox86:goyox86/fix-error-handling-snippet, r=steveklabnik
Manish Goregaokar [Thu, 16 Jul 2015 05:19:08 +0000 (10:49 +0530)]
Rollup merge of #27020 - goyox86:goyox86/fix-error-handling-snippet, r=steveklabnik

 This PR fixes a snippet of code on the error handling chapter of \"The Rust Programming Language\".

//cc @steveklabnik

The docs state that trying to compile the snippet will yield the following error:

```bash
anon>:13:5: 20:6 error: non-exhaustive patterns: `_` not covered [E0004]
```

But instead the error received is:

```bash
<anon>:22:46: 22:56 error: unresolved name `NewRelease`
<anon>:22     std::io::println(descriptive_probability(NewRelease));
                                                       ^~~~~~~~~~
<anon>:22:5: 22:21 error: unresolved name `std::io::println`
<anon>:22     std::io::println(descriptive_probability(NewRelease));
              ^~~~~~~~~~~~~~~~
error: aborting due to 2 previous errors
playpen: application terminated with error code 101
```

After applying this PR the expected error is returned:

```bash
anon>:13:5: 20:6 error: non-exhaustive patterns: `_` not covered [E0004]
<anon>:13     match probability(&event) {
<anon>:14         1.00 => \"certain\",
<anon>:15         0.00 => \"impossible\",
<anon>:16         0.00 ... 0.25 => \"very unlikely\",
<anon>:17         0.25 ... 0.50 => \"unlikely\",
<anon>:18         0.50 ... 0.75 => \"likely\",
          ...
<anon>:13:5: 20:6 help: see the detailed explanation for E0004
error: aborting due to previous error
```

8 years agoRollup merge of #27013 - michaelsproul:fix-E0303, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 05:18:58 +0000 (10:48 +0530)]
Rollup merge of #27013 - michaelsproul:fix-E0303, r=alexcrichton

 A merge in #24523  broke the explanation for E0303. This commit restores the previous version and also removes an erroneous `&` (which had nothing to do with the merge).

8 years agoRollup merge of #26977 - brson:stddoc, r=Gankro
Manish Goregaokar [Thu, 16 Jul 2015 05:18:47 +0000 (10:48 +0530)]
Rollup merge of #26977 - brson:stddoc, r=Gankro

 Yet another attempt to make the prose on the std crate page
clearer and more informative.

This does a lot of things: tightens up the opening, adds useful links
(including a link to the search bar), offers guidance on how to use
the docs, and expands the prelude docs as a useful newbie entrypoint.

r? @steveklabnik cc @aturon

8 years agoRollup merge of #26695 - rutsky:patch-2, r=Manishearth
Manish Goregaokar [Thu, 16 Jul 2015 05:18:36 +0000 (10:48 +0530)]
Rollup merge of #26695 - rutsky:patch-2, r=Manishearth

 r? @steveklabnik

8 years agoRollup merge of #26693 - rutsky:patch-1, r=Manishearth
Manish Goregaokar [Thu, 16 Jul 2015 05:18:28 +0000 (10:48 +0530)]
Rollup merge of #26693 - rutsky:patch-1, r=Manishearth

 r? @steveklabnik

8 years agoRollup merge of #27061 - tamird:patch-1, r=alexcrichton
Manish Goregaokar [Thu, 16 Jul 2015 05:18:10 +0000 (10:48 +0530)]
Rollup merge of #27061 - tamird:patch-1, r=alexcrichton

 It was removed in bba934f19ab26d5afc4f0be923ea699010883906.

Fixes #27059.

8 years agoRemove reference to gdb-pretty-struct-and-enums.rs
Tamir Duberstein [Thu, 16 Jul 2015 03:51:51 +0000 (23:51 -0400)]
Remove reference to gdb-pretty-struct-and-enums.rs

It was removed in bba934f19ab26d5afc4f0be923ea699010883906.

Fixes #27059.

8 years agodoc: add rel=prev/next for links to adjacent sections
Vincent Bernat [Wed, 15 Jul 2015 21:32:58 +0000 (23:32 +0200)]
doc: add rel=prev/next for links to adjacent sections

This help people using keyboard navigation or with disabilities to
easily browse through pagination. For example, in Vimium, a reader can
do `[[` or `]]` to browse through the pages.

8 years agoAdd specializations of read_to_end for Stdin, TcpStream and File,
Alisdair Owens [Fri, 10 Jul 2015 16:34:07 +0000 (17:34 +0100)]
Add specializations of read_to_end for Stdin, TcpStream and File,
allowing them to read into a buffer containing uninitialized data,
rather than pay the cost of zeroing.

8 years agoRatchet up travis to build stage1 and our own LLVM.
Alexis Beingessner [Tue, 14 Jul 2015 00:29:01 +0000 (17:29 -0700)]
Ratchet up travis to build stage1 and our own LLVM.

Tidy is still run first for failing fast on the easy stuff.

To accomplish this we have travis actually persist ccache across builds. This
has LLVM built within 6 minutes, and all of stage1 built within 18.
Caching should work on fresh PRs (cache acquired from the master branch).
Because all we persist is ccache, there is minimal danger of persisting corrupt
build state.

I had to mangle `configure` a bit to make --enable-ccache work when custom
compilers are provide via CC and CXX.

8 years agoSome more default implementations for the compiler driver callbacks.
Nick Cameron [Tue, 14 Jul 2015 23:38:24 +0000 (11:38 +1200)]
Some more default implementations for the compiler driver callbacks.

8 years agoAddress more feedback
Brian Anderson [Tue, 14 Jul 2015 21:41:50 +0000 (14:41 -0700)]
Address more feedback

8 years agoRemove macro, import function and enum
Guillaume Gomez [Tue, 14 Jul 2015 17:42:38 +0000 (19:42 +0200)]
Remove macro, import function and enum

8 years agoMention that removal of `#[packed]` was a breaking change in 1.2
Brian Anderson [Tue, 14 Jul 2015 17:32:23 +0000 (10:32 -0700)]
Mention that removal of `#[packed]` was a breaking change in 1.2

8 years agoAddress more feedback
Brian Anderson [Tue, 14 Jul 2015 17:25:54 +0000 (10:25 -0700)]
Address more feedback

8 years agocore: Revive SipHash's tests
Ulrik Sverdrup [Tue, 14 Jul 2015 00:13:26 +0000 (02:13 +0200)]
core: Revive SipHash's tests

These tests were bitrotting, include them in the crate and bring them up
to date and compiling.. and they pass.

8 years agodon't ICE when FRU is used on an enum variant
Ariel Ben-Yehuda [Mon, 13 Jul 2015 18:04:00 +0000 (21:04 +0300)]
don't ICE when FRU is used on an enum variant

Fixes #26948.

8 years agoArguments are now passed directly to the function instead of the enum variants
Guillaume Gomez [Tue, 14 Jul 2015 14:32:43 +0000 (16:32 +0200)]
Arguments are now passed directly to the function instead of the enum variants

8 years agoAdd regression test for #21140
Corey Farwell [Sun, 12 Jul 2015 11:42:06 +0000 (20:42 +0900)]
Add regression test for #21140

Closes #21140

8 years agoEnd of error code spanning centralization
Guillaume Gomez [Tue, 14 Jul 2015 13:37:52 +0000 (15:37 +0200)]
End of error code spanning centralization

8 years agoAuto merge of #27024 - bluss:io-drain, r=alexcrichton
bors [Tue, 14 Jul 2015 11:13:21 +0000 (11:13 +0000)]
Auto merge of #27024 - bluss:io-drain, r=alexcrichton

Use Vec::drain in BufWriter

I happened past a comment that asked for functionality that we now have.

8 years agosave-analysis: fix def_ids for method calls
Nick Cameron [Tue, 14 Jul 2015 10:03:14 +0000 (22:03 +1200)]
save-analysis: fix def_ids for method calls

We were sometime emitting the decl as a def.

8 years agoUse Vec::drain in BufWriter
Ulrik Sverdrup [Sat, 11 Jul 2015 20:38:41 +0000 (22:38 +0200)]
Use Vec::drain in BufWriter

I happened past a comment that asked for functionality that we now have.

8 years agosave-analysis: handle a few more kinds of paths
Nick Cameron [Tue, 14 Jul 2015 08:56:25 +0000 (20:56 +1200)]
save-analysis: handle a few more kinds of paths

8 years agoAuto merge of #27016 - alexcrichton:inline-asm-docs, r=steveklabnik
bors [Tue, 14 Jul 2015 07:51:04 +0000 (07:51 +0000)]
Auto merge of #27016 - alexcrichton:inline-asm-docs, r=steveklabnik

Hot off the press, we've now got some nice documentation to link to in LLVM
officially!

8 years agoAuto merge of #27015 - frankmcsherry:patch-1, r=steveklabnik
bors [Tue, 14 Jul 2015 06:19:08 +0000 (06:19 +0000)]
Auto merge of #27015 - frankmcsherry:patch-1, r=steveklabnik

Grammatical update (and passive -> active, but I'm not sure if "Rust" is often used as a subject in the book; feel free to revert that part for style, but keep the subject-verb agreement)

r? @steveklabnik

8 years agoAuto merge of #27002 - IvanUkhov:docblock-pre-code, r=Gankro
bors [Tue, 14 Jul 2015 04:00:26 +0000 (04:00 +0000)]
Auto merge of #27002 - IvanUkhov:docblock-pre-code, r=Gankro

The current nonzero side padding of `code` tags is good for legibility in paragraphs and lists; however, it introduces an awkward indentation to `pre` tags. Specifically, when a `pre` tag contains preformatted text with multiple lines, the fist line gets pushed slightly to the right, running the vertical alignment. An example can be seen [here](http://doc.rust-lang.org/std/fmt/#syntax). I propose setting the padding to zero for `code`s contained in `pre`s.

Regards,
Ivan

8 years agosave-analysis: tweak constructors
Nick Cameron [Tue, 14 Jul 2015 02:21:54 +0000 (14:21 +1200)]
save-analysis: tweak constructors

8 years agosave-analysis: make generated_code pub
Nick Cameron [Tue, 14 Jul 2015 01:40:02 +0000 (13:40 +1200)]
save-analysis: make generated_code pub

8 years agoAddress feedback
Brian Anderson [Tue, 14 Jul 2015 00:56:31 +0000 (17:56 -0700)]
Address feedback

8 years agoFix local path
Brian Anderson [Sat, 11 Jul 2015 22:30:43 +0000 (15:30 -0700)]
Fix local path

8 years agostd: Refining crate docs
Brian Anderson [Sat, 11 Jul 2015 19:12:19 +0000 (12:12 -0700)]
std: Refining crate docs

Yet another attempt to make the prose on the std crate page
clearer and more informative.

This does a lot of things: tightens up the opening, adds useful links
(including a link to the search bar), offers guidance on how to use
the docs, and expands the prelude docs as a useful newbie entrypoint.

8 years agoAuto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichton
bors [Mon, 13 Jul 2015 23:47:06 +0000 (23:47 +0000)]
Auto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichton

See https://github.com/rust-lang/rfcs/issues/1157

8 years agoAuto merge of #27006 - ryanp-me:apple-llvm, r=brson
bors [Mon, 13 Jul 2015 22:14:50 +0000 (22:14 +0000)]
Auto merge of #27006 - ryanp-me:apple-llvm, r=brson

Since Apple LLVM no longer reports which version of LLVM it's based off (starting with 7.0.0), I believe it's time to start checking Apple LLVM versions directly.

The changes in this pull request update the `configure` script to check "Apple LLVM" versions independently if no "based off" version can be found. If a "based off" version is included, however, it will be preferred.

(This is a less hacky version of #26653)

8 years agoFix tests for changes in #26241.
Simon Sapin [Mon, 13 Jul 2015 16:59:06 +0000 (18:59 +0200)]
Fix tests for changes in #26241.

8 years agoAuto merge of #26993 - michaelwoerister:msvc-debuginfo, r=alexcrichton
bors [Mon, 13 Jul 2015 20:42:55 +0000 (20:42 +0000)]
Auto merge of #26993 - michaelwoerister:msvc-debuginfo, r=alexcrichton

This PR will enable RUSTC to generate PDB debuginfo files when targeting the MSVC toolchain. Mind that these are not full featured PDB files -- they just contain line tables, so you can get proper backtraces and step through your code, but variable values can't be inspected. We are just levering (LLVM's current support)[http://clang.llvm.org/docs/MSVCCompatibility.html] for creating Windows debuginfo. When LLVM's support gets better, we should benefit from that too without much effort.

I also wanted to include some kind of auto test with this PR but I could not get the `rmake` tests to work properly when targeting MSVC.

EDIT:
Closes #19533

8 years agoFixed snippet to return the proper error.
Jose Narvaez [Mon, 13 Jul 2015 19:54:33 +0000 (20:54 +0100)]
Fixed snippet to return the proper error.

8 years agoFix section of __morestack for aarch64-unknown-linux-gnu
Akos Kiss [Mon, 13 Jul 2015 18:06:04 +0000 (20:06 +0200)]
Fix section of __morestack for aarch64-unknown-linux-gnu

When building for AArch64/Linux, __morestack ends up in the .note.GNU-stack section,
which causes missing references for the linker. By using the func/endfunc macros
from macros.S we get __morestack right to .text (and a bit more on the side).

8 years agoAuto merge of #26984 - nham:errorck-ignore-long-diag, r=brson
bors [Mon, 13 Jul 2015 18:42:49 +0000 (18:42 +0000)]
Auto merge of #26984 - nham:errorck-ignore-long-diag, r=brson

Currently errorck yields bogus `duplicate error code` messages when an error code occurs inside of a long diagnostic message (see https://github.com/rust-lang/rust/pull/26982), because errorck just goes line by line checking for error codes and recording them all.

A simplistic approach to fixing this is just to detect the beginning of a long diagnostic raw string literal (`r##"`) and skip lines until the end of the raw string literal is encountered. I'm not completely confident in this approach, but I think a more robust approach would be more complicated and I wanted to get feedback before pursuing that.

8 years agoCentralize error spaning and add an enum to make this treatment easier
Guillaume Gomez [Mon, 13 Jul 2015 17:32:45 +0000 (19:32 +0200)]
Centralize error spaning and add an enum to make this treatment easier

8 years agodoc: Add a link to LLVM's new inline assembly docs
Alex Crichton [Mon, 13 Jul 2015 17:08:09 +0000 (10:08 -0700)]
doc: Add a link to LLVM's new inline assembly docs

Hot off the press, we've now got some nice documentation to link to in LLVM
officially!

8 years agoAuto merge of #27001 - tsion:patch-2, r=Gankro
bors [Mon, 13 Jul 2015 16:31:05 +0000 (16:31 +0000)]
Auto merge of #27001 - tsion:patch-2, r=Gankro

8 years agominor grammatical update
Frank McSherry [Mon, 13 Jul 2015 15:22:08 +0000 (17:22 +0200)]
minor grammatical update

Grammatical update (and passive -> active, but I'm not sure if "Rust" is often used as a subject in the book; feel free to revert that part for style, but keep the subject-verb agreement)

8 years agoMark some new things as unstable.
Simon Sapin [Wed, 1 Jul 2015 05:39:47 +0000 (07:39 +0200)]
Mark some new things as unstable.

8 years agoAdd str::split_at_mut
Simon Sapin [Mon, 15 Jun 2015 17:24:52 +0000 (19:24 +0200)]
Add str::split_at_mut

8 years agoImplement IndexMut for String and str.
Simon Sapin [Mon, 15 Jun 2015 16:33:21 +0000 (18:33 +0200)]
Implement IndexMut for String and str.

... matching the existing Index impls.
There is no reason not to if String implement DerefMut.

The code removed in `src/librustc/middle/effect.rs` was added in #9750
to prevent things like `s[0] = 0x80` where `s: String`,
but I belive became unnecessary when the Index(Mut) traits were introduced.

8 years agoAdd more tests for AsciiExt::is_ascii
Simon Sapin [Fri, 12 Jun 2015 08:30:32 +0000 (10:30 +0200)]
Add more tests for AsciiExt::is_ascii

8 years agoAdd tests for AsciiExt::make_ascii_*case, including on String.
Simon Sapin [Fri, 12 Jun 2015 08:30:16 +0000 (10:30 +0200)]
Add tests for AsciiExt::make_ascii_*case, including on String.

8 years agoImplement DerefMut for String
Simon Sapin [Fri, 12 Jun 2015 08:29:23 +0000 (10:29 +0200)]
Implement DerefMut for String

`&mut str` is rarely useful, but it is for e.g.
`AsciiExt::make_ascii_lowercase`.

8 years agoAuto merge of #27000 - alexcrichton:semi-after-type, r=cmr
bors [Mon, 13 Jul 2015 13:55:29 +0000 (13:55 +0000)]
Auto merge of #27000 - alexcrichton:semi-after-type, r=cmr

This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:

    extern {
        fn foo() -> i32; // semicolon after type
    }

    fn main() {
        struct Foo;

        Foo; // semicolon after path
    }

8 years agoAdd regression tests for #23595
Corey Farwell [Sun, 12 Jul 2015 11:39:54 +0000 (20:39 +0900)]
Add regression tests for #23595

Closes #23595

8 years agoAdd regression test for #20544
Corey Farwell [Sun, 12 Jul 2015 11:34:08 +0000 (20:34 +0900)]
Add regression test for #20544

Closes #20544

8 years agoAdd regression test for #22312
Corey Farwell [Sun, 12 Jul 2015 11:32:32 +0000 (20:32 +0900)]
Add regression test for #22312

Closes #22312

8 years agodiagnostics: Fix E0303 explanation.
Michael Sproul [Mon, 13 Jul 2015 13:21:33 +0000 (23:21 +1000)]
diagnostics: Fix E0303 explanation.

8 years agoAuto merge of #27011 - dotdash:issue-26996, r=luqmana
bors [Mon, 13 Jul 2015 12:24:25 +0000 (12:24 +0000)]
Auto merge of #27011 - dotdash:issue-26996, r=luqmana

If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.

8 years agoCorrectly detect reassignments to the interior of matched structs/tuples
Björn Steinbrink [Mon, 13 Jul 2015 11:23:13 +0000 (13:23 +0200)]
Correctly detect reassignments to the interior of matched structs/tuples

If we match a whole struct or tuple, the "field" for the reassignment
checker will be "None" which means that mutating any field should count
as a reassignment.

Fixes #26996.

8 years agoAuto merge of #26999 - rick68:patch-13, r=Gankro
bors [Mon, 13 Jul 2015 10:53:14 +0000 (10:53 +0000)]
Auto merge of #26999 - rick68:patch-13, r=Gankro

Reverse PR `#26944 `, symbol `#` are actually as intended.

8 years agoAuto merge of #26990 - rwz:patch-1, r=alexcrichton
bors [Mon, 13 Jul 2015 09:15:12 +0000 (09:15 +0000)]
Auto merge of #26990 - rwz:patch-1, r=alexcrichton

The current example does not illustrate threaded behavior imo.

8 years agoAuto merge of #26981 - wthrowe:div_docs, r=Gankro
bors [Mon, 13 Jul 2015 07:03:01 +0000 (07:03 +0000)]
Auto merge of #26981 - wthrowe:div_docs, r=Gankro

This resolves #26845.

I'm not entirely satisfied with the placement of the rounding discussion in the docs for the `Div` and `Rem` traits, but I couldn't come up with anywhere better to put it.  Suggestions are welcome.

I didn't add any discussion of rounding to the `checked_div` (or rem) or `wrapping_div` documentation because those seem to make it pretty clear that they do the same thing as `Div`.

8 years agoverify Apple LLVM versions independently, since the "based on LLVM" version is no...
Ryan Pendleton [Mon, 13 Jul 2015 06:33:36 +0000 (00:33 -0600)]
verify Apple LLVM versions independently, since the "based on LLVM" version is no longer reported

8 years agoAuto merge of #26910 - nrc:ice-lang-item, r=@huonw
bors [Mon, 13 Jul 2015 05:32:33 +0000 (05:32 +0000)]
Auto merge of #26910 - nrc:ice-lang-item, r=@huonw

8 years agoAuto merge of #26947 - nagisa:unicode-escape-error, r=nrc
bors [Mon, 13 Jul 2015 04:00:49 +0000 (04:00 +0000)]
Auto merge of #26947 - nagisa:unicode-escape-error, r=nrc

Inspired by the now-mysteriously-closed https://github.com/rust-lang/rust/pull/26782.

This PR introduces better error messages when unicode escapes have invalid format (e.g. `\uFFFF`). It also makes rustc always tell the user that escape may not be used in byte-strings and bytes and fixes some spans to not include unecessary characters and include escape backslash in some others.

8 years agoAdd comments.
Nick Hamann [Mon, 13 Jul 2015 02:19:19 +0000 (21:19 -0500)]
Add comments.

8 years agoAuto merge of #26750 - nrc:refactor-submod, r=sfackler
bors [Mon, 13 Jul 2015 01:07:51 +0000 (01:07 +0000)]
Auto merge of #26750 - nrc:refactor-submod, r=sfackler

This makes the functionality usable from outside the parser

8 years agoMove rounding discussion to integer Div/Rem impls
William Throwe [Mon, 13 Jul 2015 00:28:16 +0000 (20:28 -0400)]
Move rounding discussion to integer Div/Rem impls

8 years agoRemove warnings by centralizing error codes usage
Guillaume Gomez [Mon, 13 Jul 2015 00:05:02 +0000 (02:05 +0200)]
Remove warnings by centralizing error codes usage

8 years agoDon't ICE when missing owned_box lang item
Nick Cameron [Thu, 9 Jul 2015 05:02:35 +0000 (17:02 +1200)]
Don't ICE when missing owned_box lang item

Closes #20549

8 years agoUpdate my email address.
Scott Olson [Sun, 12 Jul 2015 23:46:33 +0000 (19:46 -0400)]
Update my email address.

8 years agoSet zero padding for pre tags
Ivan Ukhov [Sun, 12 Jul 2015 23:42:42 +0000 (19:42 -0400)]
Set zero padding for pre tags

8 years agoAuto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brson
bors [Sun, 12 Jul 2015 23:37:12 +0000 (23:37 +0000)]
Auto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brson

TLS tests have been deadlocking on the OSX bots for quite some time now and this
commit is the result of the investigation into what's going on. It turns out
that a value in TLS which is being destroyed (e.g. the destructor is run) can be
reset back to the initial state **while the destructor is running** if TLS is
re-accessed.

To fix this we stop calling drop_in_place on OSX and instead move the data to a
temporary location on the stack.

8 years agoTell unicode escapes can’t be used as bytes earlier/more
Simonas Kazlauskas [Fri, 10 Jul 2015 19:31:44 +0000 (22:31 +0300)]
Tell unicode escapes can’t be used as bytes earlier/more

8 years agoUpdate error codes
Guillaume Gomez [Sun, 12 Jul 2015 22:57:16 +0000 (00:57 +0200)]
Update error codes

8 years agosyntax: Allow semi tokens after macro ty/path
Alex Crichton [Sun, 12 Jul 2015 22:53:04 +0000 (15:53 -0700)]
syntax: Allow semi tokens after macro ty/path

This commit expands the follow set of the `ty` and `path` macro fragments to
include the semicolon token as well. A semicolon is already allowed after these
tokens, so it's currently a little too restrictive to not have a semicolon
allowed. For example:

    extern {
        fn foo() -> i32; // semicolon after type
    }

    fn main() {
        struct Foo;

        Foo; // semicolon after path
    }

8 years agoRemove unused method
Guillaume Gomez [Sun, 12 Jul 2015 22:40:54 +0000 (00:40 +0200)]
Remove unused method

8 years agoUpdate boxed.rs
Wei-Ming Yang [Sun, 12 Jul 2015 22:43:54 +0000 (06:43 +0800)]
Update boxed.rs

Reverse PR `#26944 `, symbol `#` are actually as intended.

8 years agoAdd error codes
Guillaume Gomez [Sun, 12 Jul 2015 22:31:09 +0000 (00:31 +0200)]
Add error codes

8 years agostd: Fix a TLS destructor bug on OSX
Alex Crichton [Sat, 11 Jul 2015 00:46:20 +0000 (17:46 -0700)]
std: Fix a TLS destructor bug on OSX

TLS tests have been deadlocking on the OSX bots for quite some time now and this
commit is the result of the investigation into what's going on. It turns out
that a value in TLS which is being destroyed (e.g. the destructor is run) can be
reset back to the initial state **while the destructor is running** if TLS is
re-accessed.

To fix this we stop calling drop_in_place on OSX and instead move the data to a
temporary location on the stack.

8 years agoAuto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton
bors [Sun, 12 Jul 2015 22:05:59 +0000 (22:05 +0000)]
Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichton

Fixes #26900

8 years agoAuto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakis
bors [Sun, 12 Jul 2015 19:22:11 +0000 (19:22 +0000)]
Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakis

This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is `ctxt` which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust.

r? @eddyb

cc @nikomatsakis

8 years agodebuginfo: Instruct MSVC linker to generate PDB file if debuginfo is enabled
Michael Woerister [Sat, 4 Jul 2015 21:25:38 +0000 (23:25 +0200)]
debuginfo: Instruct MSVC linker to generate PDB file if debuginfo is enabled

8 years agoClean up trailing whitespaces
Pavel Pravosud [Sun, 12 Jul 2015 18:23:09 +0000 (11:23 -0700)]
Clean up trailing whitespaces

8 years agoFix multi-threading example in dining-philosophers
Pavel Pravosud [Sun, 12 Jul 2015 18:13:04 +0000 (11:13 -0700)]
Fix multi-threading example in dining-philosophers

8 years agoAuto merge of #26966 - nagisa:tail-init, r=alexcrichton
bors [Sun, 12 Jul 2015 13:16:24 +0000 (13:16 +0000)]
Auto merge of #26966 - nagisa:tail-init, r=alexcrichton

Fixes #26906

8 years agoAuto merge of #26965 - bluss:cstring-debug, r=alexcrichton
bors [Sun, 12 Jul 2015 11:45:23 +0000 (11:45 +0000)]
Auto merge of #26965 - bluss:cstring-debug, r=alexcrichton

Use escaped byte string representation for CString Debug

Faithfully represent the contents of the CString and CStr in their Debug
impl, by treating them as byte strings with our default escaping to
ascii representation.

Add impl Debug for CStr.

Fixes #26964.