]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agostd: Tweak tests of std::time
Alex Crichton [Mon, 23 Nov 2015 22:51:45 +0000 (14:51 -0800)]
std: Tweak tests of std::time

Typical algebra currently doesn't work on the types in std::time currently (see
[this comment][comment]), so tweak the tests to account for this property.

[comment]: https://github.com/rust-lang/rust/issues/29866#issuecomment-159093809

Closes #29970

8 years agoAuto merge of #29716 - Manishearth:repr-error, r=Gankro
bors [Sun, 22 Nov 2015 08:43:22 +0000 (08:43 +0000)]
Auto merge of #29716 - Manishearth:repr-error, r=Gankro

r? @Gankro

8 years agoAuto merge of #29980 - Manishearth:missing-diag, r=eddyb
bors [Sun, 22 Nov 2015 06:42:56 +0000 (06:42 +0000)]
Auto merge of #29980 - Manishearth:missing-diag, r=eddyb

None

8 years agoImprove transmute diagnostics with a note about destructors
Manish Goregaokar [Sun, 22 Nov 2015 04:56:50 +0000 (10:26 +0530)]
Improve transmute diagnostics with a note about destructors

fixes #29922

8 years agoRegister diagnostics for rustc_privacy and rustc_trans properly
Manish Goregaokar [Sun, 22 Nov 2015 04:52:25 +0000 (10:22 +0530)]
Register diagnostics for rustc_privacy and rustc_trans properly

fixes #29665

8 years agoAuto merge of #29968 - Manishearth:bang-macro-diag, r=eddyb
bors [Sun, 22 Nov 2015 04:13:49 +0000 (04:13 +0000)]
Auto merge of #29968 - Manishearth:bang-macro-diag, r=eddyb

r? @eddyb

fixes #5780

8 years agoLook up macro names as well when suggesting replacements for function resolve errors
Manish Goregaokar [Sat, 21 Nov 2015 09:37:50 +0000 (15:07 +0530)]
Look up macro names as well when suggesting replacements for function resolve errors

fixes #5780

8 years agoAuto merge of #29963 - dotdash:fat_copy, r=eddyb
bors [Sat, 21 Nov 2015 22:08:26 +0000 (22:08 +0000)]
Auto merge of #29963 - dotdash:fat_copy, r=eddyb

Since fat pointers do not qualify as structural types, they got copied
using load_ty and store_ty, which means that we load an FCA and use
extractvalue to get the components of the fat pointer. This breaks
certain optimizations in LLVM.

Found via apasel422/ref_count#13

8 years agoAuto merge of #29966 - MatthiasKauer:master, r=steveklabnik
bors [Sat, 21 Nov 2015 06:06:16 +0000 (06:06 +0000)]
Auto merge of #29966 - MatthiasKauer:master, r=steveklabnik

This commit changes the location of the rust docs.
https://github.com/rust-lang/rust/commit/024aa9a345e92aa1926517c4d9b16bd83e74c10d
Clicking the contribution link on the front page therefore becomes a 'not found' error.

8 years agoAuto merge of #29948 - devonhollowood:fromstr-parse, r=steveklabnik
bors [Sat, 21 Nov 2015 04:22:15 +0000 (04:22 +0000)]
Auto merge of #29948 - devonhollowood:fromstr-parse, r=steveklabnik

Implement #29919

8 years agoAuto merge of #29913 - tbu-:pr_windows_path_error_on_nul, r=alexcrichton
bors [Sat, 21 Nov 2015 02:38:18 +0000 (02:38 +0000)]
Auto merge of #29913 - tbu-:pr_windows_path_error_on_nul, r=alexcrichton

On Windows: Previously these paths were silently truncated at these NUL
characters, now they fail with `ErrorKind::InvalidInput`.

8 years agoAlso check for NULs in environment variables
Tobias Bucher [Thu, 19 Nov 2015 18:01:11 +0000 (18:01 +0000)]
Also check for NULs in environment variables

This check is necessary, because the underlying API only reads strings
until the first NUL.

8 years agoAuto merge of #29916 - Manishearth:diag-401, r=steveklabnik
bors [Sat, 21 Nov 2015 00:54:16 +0000 (00:54 +0000)]
Auto merge of #29916 - Manishearth:diag-401, r=steveklabnik

None

8 years agochange link on book front page trpl -> book
Matthias Kauer [Fri, 20 Nov 2015 23:49:25 +0000 (07:49 +0800)]
change link on book front page trpl -> book

