]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRefactor away add_export and cleanup the end of resolve_single_import
Jeffrey Seyfried [Sun, 7 Feb 2016 23:06:10 +0000 (23:06 +0000)]
Refactor away add_export and cleanup the end of resolve_single_import

8 years agoReplace children and import_resolutions with a single NameResolution-valued map.
Jeffrey Seyfried [Sun, 7 Feb 2016 23:58:14 +0000 (23:58 +0000)]
Replace children and import_resolutions with a single NameResolution-valued map.

Refactor away resolve_name_in_module in resolve_imports.rs

Rewrite and improve the core name resolution procedure in NameResolution::result and Module::resolve_name

Refactor the duplicate checking code into NameResolution::try_define

8 years agoChange try_define_child to return a Result instead of an Option
Jeffrey Seyfried [Mon, 8 Feb 2016 00:54:31 +0000 (00:54 +0000)]
Change try_define_child to return a Result instead of an Option

8 years agoWrite and use increment_outstanding_references_for and decrement_outstanding_referenc...
Jeffrey Seyfried [Sun, 7 Feb 2016 22:40:23 +0000 (22:40 +0000)]
Write and use increment_outstanding_references_for and decrement_outstanding_references_for

8 years agoRefactor away the fields id and is_public of ImportResolution and rename ImportResolu...
Jeffrey Seyfried [Sun, 7 Feb 2016 22:28:54 +0000 (22:28 +0000)]
Refactor away the fields id and is_public of ImportResolution and rename ImportResolution to NameResolution

8 years agoRefactor away separate tracking of used_public and used_reexport.
Jeffrey Seyfried [Sun, 7 Feb 2016 21:48:24 +0000 (21:48 +0000)]
Refactor away separate tracking of used_public and used_reexport.

NameBinding now encodes these directly with binding.is_public() and (binding.is_public() && binding.is_import()) (respectively)

8 years agoExpand NameBinding to better represent bindings from imports
Jeffrey Seyfried [Sun, 7 Feb 2016 21:34:23 +0000 (21:34 +0000)]
Expand NameBinding to better represent bindings from imports

8 years agoAdd and use an arena for `NameBinding`s
Jeffrey Seyfried [Sun, 7 Feb 2016 21:23:58 +0000 (21:23 +0000)]
Add and use an arena for `NameBinding`s

8 years agoRefactor away Target
Jeffrey Seyfried [Sun, 7 Feb 2016 21:04:01 +0000 (21:04 +0000)]
Refactor away Target

8 years agoMake resolve_name_in_module solely responsible for tracking used crates in lib.rs
Jeffrey Seyfried [Sun, 7 Feb 2016 19:29:51 +0000 (19:29 +0000)]
Make resolve_name_in_module solely responsible for tracking used crates in lib.rs

8 years agoAuto merge of #31304 - nikomatsakis:incr-comp-read-from-hir-map, r=michaelwoerister
bors [Fri, 5 Feb 2016 20:13:25 +0000 (20:13 +0000)]
Auto merge of #31304 - nikomatsakis:incr-comp-read-from-hir-map, r=michaelwoerister

This change also modifies the dep graph infrastructure to keep track of the number of active tasks, so that even if we are not building the full dep-graph, we still get assertions when there is no active task and one does something that would add a read/write edge. This is particularly helpful since, if the assertions are *not* active, you wind up with the error happening in the message processing thread, which is too late to know the correct backtrace.

~~Before landing, I need to do some performance measurements. Those are underway.~~

See measurements below. No real effect on time.

r? @michaelwoerister

8 years agoAddress nits.
Niko Matsakis [Fri, 5 Feb 2016 18:19:21 +0000 (13:19 -0500)]
Address nits.

8 years agoUpdate collect to use the standard visit routine, rather than rolling
Niko Matsakis [Fri, 29 Jan 2016 21:25:21 +0000 (16:25 -0500)]
Update collect to use the standard visit routine, rather than rolling
its own.

8 years agoInstrument a bunch of tasks that employ the HIR map in one way or
Niko Matsakis [Fri, 29 Jan 2016 20:04:07 +0000 (15:04 -0500)]
Instrument a bunch of tasks that employ the HIR map in one way or
another and were not previously instrumented.

