]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoFix span bug with >> and type bindings
Nick Cameron [Tue, 8 Sep 2015 04:09:28 +0000 (16:09 +1200)]
Fix span bug with >> and type bindings

8 years agoAuto merge of #28285 - steveklabnik:split_at_idiom, r=arielb1
bors [Mon, 7 Sep 2015 19:25:21 +0000 (19:25 +0000)]
Auto merge of #28285 - steveklabnik:split_at_idiom, r=arielb1

Generally, including everything that makes an unsafe block safe in the
block is good style. Since the assert! is what makes this safe, it
should go inside the block. I also added a few bits of whitespace.

This is of course, a little style thing, so no worries if we don't want this patch.

8 years agoUse unsafe more idiomatically
Steve Klabnik [Mon, 7 Sep 2015 14:16:57 +0000 (10:16 -0400)]
Use unsafe more idiomatically

Generally, including everything that makes an unsafe block safe in the
block is good style. Since the assert! is what makes this safe, it
should go inside the block. I also added a few bits of whitespace.

8 years agoAuto merge of #28278 - pfpacket:typo, r=steveklabnik
bors [Mon, 7 Sep 2015 13:59:08 +0000 (13:59 +0000)]
Auto merge of #28278 - pfpacket:typo, r=steveklabnik

8 years agoAuto merge of #28275 - hunan-rostomyan:patch-1, r=steveklabnik
bors [Mon, 7 Sep 2015 06:13:50 +0000 (06:13 +0000)]
Auto merge of #28275 - hunan-rostomyan:patch-1, r=steveklabnik

8 years agoAuto merge of #28272 - Manishearth:improve_vec_docs, r=steveklabnik
bors [Mon, 7 Sep 2015 03:09:05 +0000 (03:09 +0000)]
Auto merge of #28272 - Manishearth:improve_vec_docs, r=steveklabnik

r? @steveklabnik

8 years agoat_exit: fix a typo of the doc comment
Ryo Munakata [Mon, 7 Sep 2015 01:28:54 +0000 (10:28 +0900)]
at_exit: fix a typo of the doc comment

8 years agoAuto merge of #28175 - christopherdumas:master, r=nrc
bors [Mon, 7 Sep 2015 01:16:38 +0000 (01:16 +0000)]
Auto merge of #28175 - christopherdumas:master, r=nrc

per #28168. This is my first contribution. I don't know who to "r?" for source code changes.

8 years agoAuto merge of #28270 - arielb1:raw-fat-ops, r=nrc
bors [Sun, 6 Sep 2015 23:24:11 +0000 (23:24 +0000)]
Auto merge of #28270 - arielb1:raw-fat-ops, r=nrc

r? @nrc

Fixes #17736
Fixes #18829
Fixes #23888
Fixes #28236

8 years agoAdd note about clone in docs for vec![]
Manish Goregaokar [Sun, 6 Sep 2015 14:57:37 +0000 (20:27 +0530)]
Add note about clone in docs for vec![]

8 years agoFix a typo
Hunan Rostomyan [Sun, 6 Sep 2015 21:38:12 +0000 (14:38 -0700)]
Fix a typo

8 years agoAuto merge of #27893 - nikomatsakis:mir, r=nrc
bors [Sun, 6 Sep 2015 21:31:26 +0000 (21:31 +0000)]
Auto merge of #27893 - nikomatsakis:mir, r=nrc

This PR contains a new crate, `rustc_mir`, which implements the MIR as specified in the RFC (more or less). There are no targeted unit tests at the moment, as I didn't decide what kind of infrastructure would be best and didn't take the time to implement it.

~~NB: In packaging up this PR, I realized that MIR construction code is not triggering for methods right now, I think it's only for fixed fns. I'll push a fix for this soon. Hopefully it doesn't stop any crates from building. :)~~ Fixed. Everything still seems to work.