8 years agoAuto merge of #29961 - alexcrichton:order-dependent, r=brson
bors [Fri, 20 Nov 2015 22:08:19 +0000 (22:08 +0000)]
Auto merge of #29961 - alexcrichton:order-dependent, r=brson

This commit fixes a bug where a crate could fail to compile depending on the
order of `extern crate` directives at the top of the crate. Specifically, if the
same crate is found at two locations, then if it's loaded first via `--extern`
it will not emit a duplicate warning, but if it's first loaded transitively
via a dep and *then* via `--extern` an error will be emitted.

The loader was tweaked to catch this scenario and coalesce the loading of these
two crates to prevent errors from being emitted.

8 years agoAvoid FCA loads and extractvalue when copying fat pointers
Björn Steinbrink [Fri, 20 Nov 2015 20:42:13 +0000 (21:42 +0100)]
Avoid FCA loads and extractvalue when copying fat pointers

Since fat pointers do not qualify as structural types, they got copied
using load_ty and store_ty, which means that we load an FCA and use
extractvalue to get the components of the fat pointer. This breaks
certain optimizations in LLVM.

Found via apasel422/ref_count#13

8 years agoAuto merge of #29945 - nrc:save-crate-name, r=alexcrichton
bors [Fri, 20 Nov 2015 20:03:16 +0000 (20:03 +0000)]
Auto merge of #29945 - nrc:save-crate-name, r=alexcrichton

r? @alexcrichton

This prevents outputting csv files with the same name and thus overwriting each other when indexing Cargo projects with a bin crate (and some other cases).

8 years agorustc: Fix `extern crate` being order dependent
Alex Crichton [Wed, 21 Oct 2015 04:05:39 +0000 (21:05 -0700)]
rustc: Fix `extern crate` being order dependent

This commit fixes a bug where a crate could fail to compile depending on the
order of `extern crate` directives at the top of the crate. Specifically, if the
same crate is found at two locations, then if it's loaded first via `--extern`
it will not emit a duplicate warning, but if it's first loaded transitively
via a dep and *then* via `--extern` an error will be emitted.

The loader was tweaked to catch this scenario and coalesce the loading of these
two crates to prevent errors from being emitted.

8 years agoAuto merge of #29822 - petrochenkov:pubexport, r=alexcrichton
bors [Fri, 20 Nov 2015 18:13:10 +0000 (18:13 +0000)]
Auto merge of #29822 - petrochenkov:pubexport, r=alexcrichton

This patch implements the plan described in https://internals.rust-lang.org/t/privacy-and-its-interaction-with-docs-lints-and-stability/2880 with one deviation.

It turns out, that rustdoc needs the "directly public" set for its docs inlining logic, so the privacy pass have to produce three sets and not two. Three is arguably too many, so I merged them in one map:
`public_items/exported_items/reachable_items: NodeSet => access_levels: NodeMap<AccessLevel>`

r? @alexcrichton

8 years agoAdd E0517, E0518 for repr() errors
Manish Goregaokar [Mon, 9 Nov 2015 16:43:55 +0000 (22:13 +0530)]
Add E0517, E0518 for repr() errors

8 years agoAuto merge of #29951 - fhahn:fix-plugin-compiler-example, r=steveklabnik
bors [Fri, 20 Nov 2015 15:26:35 +0000 (15:26 +0000)]
Auto merge of #29951 - fhahn:fix-plugin-compiler-example, r=steveklabnik

PR for #29930. Adds missing #![feature(slice_patterns)] to make compiler plugin example compile again.

8 years agoRemove slice pattern from compiler plugin example
Florian Hahn [Fri, 20 Nov 2015 11:19:05 +0000 (12:19 +0100)]
Remove slice pattern from compiler plugin example

closes #29930

8 years agoAuto merge of #29950 - fhahn:small-doc-fix-rename-var, r=bluss
bors [Fri, 20 Nov 2015 12:30:00 +0000 (12:30 +0000)]
Auto merge of #29950 - fhahn:small-doc-fix-rename-var, r=bluss

This tiny PR renames the result variable in HashSet's `intersection` example from `diff` to `intersection` and the same for `union`, which seem more appropriate.

8 years agoRename result variable in HashSet's intersection and union examples
Florian Hahn [Fri, 20 Nov 2015 10:39:28 +0000 (11:39 +0100)]
Rename result variable in HashSet's intersection and union examples

8 years agoAuto merge of #29534 - oli-obk:fix/const_fn_eval, r=dotdash
bors [Fri, 20 Nov 2015 09:48:11 +0000 (09:48 +0000)]
Auto merge of #29534 - oli-obk:fix/const_fn_eval, r=dotdash

