]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #27221 - dotdash:no_empty_clean, r=luqmana
bors [Thu, 23 Jul 2015 15:59:20 +0000 (15:59 +0000)]
Auto merge of #27221 - dotdash:no_empty_clean, r=luqmana

When compiling libsyntax this removes about 30k basic blocks that only
contain a single unconditional jump and reduces the peak memory usage by
about 10MB (from 681MB down to 671MB).

8 years agoAuto merge of #27203 - marcusklaas:fix-range-span, r=alexcrichton
bors [Thu, 23 Jul 2015 12:52:21 +0000 (12:52 +0000)]
Auto merge of #27203 - marcusklaas:fix-range-span, r=alexcrichton

Right trims the span for certain range expressions.

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

8 years agoAuto merge of #26588 - eefriedman:foreign-lifetime, r=nrc
bors [Thu, 23 Jul 2015 09:16:08 +0000 (09:16 +0000)]
Auto merge of #26588 - eefriedman:foreign-lifetime, r=nrc

Pretty straightforward; just need to make sure to explicitly handle
the generic parameters of each ast::ForeignItemFn.

Fixes #26587.

8 years agoResolve lifetime parameters for foreign functions.
Eli Friedman [Fri, 26 Jun 2015 06:13:03 +0000 (23:13 -0700)]
Resolve lifetime parameters for foreign functions.

Pretty straightforward; just need to make sure to explicitly handle
the generic parameters of each ast::ForeignItemFn.

Fixes #26587.

8 years agoAuto merge of #27192 - dotdash:inline_eq_slice, r=luqmana
bors [Thu, 23 Jul 2015 02:24:06 +0000 (02:24 +0000)]
Auto merge of #27192 - dotdash:inline_eq_slice, r=luqmana

eq_slice_() used to be a common implementation for two function that
both called it, but of those only eq_slice() is left, so we can as well
directly inline the code.

8 years agoAuto merge of #27191 - pnkfelix:sidestep-unary-negate-warning, r=alexcrichton
bors [Wed, 22 Jul 2015 23:37:37 +0000 (23:37 +0000)]
Auto merge of #27191 - pnkfelix:sidestep-unary-negate-warning, r=alexcrichton

Work around unary negation to-be-feature-gated warning by replacing references to `-1` as a `ast::NodeId` with `ast::DUMMY_NODE_ID`, which seems like a better notation to use (it is currently also `-1`.

(AFAICT the code is not *relying* on the value `-1` anywhere, it really just needed a dummy value for when the input is `None`.)

8 years agoAvoid creating basic blocks for empty cleanup scopes
Björn Steinbrink [Wed, 22 Jul 2015 21:15:01 +0000 (23:15 +0200)]
Avoid creating basic blocks for empty cleanup scopes

When compiling libsyntax this removes about 30k basic blocks that only
contain a single unconditional jump and reduces the peak memory usage by
about 10MB (from 681MB down to 671MB).

8 years agoAuto merge of #27188 - pnkfelix:sidestep-warning-for-E0045, r=alexcrichton
bors [Wed, 22 Jul 2015 20:44:39 +0000 (20:44 +0000)]
Auto merge of #27188 - pnkfelix:sidestep-warning-for-E0045, r=alexcrichton

Sidestep warning about repeated E0045 `span_err!` invocation.

(That is, take the two expressions with the same message and unify them into one subroutine.)

8 years agoAuto merge of #27219 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 22 Jul 2015 16:58:56 +0000 (16:58 +0000)]
Auto merge of #27219 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27084, #27127, #27131, #27140, #27146, #27147, #27151, #27154, #27155, #27156, #27157, #27158, #27163, #27164, #27166, #27167, #27170, #27175, #27183, #27201, #27202
- Failed merges: #26778

8 years agoRollup merge of #27202 - apasel422:issue-21174, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27202 - apasel422:issue-21174, r=alexcrichton

8 years agoRollup merge of #27201 - Ticki:master, r=steveklabnik
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27201 - Ticki:master, r=steveklabnik

Just some small changes.

8 years agoRollup merge of #27183 - Dangthrimble:master, r=steveklabnik
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27183 - Dangthrimble:master, r=steveklabnik

Updated "Installing Rust" and "After installation" to provide additional guidance to Windows users on including Rust in the Path system variable.

r? @steveklabnik

8 years agoRollup merge of #27175 - steveklabnik:channels_plus_travis, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27175 - steveklabnik:channels_plus_travis, r=alexcrichton

This should help people configure travis to test all three channels.

8 years agoRollup merge of #27170 - steveklabnik:doc_std_io_intoinnererror, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:51 +0000 (12:56 -0400)]
Rollup merge of #27170 - steveklabnik:doc_std_io_intoinnererror, r=alexcrichton

Mostly adding examples.

r? @alexcrichton

8 years agoRollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:51 +0000 (12:56 -0400)]
Rollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichton

Better and more consistent links to their creators.

8 years agoRollup merge of #27166 - steveklabnik:doc_std_io_linewriter, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:51 +0000 (12:56 -0400)]
Rollup merge of #27166 - steveklabnik:doc_std_io_linewriter, r=alexcrichton

Beef up the struct docs, add examples for the methods.

r? @alexcrichton

8 years agoRollup merge of #27164 - steveklabnik:doc_io_utils, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:50 +0000 (12:56 -0400)]
Rollup merge of #27164 - steveklabnik:doc_io_utils, r=alexcrichton

These provide various special readers, so point their docs to their
constructor functions in a manner consistent with everything else.

r? @alexcrichton

8 years agoRollup merge of #27163 - steveklabnik:doc_std_io_cursor, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:50 +0000 (12:56 -0400)]
Rollup merge of #27163 - steveklabnik:doc_std_io_cursor, r=alexcrichton

Beef up the docs on the type, as well as adding examples for all
methods.

r? @alexcrichton

8 years agoRollup merge of #27158 - apasel422:issue-14382, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:50 +0000 (12:56 -0400)]
Rollup merge of #27158 - apasel422:issue-14382, r=alexcrichton

closes #14382

8 years agoRollup merge of #27157 - steveklabnik:doc_std_io_iterators, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:50 +0000 (12:56 -0400)]
Rollup merge of #27157 - steveklabnik:doc_std_io_iterators, r=alexcrichton

Make them all consistent and link up the documentation.

r? @alexcrichton

8 years agoRollup merge of #27156 - AlisdairO:diagnostics253, r=Manishearth
Steve Klabnik [Wed, 22 Jul 2015 16:56:49 +0000 (12:56 -0400)]
Rollup merge of #27156 - AlisdairO:diagnostics253, r=Manishearth

This is a resubmission of my previous git failure - apologies.  Just fixing up a wording error that was discovered in E0253 after the r.

r? @Manishearth

8 years agoRollup merge of #27155 - steveklabnik:doc_std_io_buf_writer, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:49 +0000 (12:56 -0400)]
Rollup merge of #27155 - steveklabnik:doc_std_io_buf_writer, r=alexcrichton

Mostly through adding examples.

r? @alexcrichton

I'm going to be doing a bunch of these today, but I figured I'd keep it one PR per struct, since the last 'all the things in one PR' ended up taking a week to actually land.

8 years agoRollup merge of #27154 - apasel422:issue-10436, r=Gankro
Steve Klabnik [Wed, 22 Jul 2015 16:56:49 +0000 (12:56 -0400)]
Rollup merge of #27154 - apasel422:issue-10436, r=Gankro

closes #10436

8 years agoRollup merge of #27151 - pfalabella:patch-2, r=steveklabnik
Steve Klabnik [Wed, 22 Jul 2015 16:56:49 +0000 (12:56 -0400)]
Rollup merge of #27151 - pfalabella:patch-2, r=steveklabnik

I'm pretty sure this was a typo

8 years agoRollup merge of #27147 - apasel422:issue-19404, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:48 +0000 (12:56 -0400)]
Rollup merge of #27147 - apasel422:issue-19404, r=alexcrichton

closes #19404

8 years agoRollup merge of #27146 - apasel422:issue-14229, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:48 +0000 (12:56 -0400)]
Rollup merge of #27146 - apasel422:issue-14229, r=alexcrichton

closes #14229

8 years agoRollup merge of #27140 - dotdash:test-26468, r=luqmana
Steve Klabnik [Wed, 22 Jul 2015 16:56:48 +0000 (12:56 -0400)]
Rollup merge of #27140 - dotdash:test-26468, r=luqmana

The fix for #26468 was made upstream and landed with the LLVM update in #27076.

Closes #26468

8 years agoRollup merge of #27131 - apasel422:issue-20162, r=arielb1
Steve Klabnik [Wed, 22 Jul 2015 16:56:48 +0000 (12:56 -0400)]
Rollup merge of #27131 - apasel422:issue-20162, r=arielb1

closes #20162

8 years agoRollup merge of #27127 - AlisdairO:diagnostics172, r=Manishearth
Steve Klabnik [Wed, 22 Jul 2015 16:56:47 +0000 (12:56 -0400)]
Rollup merge of #27127 - AlisdairO:diagnostics172, r=Manishearth