However, the MIR construction code (`librustc_mir/build`) is intentionally quite distinct from the code which munges the compiler's data structures (`librustc_mir/tcx`). The interface between the two is the `HIR` trait (`librustc_mir/hir`). To avoid confusion with @nrc's work, perhaps a better name for this trait is warranted, although ultimately this trait *will* be connected to the HIR, I imagine, so in a way the name is perfect. Anyway, I'm open to suggestions. The initial motivation for this split was to allow for the MIR construction code to be unit-tested. But while I didn't end up writing unit tests (yet), I did find the split made the code immensely easier to think about, since the messiness of our existing system, with its myriad hashtables, punning, and so forth, is confined to one part, which simply transforms to a more fully explicit AST-like form. I tried to separate out the commits somewhat, but since this mostly new code, it mostly winds up coming in one fell swoop in the MIR commit.

Quick guide to the MIR crate:

- `repr.rs` defines the MIR itself; each MIR instance is parameterized by some HIR `H`
- `build/` is the MIR construction code, parameterized by a particular HIR
- `hir/` is the definition of the HIR interface
- `tcx/` is the impl of the HIR interface for the tcx
- `dump.rs` is the minimal compiler pass that invokes the HIR

One open question:

- In the HIR trait, I used exclusively struct-like variants. I found I like this more, since things have names. Should I convert the repr code?

8 years agoenable slice patterns and enable building rustdoc
Niko Matsakis [Sat, 5 Sep 2015 09:46:50 +0000 (05:46 -0400)]
enable slice patterns and enable building rustdoc

8 years agoAuto merge of #28269 - petrochenkov:docorder, r=steveklabnik
bors [Sun, 6 Sep 2015 19:43:06 +0000 (19:43 +0000)]
Auto merge of #28269 - petrochenkov:docorder, r=steveklabnik

This is what I was talking about in https://github.com/rust-lang/rust/pull/26462#issuecomment-113883744

r? @steveklabnik

8 years agoAuto merge of #28265 - boblehest:master, r=bluss
bors [Sun, 6 Sep 2015 17:55:04 +0000 (17:55 +0000)]
Auto merge of #28265 - boblehest:master, r=bluss

In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().

https://doc.rust-lang.org/nightly/nomicon/vec-drain.html

```rust
pub fn drain(&mut self) -> Drain<T> {
    // Oops, setting it to 0 while we still need the old value!
    self.len = 0;

    unsafe {
        Drain {
            // len is used to create a &[T] from &self here,
            // so we end up always creating an empty slice.
            iter: RawValIter::new(&self),
            vec: PhantomData,
        }
    }
}
```

A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly

And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly

8 years agoRustonomicon: Reword potentially confusing comment in Vec::drain.
Jørn Lode [Sun, 6 Sep 2015 16:21:57 +0000 (18:21 +0200)]
Rustonomicon: Reword potentially confusing comment in Vec::drain.

8 years agofunctional structure update syntax -> structure update syntax
christopherdumas [Wed, 2 Sep 2015 20:25:01 +0000 (13:25 -0700)]
functional structure update syntax -> structure update syntax

8 years agoimplement raw fat pointer ops
Ariel Ben-Yehuda [Sat, 5 Sep 2015 18:27:43 +0000 (21:27 +0300)]
implement raw fat pointer ops

8 years agoFurther tweaks to doc/index.md
Vadim Petrochenkov [Sun, 6 Sep 2015 13:07:55 +0000 (16:07 +0300)]
Further tweaks to doc/index.md

8 years agoReorder sections in doc/index.md
Vadim Petrochenkov [Sun, 6 Sep 2015 12:25:01 +0000 (15:25 +0300)]
Reorder sections in doc/index.md

8 years agoconvert TODOs to FIXMEs
Niko Matsakis [Tue, 1 Sep 2015 20:55:40 +0000 (16:55 -0400)]
convert TODOs to FIXMEs

8 years agofix EUV delegate to take advantage of defaults. This also
Niko Matsakis [Tue, 1 Sep 2015 15:31:09 +0000 (11:31 -0400)]
fix EUV delegate to take advantage of defaults. This also
works around a stage0 bug that has since been fixed.