8 years agoInstrument the AST map so that it registers reads when data is
Niko Matsakis [Fri, 29 Jan 2016 20:07:04 +0000 (15:07 -0500)]
Instrument the AST map so that it registers reads when data is
acccessed.

8 years agoAdd a local counter that tracks how many tasks are pushed or not pushed,
Niko Matsakis [Fri, 29 Jan 2016 20:00:46 +0000 (15:00 -0500)]
Add a local counter that tracks how many tasks are pushed or not pushed,
so that we can still get assertion failures even when dep-graph
construction is disabled.

8 years agoAuto merge of #31349 - nikomatsakis:issue-31157-obligation-forest-cache, r=aturon
bors [Fri, 5 Feb 2016 17:16:03 +0000 (17:16 +0000)]
Auto merge of #31349 - nikomatsakis:issue-31157-obligation-forest-cache, r=aturon

Have the `ObligationForest` keep some per-tree state (or type `T`) and have it give a mutable reference for use when processing obligations. In this case, it will be a hashmap. This obviously affects the work that @soltanmm has been doing on snapshotting. I partly want to toss this out there for discussion.

Fixes #31157. (The test in question goes to approx. 30s instead of 5 minutes for me.)
cc #30977.
cc @aturon @arielb1 @soltanmm

r? @aturon who reviewed original `ObligationForest`

8 years agoAuto merge of #31400 - durka:civilized-deriving, r=alexcrichton
bors [Fri, 5 Feb 2016 15:11:45 +0000 (15:11 +0000)]
Auto merge of #31400 - durka:civilized-deriving, r=alexcrichton

