Commit Graph

45143 Commits

Author SHA1 Message Date
Steve Klabnik
932f0bb5c3 Rollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichton
Better and more consistent links to their creators.
2015-07-22 12:56:51 -04:00
Steve Klabnik
6397ecb3ca Rollup merge of #27166 - steveklabnik:doc_std_io_linewriter, r=alexcrichton
Beef up the struct docs, add examples for the methods.

r? @alexcrichton
2015-07-22 12:56:51 -04:00
Steve Klabnik
47f1286d56 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
2015-07-22 12:56:50 -04:00
Steve Klabnik
cc60f3f472 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
2015-07-22 12:56:50 -04:00
Steve Klabnik
5f0c9983f6 Rollup merge of #27158 - apasel422:issue-14382, r=alexcrichton
closes #14382
2015-07-22 12:56:50 -04:00
Steve Klabnik
558008b0f0 Rollup merge of #27157 - steveklabnik:doc_std_io_iterators, r=alexcrichton
Make them all consistent and link up the documentation.

r? @alexcrichton
2015-07-22 12:56:50 -04:00
Steve Klabnik
b73c6fe8f2 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
2015-07-22 12:56:49 -04:00
Steve Klabnik
239657c377 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.
2015-07-22 12:56:49 -04:00
Steve Klabnik
2375ef5327 Rollup merge of #27154 - apasel422:issue-10436, r=Gankro
closes #10436
2015-07-22 12:56:49 -04:00
Steve Klabnik
6b0833a597 Rollup merge of #27151 - pfalabella:patch-2, r=steveklabnik
I'm pretty sure this was a typo
2015-07-22 12:56:49 -04:00
Steve Klabnik
cb5d9a311d Rollup merge of #27147 - apasel422:issue-19404, r=alexcrichton
closes #19404
2015-07-22 12:56:48 -04:00
Steve Klabnik
70bbdd7eb6 Rollup merge of #27146 - apasel422:issue-14229, r=alexcrichton
closes #14229
2015-07-22 12:56:48 -04:00
Steve Klabnik
0ac7438c9b 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
2015-07-22 12:56:48 -04:00
Steve Klabnik
db0e0efa78 Rollup merge of #27131 - apasel422:issue-20162, r=arielb1
closes #20162
2015-07-22 12:56:48 -04:00
Steve Klabnik
5a44f70f75 Rollup merge of #27127 - AlisdairO:diagnostics172, r=Manishearth
As title :-)

Part of #24407.
r? @Manishearth
2015-07-22 12:56:47 -04:00
Steve Klabnik
bc4daf7e94 Rollup merge of #27084 - GuillaumeGomez:patch-2, r=brson
Part of #24407.
r? @Manishearth
2015-07-22 12:56:47 -04:00
Steve Klabnik
103749d933 Improve documentation for std::io::Cursor
Beef up the docs on the type, as well as adding examples for all
methods.
2015-07-22 11:42:59 -04:00
Steve Klabnik
e31ad959cc Improve documentation for std::io::LineWriter
Beef up the struct docs, add examples for the methods.
2015-07-22 10:19:36 -04:00
Felix S. Klock II
505cd8a3cc Add test of placement-in syntax, analogous to new-box-syntax.rs 2015-07-22 15:34:01 +02:00
Felix S. Klock II
7a700341e7 refine set of allowed warnings in new-box-syntax.rs test. 2015-07-22 15:34:01 +02:00
Felix S. Klock II
a81f88d4d6 Add actual use of the struct Structure lying dormant in new-box-syntax.rs.
The original test program exercised the (garbage-collected heap)
allocation form `box (GC) ...`, feeding an instance of `Structure` in
as the expression. This obviously went away when `GC` went away, but
there's no reason for us not to include an appropriate unit test here
for the same form, just for heap-allocated instances of `Structure`.
2015-07-22 15:34:01 +02:00
Felix S. Klock II
9d6cc05a06 uncomment feature-gate testing for in PLACE BLOCK now that its in the parser. 2015-07-22 15:34:01 +02:00
Felix S. Klock II
9f6f35bef4 Added support for parsing in PLACE { BLOCK_CONTENT }. 2015-07-22 15:34:01 +02:00
Felix S. Klock II
e0b44797ce Add new feature gate opt-in necessary for new-box-syntax.rs. 2015-07-22 15:34:00 +02:00
Felix S. Klock II
80465334aa Update issue-14084.rs test to reflect changes to error output. 2015-07-22 15:34:00 +02:00
Felix S. Klock II
a9d79978b6 Update the intrinsic-move-val.rs test to reflect its newer signature. 2015-07-22 15:34:00 +02:00
Felix S. Klock II
4a5fb4bd2a Add necessary feature gate opt-in for the pushpop_unsafe test. 2015-07-22 15:34:00 +02:00
Felix S. Klock II
bb952358aa Factor feature gate tests for box syntax into two separate files.
The two tests are separate since the current implementation performs
the feature gate checks at distinct phases in the compilation, with an
`abort_if_errors` calls separating them.
2015-07-22 15:34:00 +02:00
Felix S. Klock II
9ca1c61879 Instrumentation in effort to understand treatment of allow_internal_unstable.
It is all `debug!` instrumentation so it should not impose a cost on
non-debug builds.
2015-07-22 15:34:00 +02:00
Felix S. Klock II
07afe91fda Allow unstable code to be injected by placement-in expansion.
(Over time the stability checking has gotten more finicky; in
particular one must attach the (whole) span of the original `in PLACE
BLOCK` expression to the injected references to unstable paths, as
noted in the comments.)