8 years agoplumbing to automatically run MIR for crates where it works;
Niko Matsakis [Tue, 18 Aug 2015 22:02:14 +0000 (18:02 -0400)]
plumbing to automatically run MIR for crates where it works;
this serves as a poor man's unit test infrastructure until
MIR is more built up

8 years agoadd MIR crate and link it into the driver
Niko Matsakis [Tue, 18 Aug 2015 22:01:44 +0000 (18:01 -0400)]
add MIR crate and link it into the driver

8 years agoadd -Z always-build-mir option
Niko Matsakis [Tue, 18 Aug 2015 22:00:17 +0000 (18:00 -0400)]
add -Z always-build-mir option

8 years agoadd MIR code (unused thus far)
Niko Matsakis [Tue, 18 Aug 2015 21:59:21 +0000 (17:59 -0400)]
add MIR code (unused thus far)

8 years agoextract autoderef type adjustment code into a reusable
Niko Matsakis [Tue, 18 Aug 2015 21:57:42 +0000 (17:57 -0400)]
extract autoderef type adjustment code into a reusable
helper

8 years agomove fnv hashing support into librustc_data_structures
Niko Matsakis [Tue, 18 Aug 2015 21:56:55 +0000 (17:56 -0400)]
move fnv hashing support into librustc_data_structures

8 years agoadd a few accessors to Graph
Niko Matsakis [Tue, 18 Aug 2015 21:56:25 +0000 (17:56 -0400)]
add a few accessors to Graph

8 years agotrack, for each upvar, its index in list of upvars
Niko Matsakis [Tue, 18 Aug 2015 21:54:56 +0000 (17:54 -0400)]
track, for each upvar, its index in list of upvars

8 years agogeneralize graphviz library to handle HTML tags and other such things
Niko Matsakis [Tue, 18 Aug 2015 21:50:56 +0000 (17:50 -0400)]
generalize graphviz library to handle HTML tags and other such things

8 years agoRustonomicon: Fix bug in implementation of Vec::drain()
Jørn Lode [Sun, 6 Sep 2015 01:20:53 +0000 (03:20 +0200)]
Rustonomicon: Fix bug in implementation of Vec::drain()

In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().

https://doc.rust-lang.org/nightly/nomicon/vec-drain.html

```rust
pub fn drain(&mut self) -> Drain<T> {
    // Oops, setting it to 0 while we still need the old value!
    self.len = 0;

    unsafe {
        Drain {
            // len is used to create a &[T] from &self here,
            // so we end up always creating an empty slice.
            iter: RawValIter::new(&self),
            vec: PhantomData,
        }
    }
}
```

A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly

And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly

8 years agoAuto merge of #28259 - christopherdumas:fix_empty_link, r=Manishearth
bors [Sun, 6 Sep 2015 01:01:38 +0000 (01:01 +0000)]
Auto merge of #28259 - christopherdumas:fix_empty_link, r=Manishearth

8 years agoAuto merge of #28190 - arielb1:generic-key-entry, r=eddyb
bors [Sat, 5 Sep 2015 22:15:40 +0000 (22:15 +0000)]
Auto merge of #28190 - arielb1:generic-key-entry, r=eddyb

Fixes #28181
This may fix #28151

r? @pnkfelix

8 years agoAdded link for hygenic macro system in macros.md
christopherdumas [Sat, 5 Sep 2015 13:04:15 +0000 (06:04 -0700)]
Added link for hygenic macro system in macros.md

8 years agoAuto merge of #28249 - stepancheg:get-num-cpus, r=huonw
bors [Sat, 5 Sep 2015 12:47:47 +0000 (12:47 +0000)]
Auto merge of #28249 - stepancheg:get-num-cpus, r=huonw

No need to export this symbol. `rust_get_num_cpus` is exported.

8 years agoAuto merge of #28258 - Manishearth:rollup, r=Manishearth
bors [Sat, 5 Sep 2015 11:01:42 +0000 (11:01 +0000)]
Auto merge of #28258 - Manishearth:rollup, r=Manishearth