You can `#[derive(FromPrimitive)]`, but it [fails later in the compile](https://play.rust-lang.org/?gist=82cb8ad2fac49e3fe472&version=stable) due to hardcoding `std::num::FromPrimitive` which [was removed](https://github.com/rust-lang/rust/commit/eeb94886adccb3f13003f92f117115d17846ce1f) (for some reason Github doesn't show `FromPrimitive` in the diff, but `git show` does).

Anyway, this PR removes the code. I didn't mark it as a breaking change, even though [this extremely contrived code using highly unstable features](https://play.rust-lang.org/?gist=1e1b1bbff962837b228a&version=nightly) is broken by it -- should I?

8 years agoAuto merge of #31390 - dotdash:fix_quadratic_drop, r=nagisa
bors [Fri, 5 Feb 2016 13:02:26 +0000 (13:02 +0000)]
Auto merge of #31390 - dotdash:fix_quadratic_drop, r=nagisa

If a new cleanup is added to a cleanup scope, the cached exits for that
scope are cleared, so all previous cleanups have to be translated
again. In the worst case this means that we get N distinct landing pads
where the last one has N cleanups, then N-1 and so on.

As new cleanups are to be executed before older ones, we can instead
cache the number of already translated cleanups in addition to the
block that contains them, and then only translate new ones, if any and
then jump to the cached ones, getting away with linear growth instead.

For the crate in #31381 this reduces the compile time for an optimized
build from >20 minutes (I cancelled the build at that point) to about 11
seconds. Testing a few crates that come with rustc show compile time
improvements somewhere between 1 and 8%. The "big" winner being
rustc_platform_intrinsics which features code similar to that in #31381.

Fixes #31381

8 years agoAuto merge of #31389 - mitaa:schars, r=nrc
bors [Fri, 5 Feb 2016 10:58:52 +0000 (10:58 +0000)]
Auto merge of #31389 - mitaa:schars, r=nrc

A span spanning only a single character would render like `^~`
instead of just `^`.

r? @nrc

8 years agoAuto merge of #31388 - gmbonnet:compiler-rt-werror, r=alexcrichton
bors [Fri, 5 Feb 2016 08:54:46 +0000 (08:54 +0000)]
Auto merge of #31388 - gmbonnet:compiler-rt-werror, r=alexcrichton

Without this patch, `compiler-rt` fails to build when the `CFLAGS` environment variable contains a `-Werror=*` flag (for example `-Werror=format-security`).

The build system was removing only the `-Werror` part from the flag, thus passing an unrecognized `=*` (for example `=format-security`) argument to gcc.

8 years agoAuto merge of #31386 - tbu-:pr_cow_from_vec, r=alexcrichton
bors [Fri, 5 Feb 2016 06:51:05 +0000 (06:51 +0000)]
Auto merge of #31386 - tbu-:pr_cow_from_vec, r=alexcrichton

Fixes #31354.

8 years agoAuto merge of #31321 - jseyfried:cleanup, r=nrc
bors [Fri, 5 Feb 2016 03:03:45 +0000 (03:03 +0000)]
Auto merge of #31321 - jseyfried:cleanup, r=nrc

The first commit improves detection of unused imports -- it should have been part of #30325. Right now, the unused import in the changed test would not be reported.

The rest of the commits are miscellaneous, independent clean-ups in resolve that I didn't think warranted individual PRs.

r? @nrc

8 years agoAuto merge of #30865 - alexcrichton:mtime-system-time, r=aturon
bors [Fri, 5 Feb 2016 01:00:31 +0000 (01:00 +0000)]
Auto merge of #30865 - alexcrichton:mtime-system-time, r=aturon

These accessors are used to get at the last modification, last access, and
creation time of the underlying file. Currently not all platforms provide the
creation time, so that currently returns `Option`.

8 years agoAuto merge of #31416 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 4 Feb 2016 22:55:47 +0000 (22:55 +0000)]
Auto merge of #31416 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #31007, #31396, #31401, #31411, #31412, #31413, #31415
- Failed merges:

8 years agoRollup merge of #31415 - tshepang:2-space-indent, r=steveklabnik
Steve Klabnik [Thu, 4 Feb 2016 21:39:06 +0000 (16:39 -0500)]
Rollup merge of #31415 - tshepang:2-space-indent, r=steveklabnik

8 years agoRollup merge of #31413 - tshepang:improve, r=steveklabnik
Steve Klabnik [Thu, 4 Feb 2016 21:39:06 +0000 (16:39 -0500)]
Rollup merge of #31413 - tshepang:improve, r=steveklabnik

8 years agoRollup merge of #31412 - tshepang:add-trailing-commas, r=steveklabnik
Steve Klabnik [Thu, 4 Feb 2016 21:39:05 +0000 (16:39 -0500)]
Rollup merge of #31412 - tshepang:add-trailing-commas, r=steveklabnik

8 years agoRollup merge of #31411 - tshepang:idiom, r=steveklabnik
Steve Klabnik [Thu, 4 Feb 2016 21:39:05 +0000 (16:39 -0500)]
Rollup merge of #31411 - tshepang:idiom, r=steveklabnik

8 years agoRollup merge of #31401 - frewsxcv:clarify-ascii, r=steveklabnik
Steve Klabnik [Thu, 4 Feb 2016 21:39:05 +0000 (16:39 -0500)]
Rollup merge of #31401 - frewsxcv:clarify-ascii, r=steveklabnik

Fixes https://github.com/rust-lang/rust/issues/31203

8 years agoRollup merge of #31396 - mbrubeck:grammar-stmts, r=alexcrichton
Steve Klabnik [Thu, 4 Feb 2016 21:39:05 +0000 (16:39 -0500)]
Rollup merge of #31396 - mbrubeck:grammar-stmts, r=alexcrichton

"stmt" already includes the terminating semicolon.

8 years agoRollup merge of #31007 - pra85:license, r=aturon
Steve Klabnik [Thu, 4 Feb 2016 21:39:05 +0000 (16:39 -0500)]
Rollup merge of #31007 - pra85:license, r=aturon

According to http://www.copyright.gov/circs/circ01.pdf (See screenshot of relevant section below) , listing the first year of publication in the copyright is enough

![selection_008](https://cloud.githubusercontent.com/assets/829526/12409934/7021c3a6-be95-11e5-8d1a-18f6948571e0.png)

The commits d5c8f626a8e4c5166833 and f979f91ae20b2da9b24140334 have changed the copyright years

This commit reverts back those changes, so that license year is again 2014 (As it was, when this license was first introduced in commit 90ba013bde2396f200196  )

--------------------------------------
Edit 1: Added screenshot

8 years agodoc: Rust indents are 4-space wide by convention
Tshepang Lekhonkhobe [Thu, 4 Feb 2016 21:31:22 +0000 (23:31 +0200)]
doc: Rust indents are 4-space wide by convention

8 years agostd: Expose SystemTime accessors on fs::Metadata
Alex Crichton [Wed, 13 Jan 2016 01:24:16 +0000 (17:24 -0800)]
std: Expose SystemTime accessors on fs::Metadata

These accessors are used to get at the last modification, last access, and
creation time of the underlying file. Currently not all platforms provide the
creation time, so that currently returns `Option`.

8 years agoAuto merge of #30759 - Manishearth:attr-tls, r=alexcrichton
bors [Thu, 4 Feb 2016 20:52:22 +0000 (20:52 +0000)]
Auto merge of #30759 - Manishearth:attr-tls, r=alexcrichton

fixes #30756

r? @Gankro

8 years agoreference: add trailing commas
Tshepang Lekhonkhobe [Thu, 4 Feb 2016 20:31:47 +0000 (22:31 +0200)]
reference: add trailing commas

8 years agoreference: make the line a little more readable
Tshepang Lekhonkhobe [Thu, 4 Feb 2016 20:39:15 +0000 (22:39 +0200)]
reference: make the line a little more readable

8 years agoreference: explicit return at function end is not idiomatic
Tshepang Lekhonkhobe [Thu, 4 Feb 2016 20:32:53 +0000 (22:32 +0200)]
reference: explicit return at function end is not idiomatic

8 years agoAuto merge of #31360 - pitdicker:fs_tests_cleanup, r=alexcrichton
bors [Thu, 4 Feb 2016 18:48:41 +0000 (18:48 +0000)]
Auto merge of #31360 - pitdicker:fs_tests_cleanup, r=alexcrichton

- use `symlink_file` and `symlink_dir` instead of the old `soft_link`
- create a junction instead of a directory symlink for testing recursive_rmdir (as it causes the
  same troubles, but can be created by users without `SeCreateSymbolicLinkPrivilege`)
- `remove_dir_all` was unable to remove directory symlinks and junctions
- only run tests that create symlinks if we have the right permissions.
- rename `Path2` to `Path`
- remove the global `#[allow(deprecated)]` and outdated comments
- After factoring out `create_junction()` from the test `directory_junctions_are_directories` and
  removing needlessly complex code, what I was left with was:
  ```
  #[test]
  #[cfg(windows)]
  fn directory_junctions_are_directories() {
      use sys::fs::create_junction;

      let tmpdir = tmpdir();

      let foo = tmpdir.join("foo");
      let bar = tmpdir.join("bar");

      fs::create_dir(&foo).unwrap();
      check!(create_junction(&foo, &bar));
      assert!(bar.metadata().unwrap().is_dir());
  }
  ```
  It test whether a junction is a directory instead of a reparse point. But it actually test the
  target of the junction (which is a directory if it exists) instead of the junction itself, which
  should always be a symlink. So this test is invalid, and I expect it only exists because the
  author was suprised by it. So I removed it.

Some things that do not yet work right:
- relative symlinks do not accept forward slashes
- the conversion of paths for `create_junction` is hacky
- `remove_dir_all` now messes with the internal data of `FileAttr` to be able to remove symlinks.
  We should add some method like `is_symlink_dir()` to it, so code outside the standard library
  can see the difference between file and directory symlinks too.

8 years agoTest for unsafe code in TLS macro
Manish Goregaokar [Thu, 4 Feb 2016 12:20:32 +0000 (17:50 +0530)]
Test for unsafe code in TLS macro

8 years agoStop using unsafe code in TLS macro expansion (fixes #30756)
Manish Goregaokar [Thu, 4 Feb 2016 12:20:20 +0000 (17:50 +0530)]
Stop using unsafe code in TLS macro expansion (fixes #30756)

8 years agoClarify scenario where AsciiExt appears to operate on non-ASCII
Corey Farwell [Thu, 4 Feb 2016 05:11:18 +0000 (00:11 -0500)]
Clarify scenario where AsciiExt appears to operate on non-ASCII

Fixes https://github.com/rust-lang/rust/issues/31203

8 years agoAuto merge of #31382 - DanielJCampbell:SaveSpans, r=nrc
bors [Thu, 4 Feb 2016 15:44:35 +0000 (15:44 +0000)]
Auto merge of #31382 - DanielJCampbell:SaveSpans, r=nrc

r? @nrc

8 years agoAllow dead code for `symlink_junction()`
Paul Dicker [Thu, 4 Feb 2016 15:29:55 +0000 (16:29 +0100)]
Allow dead code for `symlink_junction()`

8 years agoAuto merge of #31161 - sfackler:slice-to-socket-addrs, r=alexcrichton
bors [Thu, 4 Feb 2016 13:41:42 +0000 (13:41 +0000)]
Auto merge of #31161 - sfackler:slice-to-socket-addrs, r=alexcrichton

This is useful when you have an API that takes a `T: ToSocketAddrs` and needs to turn that into an owned value which will be passed to another API taking `T: ToSocketAddrs` at a later time, for example: https://github.com/sfackler/rust-hyper-socks/blob/master/src/lib.rs#L15

8 years agoAuto merge of #31069 - sfackler:file-try-clone, r=alexcrichton
bors [Thu, 4 Feb 2016 11:39:27 +0000 (11:39 +0000)]
Auto merge of #31069 - sfackler:file-try-clone, r=alexcrichton

I have it set as stable right now under the rationale that it's extending an existing, stable API to another type in the "obvious" way.

r? @alexcrichton

cc @reem

8 years agoImplement ToSocketAddrs for &[SocketAddr]
Steven Fackler [Sun, 24 Jan 2016 08:31:22 +0000 (00:31 -0800)]
Implement ToSocketAddrs for &[SocketAddr]

8 years agoAdd File::try_clone
Steven Fackler [Thu, 21 Jan 2016 05:24:23 +0000 (21:24 -0800)]
Add File::try_clone

8 years agoAuto merge of #31378 - nagisa:target-man, r=alexcrichton
bors [Thu, 4 Feb 2016 09:38:15 +0000 (09:38 +0000)]
Auto merge of #31378 - nagisa:target-man, r=alexcrichton

8 years agoAuto merge of #31326 - sdleffler:master, r=nikomatsakis
bors [Thu, 4 Feb 2016 06:07:26 +0000 (06:07 +0000)]
Auto merge of #31326 - sdleffler:master, r=nikomatsakis

After the truly incredible and embarrassing mess I managed to make in my last pull request, this should be a bit less messy.

Fixes #31267 - with this change, the code mentioned in the issue compiles.

Found and fixed another issue as well - constants of zero-size types, when used in ExprRepeats inside associated constants, were causing the compiler to crash at the same place as #31267. An example of this:
```

struct Bar;

const BAZ: Bar = Bar;

struct Foo([Bar; 1]);

struct Biz;

impl Biz {
    const BAZ: Foo = Foo([BAZ; 1]);
}

fn main() {
    let foo = Biz::BAZ;
    println!("{:?}", foo);
}
```
However, I'm fairly certain that my fix for this is not as elegant as it could be. The problem seems to occur only with an associated constant of a tuple struct containing a fixed size array which is initialized using a repeat expression, and when the element to be repeated provided to the repeat expression is another constant which is of a zero-sized type. The fix works by looking for constants and associated constants which are zero-width and consequently contain no data, but for which rustc is still attempting to emit an LLVM value; it simply stops rustc from attempting to emit anything. By my logic, this should work fine since the only values that are emitted in this case (according to the comments) are for closures with side effects, and constants will never have side effects, so it's fine to simply get rid of them. It fixes the error and things compile fine with it, but I have a sneaking suspicion that it could be done in a far better manner.

r? @nikomatsakis

8 years agotest #[derive(FromPrimitive)] triggers custom-derive error
Alex Burka [Thu, 4 Feb 2016 00:58:07 +0000 (19:58 -0500)]
test #[derive(FromPrimitive)] triggers custom-derive error

8 years agoAuto merge of #30962 - Amanieu:non_volatile_atomic, r=alexcrichton
bors [Thu, 4 Feb 2016 02:46:44 +0000 (02:46 +0000)]
Auto merge of #30962 - Amanieu:non_volatile_atomic, r=alexcrichton

Rust currently emits atomic loads and stores with the LLVM `volatile` qualifier. This is unnecessary and prevents LLVM from performing optimization on these atomic operations.

8 years agoremove dead #[derive(FromPrimitive)] code
Alex Burka [Thu, 4 Feb 2016 00:41:54 +0000 (19:41 -0500)]
remove dead #[derive(FromPrimitive)] code

8 years agoAuto merge of #30796 - GuillaumeGomez:impl_box_error, r=alexcrichton
bors [Thu, 4 Feb 2016 00:39:55 +0000 (00:39 +0000)]
Auto merge of #30796 - GuillaumeGomez:impl_box_error, r=alexcrichton

Fixes #30349

8 years agoRemove unneeded borrows and slices
Jeffrey Seyfried [Fri, 29 Jan 2016 23:34:58 +0000 (23:34 +0000)]
Remove unneeded borrows and slices

8 years agoRemove unneeded use of Cell
Jeffrey Seyfried [Sun, 31 Jan 2016 00:41:26 +0000 (00:41 +0000)]
Remove unneeded use of Cell

8 years agoRefactor away resolve_item_by_name_in_lexical_scope
Jeffrey Seyfried [Sat, 30 Jan 2016 13:33:02 +0000 (13:33 +0000)]
Refactor away resolve_item_by_name_in_lexical_scope

8 years agoRefactor resolve_import_for_module
Jeffrey Seyfried [Sat, 16 Jan 2016 11:41:19 +0000 (11:41 +0000)]
Refactor resolve_import_for_module

8 years agoRefactor away resolve_module_in_lexical_scope
Jeffrey Seyfried [Sun, 31 Jan 2016 00:38:45 +0000 (00:38 +0000)]
Refactor away resolve_module_in_lexical_scope

8 years agoRefactor block_needs_anonymous_module
Jeffrey Seyfried [Wed, 27 Jan 2016 10:51:22 +0000 (10:51 +0000)]
Refactor block_needs_anonymous_module

8 years agoRefactor more functionality into record_import_use
Jeffrey Seyfried [Sat, 16 Jan 2016 12:09:13 +0000 (12:09 +0000)]
Refactor more functionality into record_import_use

8 years agoRefactor resolve_item_in_lexical_scope
Jeffrey Seyfried [Sun, 31 Jan 2016 04:27:39 +0000 (04:27 +0000)]
Refactor resolve_item_in_lexical_scope

8 years agoImprove detection of unused imports
Jeffrey Seyfried [Sun, 31 Jan 2016 04:25:49 +0000 (04:25 +0000)]
Improve detection of unused imports

8 years agoAvoid quadratic growth of functions due to cleanups
Björn Steinbrink [Wed, 3 Feb 2016 18:27:32 +0000 (19:27 +0100)]
Avoid quadratic growth of functions due to cleanups

If a new cleanup is added to a cleanup scope, the cached exits for that
scope are cleared, so all previous cleanups have to be translated
again. In the worst case this means that we get N distinct landing pads
where the last one has N cleanups, then N-1 and so on.

As new cleanups are to be executed before older ones, we can instead
cache the number of already translated cleanups in addition to the
block that contains them, and then only translate new ones, if any and
then jump to the cached ones, getting away with linear growth instead.

For the crate in #31381 this reduces the compile time for an optimized
build from >20 minutes (I cancelled the build at that point) to about 11
seconds. Testing a few crates that come with rustc show compile time
improvements somewhere between 1 and 8%. The "big" winner being
rustc_platform_intrinsics which features code similar to that in #31381.

Fixes #31381

8 years agoAuto merge of #31078 - nbaksalyar:illumos, r=alexcrichton
bors [Wed, 3 Feb 2016 22:40:32 +0000 (22:40 +0000)]
Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichton

This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846.

Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138

Here's a snapshot required to build a stage0 compiler:
https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz
It passes all checks from `make check`.

There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated.

Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409

Thanks!

r? @brson

8 years agoRemove redundant semicolon from "block_expr" in grammar reference
Matt Brubeck [Wed, 3 Feb 2016 21:42:23 +0000 (13:42 -0800)]
Remove redundant semicolon from "block_expr" in grammar reference

"stmt" already includes the terminating semicolon.

8 years agoAdd tests for `Cow::from` for strings, vectors and slices
Tobias Bucher [Wed, 3 Feb 2016 12:57:25 +0000 (13:57 +0100)]
Add tests for `Cow::from` for strings, vectors and slices

8 years agoAdd `Cow::from` for `Vec` and slices
Tobias Bucher [Wed, 3 Feb 2016 12:57:02 +0000 (13:57 +0100)]
Add `Cow::from` for `Vec` and slices

Fixes #31354.

8 years agoAuto merge of #30834 - reem:rwlock-read-guard-map, r=alexcrichton
bors [Wed, 3 Feb 2016 19:26:05 +0000 (19:26 +0000)]
Auto merge of #30834 - reem:rwlock-read-guard-map, r=alexcrichton

This is very useful when the RwLock is synchronizing access to a data
structure and you would like to return or store guards which contain
references to data inside the data structure instead of the data structure
itself.

8 years agoReformat comments
Paul Dicker [Wed, 3 Feb 2016 17:50:57 +0000 (18:50 +0100)]
Reformat comments

8 years agoAdress comments
Paul Dicker [Wed, 3 Feb 2016 17:23:33 +0000 (18:23 +0100)]
Adress comments

8 years agoAuto merge of #31056 - kamalmarhubi:std-process-nul-chars, r=alexcrichton
bors [Wed, 3 Feb 2016 17:19:10 +0000 (17:19 +0000)]
Auto merge of #31056 - kamalmarhubi:std-process-nul-chars, r=alexcrichton

This reports an error at the point of calling `Command::spawn()` or one of
its equivalents.

Fixes #30858
Fixes #30862

8 years agoFix rendering of single-char-span
mitaa [Wed, 3 Feb 2016 15:07:40 +0000 (16:07 +0100)]
Fix rendering of single-char-span

A span spanning only a single character would render like `^~`
instead of just `^`.

8 years agostd: Properly handle interior NULs in std::process
Kamal Marhubi [Fri, 15 Jan 2016 20:29:45 +0000 (15:29 -0500)]
std: Properly handle interior NULs in std::process

This reports an error at the point of calling `Command::spawn()` or one of
its equivalents.

Fixes https://github.com/rust-lang/rust/issues/30858
Fixes https://github.com/rust-lang/rust/issues/30862

8 years agocompiler-rt: Handle -Werror=* arguments in CFLAGS
Guillaume Bonnet [Wed, 3 Feb 2016 15:08:18 +0000 (16:08 +0100)]
compiler-rt: Handle -Werror=* arguments in CFLAGS

8 years agoAuto merge of #31371 - apasel422:docs, r=alexcrichton
bors [Wed, 3 Feb 2016 15:13:39 +0000 (15:13 +0000)]
Auto merge of #31371 - apasel422:docs, r=alexcrichton

r? @steveklabnik

8 years agoFix broken auto-mac-ios-opt build
Nikita Baksalyar [Wed, 3 Feb 2016 13:45:34 +0000 (16:45 +0300)]
Fix broken auto-mac-ios-opt build

8 years agoAuto merge of #31385 - oli-obk:doc/mir, r=nagisa
bors [Wed, 3 Feb 2016 13:05:18 +0000 (13:05 +0000)]
Auto merge of #31385 - oli-obk:doc/mir, r=nagisa

I didn't change any content, just added another slash so we can see those comments in the docs

r? @steveklabnik

8 years agoupgrade comments on MIR structures and functions to doc comments
Oliver Schneider [Wed, 3 Feb 2016 12:25:07 +0000 (13:25 +0100)]
upgrade comments on MIR structures and functions to doc comments

8 years agoAuto merge of #31375 - nagisa:path-docs, r=alexcrichton
bors [Wed, 3 Feb 2016 10:59:47 +0000 (10:59 +0000)]
Auto merge of #31375 - nagisa:path-docs, r=alexcrichton

8 years agoImprove wording of --target help
Simonas Kazlauskas [Wed, 3 Feb 2016 00:50:55 +0000 (02:50 +0200)]
Improve wording of --target help

8 years agoAuto merge of #31338 - dirk:dirk/add-name-bindings-for-bad-imports, r=nrc
bors [Wed, 3 Feb 2016 08:51:31 +0000 (08:51 +0000)]
Auto merge of #31338 - dirk:dirk/add-name-bindings-for-bad-imports, r=nrc

WIP implementation of #31209.

The goal is to insert fake/dummy definitions for names that we failed to import so that later resolver stages won't complain about them.

8 years agoChanged macro spans in CSVs to point to the macro name, bugfixed nested spans
Daniel Campbell [Wed, 3 Feb 2016 07:44:53 +0000 (20:44 +1300)]
Changed macro spans in CSVs to point to the macro name, bugfixed nested spans

8 years agoAuto merge of #31263 - dhuseby:fixing_bsd_builds, r=alexcrichton
bors [Wed, 3 Feb 2016 06:38:01 +0000 (06:38 +0000)]
Auto merge of #31263 - dhuseby:fixing_bsd_builds, r=alexcrichton

Something went haywire with github last night and the old PR https://github.com/rust-lang/rust/pull/31230 got closed somehow.  This new PR is to replace the old one.  This incorporates all of the feedback from the other PR.

@alexcrichton I incorporated the suggestion from @semarie and the result is cleaner and clearer.  I think this is ready to go.

8 years agotrying again at fixing stackp initialization
Dave Huseby [Wed, 3 Feb 2016 02:21:39 +0000 (18:21 -0800)]
trying again at fixing stackp initialization

8 years agosimplifying get_stack
Dave Huseby [Tue, 2 Feb 2016 17:23:33 +0000 (09:23 -0800)]
simplifying get_stack

8 years agorefactoring get_stack to be cleaner
Dave Huseby [Thu, 28 Jan 2016 00:46:45 +0000 (16:46 -0800)]
refactoring get_stack to be cleaner

8 years agounifying name_bytes now that the two blocks are the same
Dave Huseby [Wed, 27 Jan 2016 05:37:46 +0000 (21:37 -0800)]
unifying name_bytes now that the two blocks are the same

8 years agoFixes #31229
Dave Huseby [Wed, 27 Jan 2016 01:37:18 +0000 (17:37 -0800)]
Fixes #31229

8 years agoSpelling fix in `middle::def::Def`
Dirk Gadsden [Mon, 1 Feb 2016 04:44:10 +0000 (20:44 -0800)]
Spelling fix in `middle::def::Def`

8 years agoAdd fake import resolutions & targets for names in bad imports
Dirk Gadsden [Mon, 1 Feb 2016 03:26:16 +0000 (19:26 -0800)]
Add fake import resolutions & targets for names in bad imports

8 years agoAuto merge of #31319 - alexcrichton:msvc-backtraces, r=michaelwoerister
bors [Wed, 3 Feb 2016 03:06:52 +0000 (03:06 +0000)]
Auto merge of #31319 - alexcrichton:msvc-backtraces, r=michaelwoerister

This mirrors the behavior of `clang-cl.exe` by adding a `CodeView` global
variable when emitting debug information. This should in turn help stack traces
that are generated when code is compiled with debuginfo enabled.

Closes #28133

8 years agoAuto merge of #31370 - Manishearth:rollup, r=Manishearth
bors [Wed, 3 Feb 2016 00:58:37 +0000 (00:58 +0000)]
Auto merge of #31370 - Manishearth:rollup, r=Manishearth

- Successful merges: #27499, #31220, #31329, #31332, #31347, #31351, #31352, #31366
- Failed merges:

8 years agoAdd issue number to guard map methods.
Jonathan Reem [Sun, 31 Jan 2016 00:39:03 +0000 (16:39 -0800)]
Add issue number to guard map methods.

8 years agoImprove docs for Path::methods
Simonas Kazlauskas [Tue, 2 Feb 2016 23:16:58 +0000 (01:16 +0200)]
Improve docs for Path::methods

8 years agoAuto merge of #31361 - alexcrichton:revert-mk-changes, r=brson
bors [Tue, 2 Feb 2016 21:57:57 +0000 (21:57 +0000)]
Auto merge of #31361 - alexcrichton:revert-mk-changes, r=brson

This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.

8 years agoCorrect `linked_list::IntoIter` doc comment
Andrew Paseltiner [Tue, 2 Feb 2016 21:45:35 +0000 (16:45 -0500)]
Correct `linked_list::IntoIter` doc comment

8 years agoRollup merge of #31366 - paulsmith:patch-1, r=steveklabnik
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31366 - paulsmith:patch-1, r=steveklabnik

The context of the link is `Result` but it points to the docs on `Option`'s `expect`.

8 years agoRollup merge of #31352 - steveklabnik:gh31154, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31352 - steveklabnik:gh31154, r=nikomatsakis

Fixes #31154

8 years agoRollup merge of #31351 - steveklabnik:gh31318, r=alexcrichton
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31351 - steveklabnik:gh31318, r=alexcrichton

This is a behavior that some find confusing, so it deserves its own example.

Fixes #31318

I think this wording might be a bit strange, but I couldn't come up with anything better. Feedback very welcome.