bors [Fri, 27 Nov 2015 18:41:53 +0000 (18:41 +0000)]
Auto merge of #30064 - fhartwig:macro-suggestions, r=sanxiyn
Fixes #13677
This does the same sort of suggestion for misspelt macros that we already do for misspelt identifiers.
Example. Compiling this program:
```rust
macro_rules! foo {
($e:expr) => ( $e )
}
fn main() {
fob!("hello!");
}
```
gives the following error message:
```
/Users/mcp/temp/test.rs:7:5: 7:8 error: macro undefined: 'fob!'
/Users/mcp/temp/test.rs:7 fob!("hello!");
^~~
/Users/mcp/temp/test.rs:7:5: 7:8 help: did you mean `foo`?
/Users/mcp/temp/test.rs:7 fob!("hello!");
```
I had to move the levenshtein distance function into libsyntax for this. Maybe this should live somewhere else (some utility crate?), but I couldn't find a crate to put it in that is imported by libsyntax and the other rustc crates.
bors [Fri, 27 Nov 2015 15:55:05 +0000 (15:55 +0000)]
Auto merge of #30082 - semarie:execve, r=alexcrichton
under OpenBSD and Bitrig, it is an error to pass an empty argv
argument to execve(2). It results the test fail as execve(2) don't exec
and set errno to EINVAL.
instead, make argv with two arguments (in order to differenciate the
initial call, from the execve call).
Sébastien Marie [Fri, 27 Nov 2015 12:48:07 +0000 (13:48 +0100)]
pass at least one argument to execve
under OpenBSD and Bitrig, it is an error to pass an empty argv
argument to execve(2). It results the test fail as execve(2) don't exec
and set errno to EINVAL.
instead, make argv with two arguments (in order to differenciate the
initial call, from the execve call).
bors [Thu, 26 Nov 2015 18:20:58 +0000 (18:20 +0000)]
Auto merge of #30043 - arielb1:split-metadata, r=nikomatsakis
This improves bootstrap times because of better parallelism - though I need to measure how much - and allows metadata to be modified without triggering a full recompile. This also ensures that metadata handling and the rest of rustc remain decoupled, which is a first step for switching to a new metadata format.
This is a [breaking-change] to all plugin authors because of the following renames:
* `rustc::plugin` is now `rustc_plugin`
* `rustc::metadata` is now `rustc_metadata`
* Most data types from `rustc::metadata`, along with `LOCAL_CRATE`, are now in `rustc::middle::cstore`.
* The CStore methods were split between the `rustc::middle::CrateStore` trait (and trait object) and the `rustc_metadata::cstore::CStore`, with an `Rc<CrateStore>` stored in the `Session`. The inner `CStore` can be accessed via the inner `Any` bound, but this is deprecated.
bors [Wed, 25 Nov 2015 18:49:56 +0000 (18:49 +0000)]
Auto merge of #30044 - nikomatsakis:issue-29466, r=arielb1
The graph extent mechanism is not good. I have some ideas for a better replacement, but this PR simply removes it. It also stops recursing on statement scopes and processes them using an "on the heap" stack, which fixes #29466.
bors [Tue, 24 Nov 2015 23:24:18 +0000 (23:24 +0000)]
Auto merge of #30016 - alexcrichton:fix-off-by-one, r=brson
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.
Niko Matsakis [Thu, 19 Nov 2015 10:54:27 +0000 (05:54 -0500)]
Remove the GraphExtents, the design of which seems bogus. They carried
the right information, but it's hard to maintain in the face of
optimizations, and in the form that the analyses probably actually want.
bors [Tue, 24 Nov 2015 19:46:59 +0000 (19:46 +0000)]
Auto merge of #29960 - aturon:dismantle-traitref-subtyping, r=nikomatsakis
Trait references are always invariant, so all uses of subtyping between
them are equivalent to using equality.
Moreover, the overlap check was previously performed twice per impl
pair, once in each direction. It is now performed only once, and
internally uses the equality check.
On glium, a crate that spends some time in coherence, this change sped
up coherence checking by a few percent (not very significant).
bors [Tue, 24 Nov 2015 11:10:22 +0000 (11:10 +0000)]
Auto merge of #30012 - jonas-schievink:log-level-trace, r=alexcrichton
The `log` crate on crates.io already knows `TRACE`, but the internal liblog doesn't, which causes it to spew errors when a `TRACE` level is defined. I made `TRACE` behave like `DEBUG`.
bors [Tue, 24 Nov 2015 04:26:47 +0000 (04:26 +0000)]
Auto merge of #30006 - ntrepid8:skip-check-for-DYLD-libs-in-child-proc, r=alexcrichton
link: https://forums.developer.apple.com/thread/9233
The causes a test in `src/libstd/process.rs' to fail when those environment variables are not found in the child process. This PR skips those variables similar to how the Windows envars that start with `=` are skipped.
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.