- Successful merges: #28225, #28231, #28234, #28253
- Failed merges:

8 years agoRollup merge of #28253 - murarth:prelude-typo, r=steveklabnik
Manish Goregaokar [Sat, 5 Sep 2015 10:46:02 +0000 (16:16 +0530)]
Rollup merge of #28253 - murarth:prelude-typo, r=steveklabnik

8 years agoRollup merge of #28234 - AlisdairO:diagnostics247, r=Manishearth
Manish Goregaokar [Sat, 5 Sep 2015 10:46:01 +0000 (16:16 +0530)]
Rollup merge of #28234 - AlisdairO:diagnostics247, r=Manishearth

As title :-)
Part of #24407.

r? @Manishearth

8 years agoRollup merge of #28231 - GuillaumeGomez:help_note, r=Manishearth
Manish Goregaokar [Sat, 5 Sep 2015 10:46:01 +0000 (16:16 +0530)]
Rollup merge of #28231 - GuillaumeGomez:help_note, r=Manishearth

r? @Manishearth

8 years agoRollup merge of #28225 - jackwilsonv:patch-3, r=steveklabnik
Manish Goregaokar [Sat, 5 Sep 2015 10:46:01 +0000 (16:16 +0530)]
Rollup merge of #28225 - jackwilsonv:patch-3, r=steveklabnik

r? @steveklabnik

8 years agoAdd erroneous code example for E0010
Guillaume Gomez [Fri, 4 Sep 2015 16:11:51 +0000 (18:11 +0200)]
Add erroneous code example for E0010

8 years agoAuto merge of #28242 - Diggsey:msvc-backtrace, r=alexcrichton
bors [Sat, 5 Sep 2015 07:21:01 +0000 (07:21 +0000)]
Auto merge of #28242 - Diggsey:msvc-backtrace, r=alexcrichton

Currently LLVM does not generate the debug info required to get complete backtraces even when functions are inlined, so that part of the `run-pass/backtrace-debuginfo.rs` test is disabled when targetting MSVC. At worst this results in missing stack frames where functions have been inlined.

8 years agoFix typo in prelude docs
Murarth [Sat, 5 Sep 2015 04:27:55 +0000 (21:27 -0700)]
Fix typo in prelude docs

8 years agoAuto merge of #28240 - nhowell:master, r=steveklabnik
bors [Sat, 5 Sep 2015 04:03:34 +0000 (04:03 +0000)]
Auto merge of #28240 - nhowell:master, r=steveklabnik

The Introduction page generated by rustbook used weird relative links
like "./getting-started.html" instead of just "getting-started.html"
like on the other pages. This adversely affected Windows builds the
worst, since it generated links like ".\getting-started.html" (note the
backslash). If you then try to upload the generated book to a webserver,
you end up with 404's. See this example of what is going on with the
Introduction page links and why this PR should fix it:
http://is.gd/fRUTXk

Compare the links on these two pages, for instance:
https://doc.rust-lang.org/nightly/book/
https://doc.rust-lang.org/nightly/book/getting-started.html

Also, fix a few whitespace issues in build.rs.

8 years agoAuto merge of #28221 - huonw:simd, r=alexcrichton
bors [Sat, 5 Sep 2015 02:15:41 +0000 (02:15 +0000)]
Auto merge of #28221 - huonw:simd, r=alexcrichton

The ARM equivalents of the AArch64 are annoyingly more complicated (and some of the AArch64 ones are too).

I think I've got exposed all the x86 intrinsics from SSE to AVX2 now (at least, the ones that LLVM implements as callable intrinsics).

8 years agoget_num_cpus function should be static
Stepan Koltsov [Sat, 5 Sep 2015 02:03:48 +0000 (05:03 +0300)]
get_num_cpus function should be static

No need to export this symbol. `rust_get_num_cpus` is exported.