8 years agoAdd information about str::parse() in FromStr docs
Devon Hollowood [Fri, 20 Nov 2015 08:41:10 +0000 (00:41 -0800)]
Add information about str::parse() in FromStr docs

8 years agoAuto merge of #29943 - brson:inline-threshold, r=nrc
bors [Fri, 20 Nov 2015 05:09:24 +0000 (05:09 +0000)]
Auto merge of #29943 - brson:inline-threshold, r=nrc

Corresponds directly to llvm's inline-threshold.

I want this so I can experiment out-of-tree with tweaking optimization settings, and this is the most important value that isn't exposed. I can't get it to work either via `-C llvm-args`.

cc @rust-lang/compiler

8 years agoAuto merge of #29942 - brson:rmsegstack, r=alexcrichton
bors [Fri, 20 Nov 2015 03:26:19 +0000 (03:26 +0000)]
Auto merge of #29942 - brson:rmsegstack, r=alexcrichton

8 years agosave-analysis: make the dump file's name closer to the crate file's name
Nick Cameron [Fri, 20 Nov 2015 02:00:10 +0000 (15:00 +1300)]
save-analysis: make the dump file's name closer to the crate file's name

8 years agoAuto merge of #29939 - mitaa:doc_const_fn, r=alexcrichton
bors [Fri, 20 Nov 2015 01:40:03 +0000 (01:40 +0000)]
Auto merge of #29939 - mitaa:doc_const_fn, r=alexcrichton

fixes #27362

8 years agoAdd -C inline-threshold
Brian Anderson [Fri, 20 Nov 2015 00:07:09 +0000 (16:07 -0800)]
Add -C inline-threshold

Corresponds directly to llvm's inline-threshold

8 years agoRemove segmented stack option from LLVMRustCreateTargetMachine. Unused.
Brian Anderson [Thu, 19 Nov 2015 19:32:16 +0000 (11:32 -0800)]
Remove segmented stack option from LLVMRustCreateTargetMachine. Unused.

8 years agoAuto merge of #29894 - alexcrichton:stdtime, r=brson
bors [Thu, 19 Nov 2015 23:57:07 +0000 (23:57 +0000)]
Auto merge of #29894 - alexcrichton:stdtime, r=brson

This commit is an implementation of [RFC 1288][rfc] which adds two new unstable
types to the `std::time` module. The `Instant` type is used to represent
measurements of a monotonically increasing clock suitable for measuring time
withing a process for operations such as benchmarks or just the elapsed time to
do something. An `Instant` favors panicking when bugs are found as the bugs are
programmer errors rather than typical errors that can be encountered.

[rfc]: https://github.com/rust-lang/rfcs/pull/1288

The `SystemTime` type is used to represent a system timestamp and is not
monotonic. Very few guarantees are provided about this measurement of the system
clock, but a fixed point in time (`UNIX_EPOCH`) is provided to learn about the
relative distance from this point for any particular time stamp.

This PR takes the same implementation strategy as the `time` crate on crates.io,
namely:

|  Platform  |  Instant                 |  SystemTime              |
|------------|--------------------------|--------------------------|
| Windows    | QueryPerformanceCounter  | GetSystemTimeAsFileTime  |
| OSX        | mach_absolute_time       | gettimeofday             |
| Unix       | CLOCK_MONOTONIC          | CLOCK_REALTIME           |

These implementations can perhaps be refined over time, but they currently
satisfy the requirements of the `Instant` and `SystemTime` types while also
being portable across implementations and revisions of each platform.

cc #29866

8 years agoAuto merge of #29901 - tbu-:pr_env_ignore_malformed_windows, r=alexcrichton
bors [Thu, 19 Nov 2015 22:15:13 +0000 (22:15 +0000)]
Auto merge of #29901 - tbu-:pr_env_ignore_malformed_windows, r=alexcrichton

See also #29297.

8 years agoShow constness for functions of reexported docs
mitaa [Thu, 19 Nov 2015 15:27:17 +0000 (16:27 +0100)]
Show constness for functions of reexported docs

8 years agoFix rustdocs `unsafe const fn` ordering
mitaa [Thu, 19 Nov 2015 20:08:50 +0000 (21:08 +0100)]
Fix rustdocs `unsafe const fn` ordering

8 years agoAdd run-pass test for paths containing the NUL character
Tobias Bucher [Thu, 19 Nov 2015 14:18:09 +0000 (14:18 +0000)]
Add run-pass test for paths containing the NUL character