As title :-)

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27084 - GuillaumeGomez:patch-2, r=brson
Steve Klabnik [Wed, 22 Jul 2015 16:56:47 +0000 (12:56 -0400)]
Rollup merge of #27084 - GuillaumeGomez:patch-2, r=brson

Part of #24407.
r? @Manishearth

8 years agoImprove documentation for std::io::Cursor
Steve Klabnik [Mon, 20 Jul 2015 18:33:36 +0000 (14:33 -0400)]
Improve documentation for std::io::Cursor

Beef up the docs on the type, as well as adding examples for all
methods.

8 years agoImprove documentation for std::io::LineWriter
Steve Klabnik [Mon, 20 Jul 2015 19:43:57 +0000 (15:43 -0400)]
Improve documentation for std::io::LineWriter

Beef up the struct docs, add examples for the methods.

8 years agoAuto merge of #26683 - eefriedman:const-eval-hint, r=pnkfelix
bors [Wed, 22 Jul 2015 12:49:06 +0000 (12:49 +0000)]
Auto merge of #26683 - eefriedman:const-eval-hint, r=pnkfelix

The "hint" mechanism is essentially used as a workaround to compute
types for expressions which have not yet been type-checked. This
commit clarifies that usage, and limits the effects to the places
where it is currently necessary.

Fixes #26210.

8 years agoAuto merge of #27176 - alexcrichton:fix-stock-llvm, r=brson
bors [Wed, 22 Jul 2015 09:13:09 +0000 (09:13 +0000)]
Auto merge of #27176 - alexcrichton:fix-stock-llvm, r=brson

This commit moves the IR files in the distribution, rust_try.ll,
rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main
distribution. There's a few reasons for this change:

* LLVM changes its IR syntax from time to time, so it's very difficult to
  have these files build across many LLVM versions simultaneously. We'll likely
  want to retain this ability for quite some time into the future.
* The implementation of these files is closely tied to the compiler and runtime
  itself, so it makes sense to fold it into a location which can do more
  platform-specific checks for various implementation details (such as MSVC 32
  vs 64-bit).
* This removes LLVM as a build-time dependency of the standard library. This may
  end up becoming very useful if we move towards building the standard library
  with Cargo.

In the immediate future, however, this commit should restore compatibility with
LLVM 3.5 and 3.6.

8 years agoPath changed to %PATH%
Jonathan Hansford [Wed, 22 Jul 2015 07:26:40 +0000 (08:26 +0100)]
Path changed to %PATH%

The two references to the "Path system variable" have changed to the
"%PATH% system variable".

8 years agoImprove documentation for std::io::BufWriter
Steve Klabnik [Mon, 20 Jul 2015 17:02:02 +0000 (13:02 -0400)]
Improve documentation for std::io::BufWriter

Mostly through adding examples.

8 years agoAuto merge of #27185 - pnkfelix:test-cyclic-collections, r=alexcrichton
bors [Wed, 22 Jul 2015 04:21:46 +0000 (04:21 +0000)]
Auto merge of #27185 - pnkfelix:test-cyclic-collections, r=alexcrichton

This test attempts to exercise cyclic structure in much of `std::collections`

(as much as is possible; e.g. things like `EnumSet` and `BitVec` do not really support carrying references at all, so trying to represent cyclic structure within them dooes not really make sense.)

This work should land before we make future revisions to `dropck`; that is, I am attempting to catch potential regressions to cases where we supported cyclic structure circa Rust 1.2.

8 years agoAuto merge of #27172 - alexcrichton:snapshots, r=brson
bors [Wed, 22 Jul 2015 00:29:08 +0000 (00:29 +0000)]
Auto merge of #27172 - alexcrichton:snapshots, r=brson

Enables bootstrapping a 32-bit MSVC host compiler!

Closes #26602

8 years agotrans: Move rust_try into the compiler
Alex Crichton [Mon, 20 Jul 2015 20:27:38 +0000 (13:27 -0700)]
trans: Move rust_try into the compiler

This commit moves the IR files in the distribution, rust_try.ll,
rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main
distribution. There's a few reasons for this change:

* LLVM changes its IR syntax from time to time, so it's very difficult to
  have these files build across many LLVM versions simultaneously. We'll likely
  want to retain this ability for quite some time into the future.
* The implementation of these files is closely tied to the compiler and runtime
  itself, so it makes sense to fold it into a location which can do more
  platform-specific checks for various implementation details (such as MSVC 32
  vs 64-bit).