8 years agoAdd line numbers to MSVC backtrace
Diggory Blake [Fri, 4 Sep 2015 22:17:16 +0000 (23:17 +0100)]
Add line numbers to MSVC backtrace
Add comments

8 years agoAuto merge of #28161 - nrc:fmt, r=brson
bors [Fri, 4 Sep 2015 23:32:35 +0000 (23:32 +0000)]
Auto merge of #28161 - nrc:fmt, r=brson

8 years agofixup
Nick Cameron [Wed, 2 Sep 2015 03:42:38 +0000 (15:42 +1200)]
fixup

8 years agorustfmt librustc_trans/save
Nick Cameron [Wed, 2 Sep 2015 03:37:07 +0000 (15:37 +1200)]
rustfmt librustc_trans/save

8 years agorustbook: Fix relative links on the Introduction page
Nick Howell [Fri, 4 Sep 2015 21:00:33 +0000 (17:00 -0400)]
rustbook: Fix relative links on the Introduction page

The Introduction page generated by rustbook used weird relative links
like "./getting-started.html" instead of just "getting-started.html"
like on the other pages. This adversely affected Windows builds the
worst, since it generated links like ".\getting-started.html" (note the
backslash). If you then try to upload the generated book to a webserver,
you end up with 404's. See this example of what is going on with the
Introduction page links and why this PR should fix it:
http://is.gd/fRUTXk

Compare the links on these two pages, for instance:
https://doc.rust-lang.org/nightly/book/
https://doc.rust-lang.org/nightly/book/getting-started.html

Also, fix a few whitespace issues in build.rs.

8 years agoAuto merge of #28197 - petrochenkov:borrow, r=alexcrichton
bors [Fri, 4 Sep 2015 20:23:51 +0000 (20:23 +0000)]
Auto merge of #28197 - petrochenkov:borrow, r=alexcrichton

8 years agoAdd long diagnostics for E0247
Alisdair Owens [Fri, 4 Sep 2015 18:21:22 +0000 (19:21 +0100)]
Add long diagnostics for E0247

8 years agoAuto merge of #28035 - Diggsey:msvc-escaping, r=alexcrichton
bors [Fri, 4 Sep 2015 17:58:35 +0000 (17:58 +0000)]
Auto merge of #28035 - Diggsey:msvc-escaping, r=alexcrichton

This fixes #28018 with the exception of the point about cmake, but that's really a limitation of `./configure` builds.

8 years agoAuto merge of #28227 - birkenfeld:use_filter_map, r=alexcrichton
bors [Fri, 4 Sep 2015 16:16:09 +0000 (16:16 +0000)]
Auto merge of #28227 - birkenfeld:use_filter_map, r=alexcrichton

8 years agoAdd some fancier AArch64 load/store instructions.
Huon Wilson [Fri, 4 Sep 2015 00:06:34 +0000 (17:06 -0700)]
Add some fancier AArch64 load/store instructions.

8 years agoSupport return aggregates in platform intrinsics.
Huon Wilson [Fri, 4 Sep 2015 00:00:11 +0000 (17:00 -0700)]
Support return aggregates in platform intrinsics.

This also involved adding `[TYPE;N]` syntax and aggregate indexing
support to the generator script: it's the only way to be able to have a
parameterised intrinsic that returns an aggregate, since one can't refer
to previous elements of the current aggregate (and that was harder to
implement).

8 years agoAdd various pointer & void-using x86 intrinsics.
Huon Wilson [Thu, 3 Sep 2015 21:50:20 +0000 (14:50 -0700)]
Add various pointer & void-using x86 intrinsics.

8 years agoSupport bitcasts in platform intrinsic generator.
Huon Wilson [Thu, 3 Sep 2015 18:25:52 +0000 (11:25 -0700)]
Support bitcasts in platform intrinsic generator.

8 years agoSupport void in platform intrinsic generator.
Huon Wilson [Wed, 2 Sep 2015 23:55:28 +0000 (16:55 -0700)]
Support void in platform intrinsic generator.