8 years agoError when paths contain NUL characters
Tobias Bucher [Wed, 18 Nov 2015 14:49:23 +0000 (14:49 +0000)]
Error when paths contain NUL characters

On Windows: Previously these paths were silently truncated at these NUL
characters, now they fail with `ErrorKind::InvalidInput`.

8 years agoRe-unignore environment test on MinGW
Tobias Bucher [Thu, 19 Nov 2015 19:07:27 +0000 (19:07 +0000)]
Re-unignore environment test on MinGW

8 years agoIgnore malformed environment variables on Windows too
Tobias Bucher [Tue, 17 Nov 2015 23:33:34 +0000 (23:33 +0000)]
Ignore malformed environment variables on Windows too

Leading equals symbols are treated as part of the variable name, if
there is no other equality symbol or none at all, the environment string
is ignored.

8 years agoAuto merge of #29925 - Ms2ger:fmt-trans-base, r=luqmana
bors [Thu, 19 Nov 2015 19:51:27 +0000 (19:51 +0000)]
Auto merge of #29925 - Ms2ger:fmt-trans-base, r=luqmana

8 years agostd: Add Instant and SystemTime to std::time
Alex Crichton [Tue, 17 Nov 2015 01:36:14 +0000 (17:36 -0800)]
std: Add Instant and SystemTime to std::time

This commit is an implementation of [RFC 1288][rfc] which adds two new unstable
types to the `std::time` module. The `Instant` type is used to represent
measurements of a monotonically increasing clock suitable for measuring time
withing a process for operations such as benchmarks or just the elapsed time to
do something. An `Instant` favors panicking when bugs are found as the bugs are
programmer errors rather than typical errors that can be encountered.

[rfc]: https://github.com/rust-lang/rfcs/pull/1288

The `SystemTime` type is used to represent a system timestamp and is not
monotonic. Very few guarantees are provided about this measurement of the system
clock, but a fixed point in time (`UNIX_EPOCH`) is provided to learn about the
relative distance from this point for any particular time stamp.

This PR takes the same implementation strategy as the `time` crate on crates.io,
namely:

|  Platform  |  Instant                 |  SystemTime              |
|------------|--------------------------|--------------------------|
| Windows    | QueryPerformanceCounter  | GetSystemTimeAsFileTime  |
| OSX        | mach_absolute_time       | gettimeofday             |
| Unix       | CLOCK_MONOTONIC          | CLOCK_REALTIME           |

These implementations can perhaps be refined over time, but they currently
satisfy the requirements of the `Instant` and `SystemTime` types while also
being portable across implementations and revisions of each platform.

8 years agoAuto merge of #29932 - steveklabnik:trpl_book, r=brson
bors [Thu, 19 Nov 2015 16:49:20 +0000 (16:49 +0000)]
Auto merge of #29932 - steveklabnik:trpl_book, r=brson

The book was located under 'src/doc/trpl' because originally, it was
going to be hosted under that URL. Late in the game, before 1.0, we
decided that /book was a better one, so we changed the output, but
not the input. This causes confusion for no good reason. So we'll change
the source directory to look like the output directory, like for every
other thing in src/doc.

r? @brson

8 years agosrc/doc/trpl -> src/doc/book
Steve Klabnik [Thu, 19 Nov 2015 16:30:18 +0000 (11:30 -0500)]
src/doc/trpl -> src/doc/book

The book was located under 'src/doc/trpl' because originally, it was
going to be hosted under that URL. Late in the game, before 1.0, we
decided that /book was a better one, so we changed the output, but
not the input. This causes confusion for no good reason. So we'll change
the source directory to look like the output directory, like for every
other thing in src/doc.

8 years agoAvoid a string allocation.
Ms2ger [Thu, 19 Nov 2015 11:37:13 +0000 (12:37 +0100)]
Avoid a string allocation.

8 years agoRustfmt trans/base.rs.
Ms2ger [Thu, 19 Nov 2015 11:36:31 +0000 (12:36 +0100)]
Rustfmt trans/base.rs.

8 years agoChanges to data produced by privacy pass
Vadim Petrochenkov [Thu, 19 Nov 2015 11:16:35 +0000 (14:16 +0300)]
Changes to data produced by privacy pass

8 years agoAuto merge of #29917 - shssoichiro:doc-sidebar-order, r=alexcrichton
bors [Thu, 19 Nov 2015 02:51:15 +0000 (02:51 +0000)]
Auto merge of #29917 - shssoichiro:doc-sidebar-order, r=alexcrichton