* This removes LLVM as a build-time dependency of the standard library. This may
  end up becoming very useful if we move towards building the standard library
  with Cargo.

In the immediate future, however, this commit should restore compatibility with
LLVM 3.5 and 3.6.

8 years agoAuto merge of #27093 - Manishearth:closure-label-shadow, r=pnkfelix
bors [Tue, 21 Jul 2015 22:23:34 +0000 (22:23 +0000)]
Auto merge of #27093 - Manishearth:closure-label-shadow, r=pnkfelix

Fixes #25343

To be honest I'm not sure if this is the right fix (I haven't yet fully understood the code),
but it seems to work. I'll look closer at the code when I have some time, in the meantime if this
is the right fix it would be nice to get verification from someone who does understand the code :smile:

r? @pnkfelix

8 years agoAssign proper span to range expression
Marcus Klaas [Tue, 21 Jul 2015 21:04:23 +0000 (23:04 +0200)]
Assign proper span to range expression

8 years agoupdate compile-fail test for #21174 to account for #27127
Andrew Paseltiner [Tue, 21 Jul 2015 20:58:26 +0000 (16:58 -0400)]
update compile-fail test for #21174 to account for #27127

8 years agoAuto merge of #27073 - alexcrichton:less-proc-fs, r=brson
bors [Tue, 21 Jul 2015 20:51:04 +0000 (20:51 +0000)]
Auto merge of #27073 - alexcrichton:less-proc-fs, r=brson

This can fail on linux for various reasons, such as the /proc filesystem not
being mounted. There are already many cases where we can't set up stack guards,
so just don't worry about this case and communicate that no guard was enabled.

I've confirmed that this allows the compiler to run in a chroot without /proc
mounted.

Closes #22642

8 years agoKlabnik nit-picks ;)
Ticki [Tue, 21 Jul 2015 20:09:29 +0000 (22:09 +0200)]
Klabnik nit-picks ;)

8 years agorust -> Rust
Ticki [Tue, 21 Jul 2015 19:40:11 +0000 (21:40 +0200)]
rust -> Rust

8 years agoAdd info about usage of 'unsafe' keyword in bindings to foreign interfaces.
Ticki [Tue, 21 Jul 2015 19:36:29 +0000 (21:36 +0200)]
Add info about usage of 'unsafe' keyword in bindings to foreign interfaces.

8 years agoadd test for #14382
Andrew Paseltiner [Mon, 20 Jul 2015 17:31:04 +0000 (13:31 -0400)]
add test for #14382

closes #14382

8 years agoAuto merge of #26856 - steveklabnik:gh26475, r=alexcrichton
bors [Tue, 21 Jul 2015 18:34:08 +0000 (18:34 +0000)]
Auto merge of #26856 - steveklabnik:gh26475, r=alexcrichton

Fixes #26475

I'm not sure this is enough, really, but I'm not totally clear on what specific information would be valuable here. In the original issue, the Java page was pretty decent, but now I can't think of a different way to word it, and copying their prose is of course not acceptable.

thoughts @alexcrichton @aturon @aidanhs ?

8 years agoAdd E0433 error explanation
Guillaume Gomez [Fri, 17 Jul 2015 15:21:58 +0000 (17:21 +0200)]
Add E0433 error explanation

8 years agoExpand documentation for IntoInnerError
Steve Klabnik [Mon, 20 Jul 2015 20:46:34 +0000 (16:46 -0400)]
Expand documentation for IntoInnerError

Mostly adding examples.

8 years agoAdd E0428 error explanation
Guillaume Gomez [Fri, 17 Jul 2015 14:09:25 +0000 (16:09 +0200)]
Add E0428 error explanation

8 years agoAdd E0407 error explanation
Guillaume Gomez [Fri, 17 Jul 2015 13:54:44 +0000 (15:54 +0200)]
Add E0407 error explanation

8 years agoAdd E0404 error explanation
Guillaume Gomez [Fri, 17 Jul 2015 12:55:42 +0000 (14:55 +0200)]
Add E0404 error explanation

8 years agoAdd E0405 error explanation
Guillaume Gomez [Fri, 17 Jul 2015 12:14:41 +0000 (14:14 +0200)]
Add E0405 error explanation

8 years agoAdd E0403 error explanation
Guillaume Gomez [Fri, 17 Jul 2015 12:00:03 +0000 (14:00 +0200)]
Add E0403 error explanation

8 years agoExpand a bit on thread::park spurious wakeups
Steve Klabnik [Tue, 7 Jul 2015 13:35:56 +0000 (09:35 -0400)]
Expand a bit on thread::park spurious wakeups