8 years agoSupport non-return value references in platform intrinsic generator.
Huon Wilson [Wed, 2 Sep 2015 23:46:41 +0000 (16:46 -0700)]
Support non-return value references in platform intrinsic generator.

8 years agoAdd support for pointers to generator.py.
Huon Wilson [Wed, 2 Sep 2015 20:59:35 +0000 (13:59 -0700)]
Add support for pointers to generator.py.

8 years agoAdd span_help for E0002
Guillaume Gomez [Fri, 4 Sep 2015 16:09:16 +0000 (18:09 +0200)]
Add span_help for E0002

8 years agoAuto merge of #28201 - apasel422:issue-26205, r=nikomatsakis
bors [Fri, 4 Sep 2015 14:16:54 +0000 (14:16 +0000)]
Auto merge of #28201 - apasel422:issue-26205, r=nikomatsakis

Closes #26205.

r? @eddyb

8 years agoAuto merge of #28119 - nagisa:bytesderef, r=alexcrichton
bors [Fri, 4 Sep 2015 12:34:03 +0000 (12:34 +0000)]
Auto merge of #28119 - nagisa:bytesderef, r=alexcrichton

8 years agoAuto merge of #28069 - alexcrichton:rt-atexit, r=brson
bors [Fri, 4 Sep 2015 10:33:42 +0000 (10:33 +0000)]
Auto merge of #28069 - alexcrichton:rt-atexit, r=brson

This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up
after ourselves on the way out from Rust.

Closes #28065

8 years agoFix escaping in msvc builds
Diggory Blake [Thu, 27 Aug 2015 17:16:31 +0000 (18:16 +0100)]
Fix escaping in msvc builds

8 years agoAuto merge of #28034 - alexcrichton:new-lines, r=aturon
bors [Fri, 4 Sep 2015 08:50:56 +0000 (08:50 +0000)]
Auto merge of #28034 - alexcrichton:new-lines, r=aturon

This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of
the `str::lines` and `BufRead::lines` iterators. Both iterators now account for
`\r\n` sequences in addition to `\n`, allowing for less surprising behavior
across platforms (especially in the `BufRead` case). Splitting *only* on the
`\n` character can still be achieved with `split('\n')` in both cases.

The `str::lines_any` function is also now deprecated as `str::lines` is a
drop-in replacement for it.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md

Closes #28032

8 years agoAuto merge of #28004 - Diggsey:win-backtrace, r=alexcrichton
bors [Fri, 4 Sep 2015 07:08:17 +0000 (07:08 +0000)]
Auto merge of #28004 - Diggsey:win-backtrace, r=alexcrichton

Technically this could also be used for `windows-msvc` targets, as I believe they have *both* dwarf and pdb debug information, but I haven't enabled it there as it should really use the native windows APIs for that, instead of libbacktrace.

I wasn't exactly sure where I should put "gnu" specific stuff, so tell me if I should structure things differently.

This is still a WIP, and I haven't tested properly to make sure I haven't broken msvc/linux builds yet.

8 years agostd: Account for CRLF in {str, BufRead}::lines
Alex Crichton [Thu, 27 Aug 2015 00:30:45 +0000 (17:30 -0700)]
std: Account for CRLF in {str, BufRead}::lines

This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of
the `str::lines` and `BufRead::lines` iterators. Both iterators now account for
`\r\n` sequences in addition to `\n`, allowing for less surprising behavior
across platforms (especially in the `BufRead` case). Splitting *only* on the
`\n` character can still be achieved with `split('\n')` in both cases.

The `str::lines_any` function is also now deprecated as `str::lines` is a
drop-in replacement for it.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md

Closes #28032

8 years agoAuto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichton
bors [Fri, 4 Sep 2015 05:15:22 +0000 (05:15 +0000)]
Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichton

r? @alexcrichton

8 years agoCapitalize circle reference
Jack Wilson [Fri, 4 Sep 2015 03:51:08 +0000 (20:51 -0700)]
Capitalize circle reference