A race condition in Javascript was causing unpredictable ordering
of the sidebar boxes when loading documentation generated by
rustdoc, due to the script that adds the Crates box being executed
asynchronously. Disabling the asynchronous execution and deferring
this script should ensure that the Crates box always appears last
in the sidebox (this seemed to be the more common ordering prior
to this change).

Fixes #29698

8 years agoAuto merge of #29903 - nikomatsakis:incr-comp-ool-items, r=mw,nrc
bors [Thu, 19 Nov 2015 01:01:30 +0000 (01:01 +0000)]
Auto merge of #29903 - nikomatsakis:incr-comp-ool-items, r=mw,nrc

This PR moves items into a separate map stored in the krate, rather than storing them inline in the HIR. The HIR visitor is also modified to skip visiting nested items by default. The goal here is to ensure that if you get access to the HIR for one item, you don't automatically get access to a bunch of other items, for better dependency tracking.

r? @nrc
cc @eddyb

8 years agoUpdate unit tests in driver.
Niko Matsakis [Wed, 18 Nov 2015 17:47:37 +0000 (12:47 -0500)]
Update unit tests in driver.

8 years agominor fixes to #[cfg(test)] code
Niko Matsakis [Wed, 18 Nov 2015 17:29:35 +0000 (12:29 -0500)]
minor fixes to #[cfg(test)] code

8 years agoratchet down the recursion limit because, at least in my testing,
Niko Matsakis [Wed, 18 Nov 2015 17:27:35 +0000 (12:27 -0500)]
ratchet down the recursion limit because, at least in my testing,
under some configurations this still causes a stack overflow and
hence a crash

8 years agoPatch graphviz tests to account for the fact that nested items are not
Niko Matsakis [Wed, 18 Nov 2015 14:33:06 +0000 (09:33 -0500)]
Patch graphviz tests to account for the fact that nested items are not
listed (an improvement, I think).

8 years agoFix two long lines.
Niko Matsakis [Wed, 18 Nov 2015 11:14:26 +0000 (06:14 -0500)]
Fix two long lines.

8 years agoModify trans to use an outer walk and ensure that we rotate as we
Niko Matsakis [Wed, 18 Nov 2015 10:38:50 +0000 (05:38 -0500)]
Modify trans to use an outer walk and ensure that we rotate as we
encounter each module. This is somewhat different than how it used to
work; it should ensure a more equitable distribution of work than
before. The reason is that, before, when we rotated, we would rotate
before we had seen the full contents of the current module. So e.g.  if
we have `mod a { mod b { .. } .. }`, then we rotate when we encounter
`b`, but we haven't processed the remainder of `a` yet. Unclear if this
makes any difference in practice, but it seemed suboptimal. Also, this
structure (with an outer walk over modules) is closer to what we will
want for an incremental setting.

8 years agoRemove rustc_data_structures from the deps of librustc_front now
Niko Matsakis [Wed, 18 Nov 2015 10:10:38 +0000 (05:10 -0500)]
Remove rustc_data_structures from the deps of librustc_front now
that we no longer use FnvHashMap

8 years agoChange to a BTreeMap rather than sorting the keys of a FnvHashMap.
Niko Matsakis [Wed, 18 Nov 2015 09:16:25 +0000 (04:16 -0500)]
Change to a BTreeMap rather than sorting the keys of a FnvHashMap.

8 years agoAdd comment explaining why it is called `intravisit`
Niko Matsakis [Wed, 18 Nov 2015 02:44:39 +0000 (21:44 -0500)]
Add comment explaining why it is called `intravisit`

8 years agoPort trans to use visit_all_items: this was mostly straight-forward, but
Niko Matsakis [Tue, 17 Nov 2015 23:57:04 +0000 (18:57 -0500)]
Port trans to use visit_all_items: this was mostly straight-forward, but
noteworthy because trans got mildly simpler, since it doesn't have to
ensure that we walk the contents of all things just to find all the
hidden items.

8 years agoVarious straight-forward ports that override `visit_nested_items`
Niko Matsakis [Tue, 17 Nov 2015 23:56:13 +0000 (18:56 -0500)]
Various straight-forward ports that override `visit_nested_items`
to do "in-situ" visits.

8 years agoPort entry code to `visit_all_items` -- since this was tracking whether
Niko Matsakis [Tue, 17 Nov 2015 23:54:21 +0000 (18:54 -0500)]
Port entry code to `visit_all_items` -- since this was tracking whether
the main fn appeared at the top level, if now consults the `DefPath` to
get this information