call `push_compiler_expansion` during the placement-`in` expansion.
2015-07-22 15:34:00 +02:00
Felix S. Klock II
cb5f0b4971 Avoid feature-warnings on stage0. 2015-07-22 15:34:00 +02:00
Felix S. Klock II
75da81e782 Change signature for move_val_init intrinsic to take *mut T for dest.
rebase update to typeck/check/mod.rs
2015-07-22 15:34:00 +02:00
Felix S. Klock II
b325e4f28e Add feature-gates for desugaring-based box and placement-in.
update test/compile-fail/feature-gate-box-expr.rs to reflect new feature gates.

Part of what lands with Issue 22181.
2015-07-22 15:33:59 +02:00
Felix S. Klock II
d79bbbc4ef Revise placement-in expansion to use push/pop_unsafe and move_val_init. 2015-07-22 15:33:59 +02:00
Felix S. Klock II
866250c6d4 prototype Placer protocol for unstable overloaded-box and placement-in. 2015-07-22 15:33:59 +02:00
Felix S. Klock II
1829fa5199 Hack for "unsafety hygiene" -- push_unsafe! and pop_unsafe!.
Even after expansion, the generated expressions still track depth of
such pushes (i.e. how often you have "pushed" without a corresponding
"pop"), and we add a rule that in a context with a positive
`push_unsafe!` depth, it is effectively an `unsafe` block context.

(This way, we can inject code that uses `unsafe` features, but still
contains within it a sub-expression that should inherit the outer
safety checking setting, outside of the injected code.)

This is a total hack; it not only needs a feature-gate, but probably
should be feature-gated forever (if possible).

ignore-pretty in test/run-pass/pushpop-unsafe-okay.rs
2015-07-22 15:33:59 +02:00
Alisdair Owens
dd3ac9058a Add long diagnostics for E0223 and E0225 2015-07-22 13:52:48 +01:00
bors
d4d4206e56 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.
2015-07-22 12:49:06 +00:00
bors
25281b121f 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.
2015-07-22 09:13:09 +00:00
Jonathan Hansford
f2c73459ac Path changed to %PATH%
The two references to the "Path system variable" have changed to the
"%PATH% system variable".
2015-07-22 08:26:40 +01:00
Steve Klabnik
e22c6f7caa Improve documentation for std::io::BufWriter
Mostly through adding examples.
2015-07-22 01:21:17 -04:00
Alex Crichton
a0efd3a3d9 trans: Be a little more picky about dllimport
Currently you can hit a link error on MSVC by only referencing static items from
a crate (no functions for example) and then link to the crate statically (as all
Rust crates do 99% of the time). A detailed investigation can be found [on
github][details], but the tl;dr is that we need to stop applying dllimport so
aggressively.

This commit alters the application of dllimport on constants to only cases where
the crate the constant originated from will be linked as a dylib in some output
crate type. That way if we're just linking rlibs (like the motivation for this
issue) we won't use dllimport. For the compiler, however, (which has lots of
dylibs) we'll use dllimport.

[details]: https://github.com/rust-lang/rust/issues/26591#issuecomment-123513631

cc #26591
2015-07-21 21:31:25 -07:00
bors
90904204d6 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.
2015-07-22 04:21:46 +00:00
bors
d33cab1b1f Auto merge of #27172 - alexcrichton:snapshots, r=brson
Enables bootstrapping a 32-bit MSVC host compiler!

Closes #26602
2015-07-22 00:29:08 +00:00
Alex Crichton
c35b2bd226 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.
2015-07-21 16:08:11 -07:00
bors
39a780dcbe 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 😄

r? @pnkfelix
2015-07-21 22:23:34 +00:00
Marcus Klaas
b36d107b83 Assign proper span to range expression 2015-07-21 23:04:23 +02:00
Andrew Paseltiner
18f115c2bb update compile-fail test for #21174 to account for #27127 2015-07-21 16:58:26 -04:00
bors
ee2d3bc8a2 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
2015-07-21 20:51:04 +00:00
Aidan Hobson Sayers
7af865b333 Static linking 2015-07-21 21:11:52 +01:00