8 years agoFixes minor formatting inconsistencies
Jack Wilson [Fri, 4 Sep 2015 03:48:26 +0000 (20:48 -0700)]
Fixes minor formatting inconsistencies

8 years agoAuto merge of #28220 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 4 Sep 2015 02:33:44 +0000 (02:33 +0000)]
Auto merge of #28220 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28167, #28202, #28203, #28204, #28205, #28207, #28208, #28209, #28210, #28212, #28213, #28214, #28215, #28216
- Failed merges:

8 years agoAdd line numbers to windows-gnu backtraces
Diggory Blake [Wed, 26 Aug 2015 00:44:55 +0000 (01:44 +0100)]
Add line numbers to windows-gnu backtraces
Fix formatting
Remove unused imports
Refactor
Fix msvc build
Fix line lengths
Formatting
Enable backtrace tests
Fix using directive on mac
pwd info
Work-around buildbot PWD bug, and fix libbacktrace configuration
Use alternative to `env -u` which is not supported on bitrig
Disable tests on 32-bit windows gnu

8 years agoReapply rust-specific changes to libbacktrace
Tim Cuthbertson [Sat, 11 Apr 2015 12:21:47 +0000 (22:21 +1000)]
Reapply rust-specific changes to libbacktrace

This includes the changes from commits:

 - cd8f31759fd04b9ce9c903fa00cae81dc5bba546
 - fcb30a0b67b1bd4acbc3422ff74fac5d031ae1ae

8 years agoUpdate libbacktrace to r227145
Diggory Blake [Tue, 25 Aug 2015 19:01:26 +0000 (20:01 +0100)]
Update libbacktrace to r227145

8 years agoRollup merge of #28216 - christopherdumas:fix_28196, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:10 +0000 (20:10 -0400)]
Rollup merge of #28216 - christopherdumas:fix_28196, r=steveklabnik

This is a docs change suggested in #28196.
r? @steveklabnik

8 years agoRollup merge of #28215 - matklad:grammar-extern-block-item, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28215 - matklad:grammar-extern-block-item, r=steveklabnik

extern_block should be extern_block_item.

extern_block_item is `extern { bunch of fns }`, extern_block is just `bunch of fns`

r? @steveklabnik

8 years agoRollup merge of #28214 - tshepang:word-not-name, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28214 - tshepang:word-not-name, r=steveklabnik

Also, add missing comma

8 years agoRollup merge of #28213 - tshepang:replace-comma, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28213 - tshepang:replace-comma, r=steveklabnik

8 years agoRollup merge of #28212 - tshepang:rust-is-a-language, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28212 - tshepang:rust-is-a-language, r=steveklabnik

8 years agoRollup merge of #28210 - tshepang:typo, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28210 - tshepang:typo, r=steveklabnik

8 years agoRollup merge of #28209 - tshepang:must-be-four-spaces, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28209 - tshepang:must-be-four-spaces, r=steveklabnik

Also, add trailing commas

8 years agoRollup merge of #28208 - matklad:grammar-whitespace-cleanup, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28208 - matklad:grammar-whitespace-cleanup, r=steveklabnik

8 years agoRollup merge of #28207 - tshepang:flow, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28207 - tshepang:flow, r=steveklabnik

8 years agoRollup merge of #28205 - matklad:grammar-remove-proc, r=alexcrichton
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28205 - matklad:grammar-remove-proc, r=alexcrichton

As I understand, there are no proc closures in Rust any more. So this pr removes `procedure_type` production. It isn't used anywhere. The `proc` is still a keyword.

r? @steveklabnik
@bors: r+ rollup

8 years agoRollup merge of #28204 - matklad:grammar-duplicate-else-tail, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28204 - matklad:grammar-duplicate-else-tail, r=steveklabnik

The rule `else_tail` was duplicated in `if` and `if_let` sections. I guess that this is a mistake.

r? @steveklabnik

8 years agoRollup merge of #28203 - benschulz:book-deref-coercion, r=brson
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28203 - benschulz:book-deref-coercion, r=brson