8 years agoPort a bunch of code new-visitor; all of these ports were
Niko Matsakis [Tue, 17 Nov 2015 22:51:44 +0000 (17:51 -0500)]
Port a bunch of code new-visitor; all of these ports were
straightforward uses of `visit_all_items`. In some cases I had to remove
empty `visit_item` calls that were just to suppress visiting nested
items.

8 years agoRework the `IdVisitor` so that it only visits item contents (and doesn't
Niko Matsakis [Tue, 17 Nov 2015 22:47:51 +0000 (17:47 -0500)]
Rework the `IdVisitor` so that it only visits item contents (and doesn't
visit nested items). This is what all clients wanted anyhow.

8 years agoPort the `map` construction code to use the new visitor.
Niko Matsakis [Tue, 17 Nov 2015 22:38:23 +0000 (17:38 -0500)]
Port the `map` construction code to use the new visitor.

8 years agoRefactor the HIR so that items are stored in a map in the `Crate`,
Niko Matsakis [Tue, 17 Nov 2015 22:32:12 +0000 (17:32 -0500)]
Refactor the HIR so that items are stored in a map in the `Crate`,
rather being stored inline. Refactor (and rename) the visitor so that
(by default) it only visits the interior content of an item not nested
items.

This is a [breaking-change] for anyone who uses the HIR visitor. Besides
changing `visit::` to `intravisit::`, you need to refactor your visitor
in one of two ways, depending on what it requires:

1. If you just want to visit all items (most common), you should call
   `krate.visit_all_items(&mut visitor)`.

2. If you need to visit nested items in the middle of the parent items,
   you should override `visit_nested_item` with something like:
   `self.visit_item(self.tcx.map.expect_item(item.id))`, presuming you
   have access to a tcx (or at least a HIR map).

8 years agorefactorings of `lowering` that make it more amenable to using `&mut`
Niko Matsakis [Thu, 12 Nov 2015 17:31:05 +0000 (12:31 -0500)]
refactorings of `lowering` that make it more amenable to using `&mut`
instead of `Cell` (but stop short of actualling switching to `&mut`)

8 years agorename `_lctx` to `lctx` where appropriate
Niko Matsakis [Thu, 12 Nov 2015 17:30:52 +0000 (12:30 -0500)]
rename `_lctx` to `lctx` where appropriate

8 years agoRemove seemingly pointless case -- this customized variant avoided
Niko Matsakis [Sat, 31 Oct 2015 13:24:30 +0000 (09:24 -0400)]
Remove seemingly pointless case -- this customized variant avoided
walking the patterns in a type fn decl, but those patterns are ignored
by this visitor anyway.

8 years agoAuto merge of #29910 - tbu-:pr_env_revert_mingw_weirdness, r=alexcrichton
bors [Wed, 18 Nov 2015 23:17:30 +0000 (23:17 +0000)]
Auto merge of #29910 - tbu-:pr_env_revert_mingw_weirdness, r=alexcrichton

8 years agoAuto merge of #29878 - wthrowe:libdir2, r=brson
bors [Wed, 18 Nov 2015 21:33:34 +0000 (21:33 +0000)]
Auto merge of #29878 - wthrowe:libdir2, r=brson

Rather than modifying the installer to disable directory rewriting,
this patch modifies the directory structure passed to the installer so
that the rewriting gives the correct results.  This means that if a
non-standard --libdir is passed to configure then the same --libdir
option (relative to the --prefix) must be passed to the install
script.  In the `make install` case this is handled automatically.
Binary distributions are generally generated using the default
--libdir and then have paths optionally rewritten by the installer,
which should continue to work.

This has the advantage of not complicating the installer interface
intended for end-user use.

Fixes #29561

8 years agoFix unpredictable ordering of sidebar boxes in rustdoc
Joshua Holmer [Wed, 18 Nov 2015 21:21:19 +0000 (16:21 -0500)]
Fix unpredictable ordering of sidebar boxes in rustdoc

A race condition in Javascript was causing unpredictable ordering
of the sidebar boxes when loading documentation generated by
rustdoc, due to the script that adds the Crates box being executed
asynchronously. Disabling the asynchronous execution and deferring
this script should ensure that the Crates box always appears last
in the sidebox (this seemed to be the more common ordering prior
to this change).

Fixes #29698

8 years agoAdd long error diagnostics for E0401
Manish Goregaokar [Wed, 18 Nov 2015 20:31:19 +0000 (02:01 +0530)]
Add long error diagnostics for E0401

8 years agoAuto merge of #29083 - petrochenkov:stability3, r=alexcrichton
bors [Wed, 18 Nov 2015 19:49:33 +0000 (19:49 +0000)]
Auto merge of #29083 - petrochenkov:stability3, r=alexcrichton

What this patch does:
- Stability annotations are now based on "exported items" supplied by rustc_privacy and not "public items". Exported items are as accessible for external crates as directly public items and should be annotated with stability attributes.
- Trait impls require annotations now.
- Reexports require annotations now.
- Crates themselves didn't require annotations, now they do.
- Exported macros are annotated now, but these annotations are not used yet.
- Some useless annotations are detected and result in errors
- Finally, some small bugs are fixed - deprecation propagates from stable deprecated parents, items in blocks are traversed correctly (fixes https://github.com/rust-lang/rust/issues/29034) + some code cleanup.

8 years agoFix buildbot failures
Vadim Petrochenkov [Wed, 18 Nov 2015 18:16:20 +0000 (21:16 +0300)]
Fix buildbot failures

8 years agoAuto merge of #29886 - michaelwoerister:mir-erase-regions, r=nikomatsakis
bors [Wed, 18 Nov 2015 18:06:30 +0000 (18:06 +0000)]
Auto merge of #29886 - michaelwoerister:mir-erase-regions, r=nikomatsakis

This change adds a `MirPass` erasing all early-bound regions from MIR, right before storing it in the MIR map. I've added some assertions at neuralgic points in `trans::mir` doing cheap checks whether region have actually been erased.

Here are some assumptions that I worked under:
- AdtDef references stay untouched. It's the `Substs` accompanying them that need to be handled (e.g. in `AggregateKind::Adt`).
- We can't really get rid of late-bound regions at this point because there is no version `BareFnTy` (for example) that comes without one. These still have to be handled on demand in trans.

Are this assumptions right?

r? @nikomatsakis

8 years agoMIR: Add pass that erases all regions right before trans
Michael Woerister [Mon, 16 Nov 2015 17:41:16 +0000 (18:41 +0100)]
MIR: Add pass that erases all regions right before trans

8 years agoAuto merge of #29906 - ranma42:doc-typo, r=steveklabnik
bors [Wed, 18 Nov 2015 15:54:28 +0000 (15:54 +0000)]
Auto merge of #29906 - ranma42:doc-typo, r=steveklabnik

8 years agoRevert not-ignoring weird environment variables for MinGW
Tobias Bucher [Wed, 18 Nov 2015 14:07:47 +0000 (14:07 +0000)]
Revert not-ignoring weird environment variables for MinGW

8 years agoAuto merge of #29902 - huonw:smart-quotes, r=alexcrichton
bors [Wed, 18 Nov 2015 10:58:04 +0000 (10:58 +0000)]
Auto merge of #29902 - huonw:smart-quotes, r=alexcrichton

cc https://github.com/rust-lang/rust/pull/29837#issuecomment-157540449

8 years agoFix typo in libcore documentation
Andrea Canciani [Wed, 18 Nov 2015 10:35:29 +0000 (11:35 +0100)]
Fix typo in libcore documentation

8 years agoAuto merge of #29904 - Zoxc:ar_json, r=alexcrichton
bors [Wed, 18 Nov 2015 07:13:39 +0000 (07:13 +0000)]
Auto merge of #29904 - Zoxc:ar_json, r=alexcrichton

This allows targets to drop the dependency on AR.

8 years agoAdd some unicode aliases for ".
Huon Wilson [Tue, 17 Nov 2015 23:32:43 +0000 (10:32 +1100)]
Add some unicode aliases for ".

8 years agoAuto merge of #29897 - alexcrichton:process-wait-with-output, r=brson
bors [Wed, 18 Nov 2015 04:00:43 +0000 (04:00 +0000)]
Auto merge of #29897 - alexcrichton:process-wait-with-output, r=brson

Previously this function used channels but this isn't necessary any more now
that threads have return values. This also has the added bonus of appropriately
waiting for the thread to exit to ensure that the function doesn't still have
running threads once it returns.

8 years agoAuto merge of #29882 - devonhollowood:master, r=Manishearth
bors [Wed, 18 Nov 2015 02:02:00 +0000 (02:02 +0000)]
Auto merge of #29882 - devonhollowood:master, r=Manishearth

Implement #14615

8 years agoExpose archive_format to target specifications
John Kåre Alsaker [Wed, 18 Nov 2015 00:14:15 +0000 (01:14 +0100)]
Expose archive_format to target specifications

8 years agoAuto merge of #29900 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 17 Nov 2015 23:55:53 +0000 (23:55 +0000)]
Auto merge of #29900 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #29612, #29888, #29889, #29890, #29891, #29892
- Failed merges:

8 years agoRollup merge of #29892 - steveklabnik:doc_fromiterator, r=alexcrichton
Steve Klabnik [Tue, 17 Nov 2015 23:13:06 +0000 (18:13 -0500)]
Rollup merge of #29892 - steveklabnik:doc_fromiterator, r=alexcrichton

And modifying IntoIterator for consisntency with it.

Part of #29360

8 years agoRollup merge of #29891 - steveklabnik:gh29470, r=alexcrichton
Steve Klabnik [Tue, 17 Nov 2015 23:13:06 +0000 (18:13 -0500)]
Rollup merge of #29891 - steveklabnik:gh29470, r=alexcrichton

Fixes #29470

8 years agoRollup merge of #29890 - steveklabnik:gh29742, r=Manishearth
Steve Klabnik [Tue, 17 Nov 2015 23:13:06 +0000 (18:13 -0500)]
Rollup merge of #29890 - steveklabnik:gh29742, r=Manishearth

FIxes #29742

8 years agoRollup merge of #29889 - steveklabnik:gh29801, r=manishearth
Steve Klabnik [Tue, 17 Nov 2015 23:13:05 +0000 (18:13 -0500)]
Rollup merge of #29889 - steveklabnik:gh29801, r=manishearth

First, re-word the section on if let/while let to be more clear.

Second, actually call them let statements in the statement section

Fixes #29801

8 years agoRollup merge of #29888 - steveklabnik:gh29762, r=sanxiyn
Steve Klabnik [Tue, 17 Nov 2015 23:13:05 +0000 (18:13 -0500)]
Rollup merge of #29888 - steveklabnik:gh29762, r=sanxiyn

Fixes #29762

8 years agoRollup merge of #29612 - steveklabnik:gh29502, r=alexcrichton
Steve Klabnik [Tue, 17 Nov 2015 23:13:05 +0000 (18:13 -0500)]
Rollup merge of #29612 - steveklabnik:gh29502, r=alexcrichton

libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390

Fixes #29502

r? @alexcrichton

8 years agoMore docs for FromIterator
Steve Klabnik [Tue, 17 Nov 2015 17:42:09 +0000 (12:42 -0500)]
More docs for FromIterator

And modifying IntoIterator for consisntency with it.

Part of #29360

8 years agoRemove claims of dependency-free libcore
Steve Klabnik [Thu, 5 Nov 2015 13:33:30 +0000 (14:33 +0100)]
Remove claims of dependency-free libcore

libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390

Fixes #29502

8 years agoClear up the reference around let
Steve Klabnik [Tue, 17 Nov 2015 16:31:13 +0000 (11:31 -0500)]
Clear up the reference around let

First, re-word the section on if let/while let to be more clear.

Second, actually call them let statements in the statement section

Fixes #29801

8 years agoReview fixes
Vadim Petrochenkov [Mon, 16 Nov 2015 18:01:06 +0000 (21:01 +0300)]
Review fixes

8 years agoAdd missing annotations and some tests
Vadim Petrochenkov [Mon, 16 Nov 2015 16:54:28 +0000 (19:54 +0300)]
Add missing annotations and some tests

8 years agoRework stability annotation pass
Vadim Petrochenkov [Mon, 16 Nov 2015 16:53:41 +0000 (19:53 +0300)]
Rework stability annotation pass

8 years agoAuto merge of #29797 - oli-obk:remove-fromb, r=nikomatsakis
bors [Tue, 17 Nov 2015 22:12:07 +0000 (22:12 +0000)]
Auto merge of #29797 - oli-obk:remove-fromb, r=nikomatsakis

the const evaluator has a bool constant value, no need to use integers

the `fromb` function is very old. It took me a while of git-blame until i found where it was created. I think it was just a hack. All tests still pass.

I also forbade `&&` and `||` on integral types

8 years agostd: Use join() in Process::wait_with_output
Alex Crichton [Tue, 17 Nov 2015 21:37:44 +0000 (13:37 -0800)]
std: Use join() in Process::wait_with_output

Previously this function used channels but this isn't necessary any more now
that threads have return values. This also has the added bonus of appropriately
waiting for the thread to exit to ensure that the function doesn't still have
running threads once it returns.