Fixes #26475

8 years agoInline eq_slice_() into eq_slice()
Björn Steinbrink [Tue, 21 Jul 2015 16:30:18 +0000 (18:30 +0200)]
Inline eq_slice_() into eq_slice()

eq_slice_() used to be a common implementation for two function that
both called it, but of those only eq_slice() is left, so we can as well
directly inline the code.

8 years agostd: Be resilient to failure in pthread_getattr_np
Alex Crichton [Thu, 16 Jul 2015 18:59:53 +0000 (11:59 -0700)]
std: Be resilient to failure in pthread_getattr_np

This can fail on linux for various reasons, such as the /proc filesystem not
being mounted. There are already many cases where we can't set up stack guards,
so just don't worry about this case and communicate that no guard was enabled.

I've confirmed that this allows the compiler to run in a chroot without /proc
mounted.

Closes #22642

8 years agoAuto merge of #26935 - oli-obk:const_val_description, r=eddyb
bors [Tue, 21 Jul 2015 16:14:46 +0000 (16:14 +0000)]
Auto merge of #26935 - oli-obk:const_val_description, r=eddyb

r? @eddyb

Adding new variants is annoying as one needs to modify all these places that **don't** handle the new variant.

I chose not to use `Display` as I don't think it is appropriate.

8 years agoWork around unary negation to-be-feature-gated warning by
Felix S. Klock II [Tue, 21 Jul 2015 16:12:06 +0000 (18:12 +0200)]
Work around unary negation to-be-feature-gated warning by
replacing references to `-1` as a `ast::NodeId` with `ast::DUMMY_NODE_ID`,
which seems like a better notation to use (it is currently also `-1`.

(AFAICT the code is not *relying* on the value `-1` anywhere, it
really just needed a dummy value for when the input is `None`.)

8 years agoSidestep warning about repeated E0045 `span_err!` invocation.
Felix S. Klock II [Tue, 21 Jul 2015 15:41:08 +0000 (17:41 +0200)]
Sidestep warning about repeated E0045 `span_err!` invocation.

(That is, take the two expressions with the same message and unify
them into one subroutine.)

8 years agoAuto merge of #27171 - steveklabnik:doc_std_io, r=brson
bors [Tue, 21 Jul 2015 14:41:01 +0000 (14:41 +0000)]
Auto merge of #27171 - steveklabnik:doc_std_io, r=brson

This is the landing page for all of io, so we should have more than just
a sentence here.

r? @alexcrichton and I know @brson has been caring a lot about landing page style docs lately.

8 years agoThis test attempts to exercise cyclic structure much of `std::collections`
Felix S. Klock II [Tue, 21 Jul 2015 14:16:21 +0000 (16:16 +0200)]
This test attempts to exercise cyclic structure much of `std::collections`

(as much as is possible; e.g. things like `EnumSet` and `BitVec` do
not really support carrying references at all, so trying to represent
cyclic structure within them dooes not really make sense.)

8 years agoAuto merge of #27168 - brson:stdprim, r=steveklabnik
bors [Tue, 21 Jul 2015 13:06:45 +0000 (13:06 +0000)]
Auto merge of #27168 - brson:stdprim, r=steveklabnik

This makes the primitive descriptions on the front page read properly
as descriptions of types and not of the associated modules.

Having the primitive and module docs derived from the same source
causes problems, primarily that they can't contain hyperlinks
cross-referencing each other.

This crates dedicated private modules in `std` to document the
primitive types, then for all primitives that have a corresponding
module, puts hyperlinks in moth the primitive docs and the module docs
cross-linking each other.

This should help clear up confusion when readers find themselves on
the wrong page.

This also removes all the duplicate `#[doc(primitive)]` tags in various places (especially core), so the core docs will no longer attempt to document the primitives for now. Seems like an acceptable tradeoff to get some cleanup for std.

8 years agoAuto merge of #27160 - brson:revdoc, r=huonw
bors [Tue, 21 Jul 2015 11:32:54 +0000 (11:32 +0000)]
Auto merge of #27160 - brson:revdoc, r=huonw

This reverts commit 00130cff99f88e13fec87378bdf476cfea6aa147.

As mentioned in a regression report[1], this caused a notable amount
of breakage. Because there's a plan to mitigate[2] this type of
breakage, I'm reverting this until then.

[1]: https://internals.rust-lang.org/t/new-crater-reports-1-1-stable-vs-beta-2015-07-10-and-nightly-2015-07-10/2358
[2]: https://github.com/rust-lang/rfcs/pull/1193

8 years agoGuidance on Windows install re "Add to PATH"
Jonathan Hansford [Mon, 20 Jul 2015 16:40:52 +0000 (17:40 +0100)]
Guidance on Windows install re "Add to PATH"

Updated "Installing Rust" and "After installation" to provide additional
guidance to Windows users on including Rust in the Path system variable.

8 years agoAuto merge of #26816 - nrc:zero-codemap, r=@jroesch
bors [Tue, 21 Jul 2015 09:59:18 +0000 (09:59 +0000)]
Auto merge of #26816 - nrc:zero-codemap, r=@jroesch

See commits for details

8 years agoUse a span from the correct file for the inner span of a module
Nick Cameron [Mon, 6 Jul 2015 02:13:19 +0000 (14:13 +1200)]
Use a span from the correct file for the inner span of a module

This basically only affects modules which are empty (or only contain comments).

Closes #26755

8 years agoTest
Nick Cameron [Fri, 3 Jul 2015 00:54:05 +0000 (12:54 +1200)]
Test

8 years agoProvide a filemap ctor with line info
Nick Cameron [Thu, 2 Jul 2015 05:14:14 +0000 (17:14 +1200)]
Provide a filemap ctor with line info

8 years agoAllow for space between each filemap in the codemap
Nick Cameron [Thu, 2 Jul 2015 03:37:52 +0000 (15:37 +1200)]
Allow for space between each filemap in the codemap

So if a filemap's last byte is at position n in the codemap, then n+1 will not refer to any filemap, and the next filemap will begin an n+2.

This is useful for empty files, it means that every file (even empty ones) has a byte in the codemap.

Closes #23301, #26504

8 years agoAuto merge of #27153 - alexcrichton:flaky-tests, r=brson
bors [Tue, 21 Jul 2015 08:26:19 +0000 (08:26 +0000)]
Auto merge of #27153 - alexcrichton:flaky-tests, r=brson

This commit ensures that the rustc thread does not leak a panic message whenever
a call to `fatal` happens. This already happens for the main rustc thread as
part of the `rustc_driver::monitor` function, but the compiler also spawns
threads for other operations like `-C codegen-units`, and sometimes errors are
emitted on these threads as well. To ensure that there's a consistent
error-handling experience across threads this unifies these two to never print
the panic message in the case of a normal and expected fatal error.

This should also fix the flaky `asm-src-loc-codegen-units.rs` test as the output
is sometimes garbled if diagnostics are printed while the panic message is also
being printed.

8 years agoAuto merge of #27150 - retep998:where-are-my-files, r=alexcrichton
bors [Tue, 21 Jul 2015 06:27:15 +0000 (06:27 +0000)]
Auto merge of #27150 - retep998:where-are-my-files, r=alexcrichton

cc #24570

r? @alexcrichton

8 years agoAuto merge of #27144 - semarie:openbsd-archive_format, r=alexcrichton
bors [Tue, 21 Jul 2015 04:53:50 +0000 (04:53 +0000)]
Auto merge of #27144 - semarie:openbsd-archive_format, r=alexcrichton

the "bsd" archive_format don't work under openbsd.
use of "" (system ar) is ok.
use of "gnu" is ok too.

r? @alexcrichton

8 years agoAuto merge of #27139 - pnkfelix:allow-disable-debuginfo, r=dotdash
bors [Tue, 21 Jul 2015 03:19:43 +0000 (03:19 +0000)]
Auto merge of #27139 - pnkfelix:allow-disable-debuginfo, r=dotdash

fix `configure`: allow both `--enable-debug` and `--disable-debuginfo` in one invocation.

This is my very local fix to allow one to be able to (1.) build `rustc` and (2.) run `make check` with internal debug-mode *assertions* turned on in the presence of bugs like  #26447 and #26484 (both of which are solely caused by debuginfo and thus can be sidestepped via `--disable-debuginfo`).

This partially addresses #24416 (namely, it addresses the papercut outlined in the description of that ticket).  But there are other issues mentioned in the comment thread that are not addressed here, so they should be separately addressed before closing that ticket, or separate bugs should be opened for them.

8 years agoAuto merge of #27103 - wthrowe:doc_format, r=alexcrichton
bors [Tue, 21 Jul 2015 01:41:22 +0000 (01:41 +0000)]
Auto merge of #27103 - wthrowe:doc_format, r=alexcrichton

This fixes a couple of bugs visible on https://doc.rust-lang.org/nightly/std/marker/trait.Sync.html .  For example:
* `impl<T> Sync for *const T` should read `impl<T> !Sync for *const T`
* `impl<T> !Sync for Weak<T>` should read `impl<T> !Sync for Weak<T> where T: ?Sized`

This does change a struct in librustdoc and it seems that almost everything there is marked public, so if librustdoc has stability guarantees that could be a problem.  If it is, I'll find a way to rework the change to avoid modifying public structures.

8 years agoAdd travis config to TRPL: release channels
Steve Klabnik [Tue, 21 Jul 2015 00:12:37 +0000 (20:12 -0400)]
Add travis config to TRPL: release channels

This should help people configure travis to test all three channels.

8 years agoAddress feedback
Brian Anderson [Tue, 21 Jul 2015 00:12:59 +0000 (17:12 -0700)]
Address feedback

8 years agoAdd test of cross-crate impl formatting
William Throwe [Mon, 20 Jul 2015 05:23:46 +0000 (01:23 -0400)]
Add test of cross-crate impl formatting

8 years agoAuto merge of #27129 - arthurprs:debug_atomic, r=alexcrichton
bors [Tue, 21 Jul 2015 00:03:37 +0000 (00:03 +0000)]
Auto merge of #27129 - arthurprs:debug_atomic, r=alexcrichton

I'm being constantly bitten by the lack of this implementation.

I'm unsure if there's a reason to avoid these implementations though.

Since we have a "lossy" implementation for both Mutex and RWLock (RWLock {{ locked }}) I don't think there's a big reason for not having a Debug implementation for the atomic types, even if the user can't specify the ordering.

8 years agostd: Fix compiling the standard library on i686-MSVC
Alex Crichton [Mon, 20 Jul 2015 23:12:48 +0000 (16:12 -0700)]
std: Fix compiling the standard library on i686-MSVC

This commit fixes building the standard library with the `i686-pc-windows-msvc`
target by correcting an included symbol name to the linker.

8 years agoWrite better docs for std::io
Steve Klabnik [Mon, 20 Jul 2015 22:07:35 +0000 (18:07 -0400)]
Write better docs for std::io

This is the landing page for all of io, so we should have more than just
a sentence here.

8 years agoAuto merge of #27056 - Eljay:doc-comments, r=nikomatsakis
bors [Mon, 20 Jul 2015 21:21:24 +0000 (21:21 +0000)]
Auto merge of #27056 - Eljay:doc-comments, r=nikomatsakis

Fixes #23812 by stripping the decoration when desugaring macro doc comments into #[doc] attributes, and detects whether the attribute should be inner or outer style and outputs the appropriate token tree.

8 years agoUpdate docs for take and broadcast
Steve Klabnik [Mon, 20 Jul 2015 19:52:43 +0000 (15:52 -0400)]
Update docs for take and broadcast

Better and more consistent links to their creators.

8 years agostd: Create separate docs for the primitives
Brian Anderson [Mon, 20 Jul 2015 18:21:02 +0000 (11:21 -0700)]
std: Create separate docs for the primitives

Having the primitive and module docs derived from the same source
causes problems, primarily that they can't contain hyperlinks
cross-referencing each other.

This crates dedicated private modules in `std` to document the
primitive types, then for all primitives that have a corresponding
module, puts hyperlinks in moth the primitive docs and the module docs
cross-linking each other.

This should help clear up confusion when readers find themselves on
the wrong page.

8 years agodoc: Clean up primitive short descriptions
Brian Anderson [Fri, 17 Jul 2015 23:28:04 +0000 (16:28 -0700)]
doc: Clean up primitive short descriptions

This makes the primitive descriptions on the front page read properly
as descriptions of types and not of the associated modules.

8 years agoAuto merge of #26831 - arielb1:lifetime-fixes, r=nikomatsakis
bors [Mon, 20 Jul 2015 19:46:46 +0000 (19:46 +0000)]
Auto merge of #26831 - arielb1:lifetime-fixes, r=nikomatsakis

r? @nikomatsakis

8 years agoDocument structures in std::io::utils
Steve Klabnik [Mon, 20 Jul 2015 18:41:00 +0000 (14:41 -0400)]
Document structures in std::io::utils

These provide various special readers, so point their docs to their
constructor functions in a manner consistent with everything else.

8 years agoAuto merge of #27064 - alexcrichton:into-raw-os, r=brson
bors [Mon, 20 Jul 2015 18:12:40 +0000 (18:12 +0000)]
Auto merge of #27064 - alexcrichton:into-raw-os, r=brson

This commit is an implementation of [RFC 1174][rfc] which adds three new traits
to the standard library:

* `IntoRawFd` - implemented on Unix for all I/O types (files, sockets, etc)
* `IntoRawHandle` - implemented on Windows for files, processes, etc
* `IntoRawSocket` - implemented on Windows for networking types

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1174-into-raw-fd-socket-handle-traits.md

Closes #27062

8 years agoAdd diagnostics for E0172, fix inline error message for E0139
Alisdair Owens [Sun, 19 Jul 2015 14:18:09 +0000 (15:18 +0100)]
Add diagnostics for E0172, fix inline error message for E0139

8 years agoRevert "Fix `missing_docs` lint for const and static."
Brian Anderson [Mon, 20 Jul 2015 17:41:52 +0000 (10:41 -0700)]
Revert "Fix `missing_docs` lint for const and static."

This reverts commit 00130cff99f88e13fec87378bdf476cfea6aa147.

As mentioned in a regression report[1], this caused a notable amount
of breakage.  Because there's a plan to mitigate[2] this type of
breakage, I'm reverting this until then.

[1]: https://internals.rust-lang.org/t/new-crater-reports-1-1-stable-vs-beta-2015-07-10-and-nightly-2015-07-10/2358
[2]: https://github.com/rust-lang/rfcs/pull/1193

8 years agoImprove Debug impl for File on Windows
Peter Atashian [Mon, 20 Jul 2015 17:24:34 +0000 (13:24 -0400)]
Improve Debug impl for File on Windows
Adds a path field if a path could be obtained

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoDocument iterators in std::io
Steve Klabnik [Mon, 20 Jul 2015 17:16:57 +0000 (13:16 -0400)]
Document iterators in std::io

Make them all consistent and link up the documentation.

8 years agoFix wording nit for E0253
Alisdair Owens [Mon, 20 Jul 2015 17:14:12 +0000 (18:14 +0100)]
Fix wording nit for E0253

8 years agoimpl Debug for Atomic types
arthurprs [Sun, 19 Jul 2015 16:11:30 +0000 (13:11 -0300)]
impl Debug for Atomic types

8 years agoadd test for #10436
Andrew Paseltiner [Mon, 20 Jul 2015 16:59:33 +0000 (12:59 -0400)]
add test for #10436

closes #10436

8 years agoRegister new snapshots
Alex Crichton [Fri, 17 Jul 2015 15:17:43 +0000 (08:17 -0700)]
Register new snapshots

These new snapshots contain the knowledge of how to build the new triples of
32-bit MSVC and 32-bit FreeBSD, both of which should soon start having
nightlies/auto builders!

This does not currently register bitrig/freebsd snapshots but I believe those
will be retroactively added in the near future.

8 years agoAuto merge of #27026 - nagisa:overflowing-unsigned, r=pnkfelix
bors [Mon, 20 Jul 2015 16:38:33 +0000 (16:38 +0000)]
Auto merge of #27026 - nagisa:overflowing-unsigned, r=pnkfelix

This commit fixes the negate_unsigned feature gate to appropriately
account for inferred variables.

This is technically a [breaking-change], but I’d consider it a bug fix.

cc @brson for your relnotes.

Fixes https://github.com/rust-lang/rust/issues/24676
Fixes #26840
Fixes https://github.com/rust-lang/rust/issues/25206

8 years agosyntax: Suppress panic message on `fatal`
Alex Crichton [Mon, 20 Jul 2015 16:23:31 +0000 (09:23 -0700)]
syntax: Suppress panic message on `fatal`

This commit ensures that the rustc thread does not leak a panic message whenever
a call to `fatal` happens. This already happens for the main rustc thread as
part of the `rustc_driver::monitor` function, but the compiler also spawns
threads for other operations like `-C codegen-units`, and sometimes errors are
emitted on these threads as well. To ensure that there's a consistent
error-handling experience across threads this unifies these two to never print
the panic message in the case of a normal and expected fatal error.

This should also fix the flaky `asm-src-loc-codegen-units.rs` test as the output
is sometimes garbled if diagnostics are printed while the panic message is also
being printed.

8 years agostd: Add IntoRaw{Fd,Handle,Socket} traits
Alex Crichton [Thu, 16 Jul 2015 06:31:24 +0000 (23:31 -0700)]
std: Add IntoRaw{Fd,Handle,Socket} traits

This commit is an implementation of [RFC 1174][rfc] which adds three new traits
to the standard library:

* `IntoRawFd` - implemented on Unix for all I/O types (files, sockets, etc)
* `IntoRawHandle` - implemented on Windows for files, processes, etc
* `IntoRawSocket` - implemented on Windows for networking types

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1174-into-raw-fd-socket-handle-traits.md

Closes #27062