I have two issues with the section "Deref and method calls" of the book's chapter "Deref coercions".

 - (Minor) It says "In other words, these are the same two things in Rust:", followed by a code block in which no two things seem similar, much less the same. Presumably this sentence made more sense in a previous revision.

 - The next paragraph conflates two concepts which, imho, should kept separate. They are
    - deref coercion, i.e. inserting as many `*` as necessary and
    - implicitly referencing the receiver, i.e. inserting a single `&` to satisfy the method's `self` parameter type.

I appreciate that with the proposed changes the example becomes very contrived, even for a foo-bar-baz one. However, the current exmplanation is just wrong.

8 years agoRollup merge of #28202 - matklad:grammar-loop-labels, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28202 - matklad:grammar-loop-labels, r=steveklabnik

This adds missing `?` marks to productions for loops and break/continue.

It also adds missing option label to while let loop.

Note that '[' foo ']' means grouping in BNF, and '?' is used for possible missing items.

r? @steveklabnik

8 years agoRollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakis
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakis

Avoid confusion with binary integer literals and binary operator expressions in libsyntax

8 years agoAuto merge of #27984 - arielb1:misc-assemble-improvements, r=nikomatsakis
bors [Fri, 4 Sep 2015 00:00:09 +0000 (00:00 +0000)]
Auto merge of #27984 - arielb1:misc-assemble-improvements, r=nikomatsakis

this resolves type-variables early in assemble_candidates and
bails out quickly if the self type is an inference variable (which would
fail anyway because of `assemble_candidates_from_projected_tys`).

In both these cases, `assemble_candidates_from_impls` would try to go
over all impls and match them, leading to O(`n*m`) performance. Fixing this
improves rustc type-checking performance by 10%. As type-checking is only
is 5% of compilation, this doesn't impact bootstrap times, but *does*
improve type-error-detection time which is nice.

Crates that have many dependencies and contain significant amounts of
generic functions could see a bigger perf boost. As a microbenchmark,
the crate generated by

```
echo '#![feature(rustc_private)]'
echo 'extern crate rustc_driver;'
for i in {1..1000}; do cat << _EOF_
    pub fn foo$i<T>() {
        let mut v = Vec::new();
        let _w = v.clone();
        v.push("");
    }
_EOF_
done
```

sees performance improve from 7.2 to 1.4 seconds. I imagine many crates
would fall somewhere in-between.

r? @nikomatsakis

8 years agoRemoved incorrect reference from #28196
christopherdumas [Thu, 3 Sep 2015 21:39:34 +0000 (14:39 -0700)]
Removed incorrect reference from #28196

8 years agoreference grammar: fix item definition
Aleksey Kladov [Thu, 3 Sep 2015 21:29:47 +0000 (00:29 +0300)]
reference grammar: fix item definition

extern_block should extern_block_item

8 years agoreference grammar: whitespace cleanup
Aleksey Kladov [Thu, 3 Sep 2015 20:42:33 +0000 (23:42 +0300)]
reference grammar: whitespace cleanup

8 years agobook: it is RwLock, not RWLock
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 20:14:28 +0000 (22:14 +0200)]
book: it is RwLock, not RWLock

8 years agoAuto merge of #28200 - Manishearth:rollup, r=Manishearth
bors [Thu, 3 Sep 2015 20:10:42 +0000 (20:10 +0000)]
Auto merge of #28200 - Manishearth:rollup, r=Manishearth

- Successful merges: #28164, #28170, #28184, #28186, #28187, #28188, #28191, #28193, #28194, #28195
- Failed merges:

8 years agoAdd ptr import (fixup #28187)
Manish Goregaokar [Thu, 3 Sep 2015 18:33:38 +0000 (00:03 +0530)]
Add ptr import (fixup #28187)

8 years agoRollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth
Manish Goregaokar [Thu, 3 Sep 2015 18:00:38 +0000 (23:30 +0530)]
Rollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth

As title :-)
Part of #24407.

r? @Manishearth