]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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.

8 years agoRollup merge of #31347 - GuillaumeGomez:fix_E0118, r=Manishearth
Manish Goregaokar [Tue, 2 Feb 2016 21:24:25 +0000 (02:54 +0530)]
Rollup merge of #31347 - GuillaumeGomez:fix_E0118, r=Manishearth

r? @eddyb

8 years agoRollup merge of #31332 - durka:errorck-fileline, r=brson
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #31332 - durka:errorck-fileline, r=brson

Small modification to #31288. Shows full path and line number for unused error codes.

8 years agoRollup merge of #31329 - quodlibetor:no-const-doc-in-stable, r=alexcrichton
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #31329 - quodlibetor:no-const-doc-in-stable, r=alexcrichton

Fixes #31098

AFAICT this is the only place where rustdoc explicitly checks if we are on stable before emitting content, so I can't tell if this is the sane way to handle this, or if anything else should be done to make sure that nobody forgets to remove this check when `const` is stabilized.

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

Fixes #30632

I'm not sure if this explanation is good enough. If it is, I will add it to filter as well.

8 years agoRollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis
Manish Goregaokar [Tue, 2 Feb 2016 21:24:24 +0000 (02:54 +0530)]
Rollup merge of #27499 - barosl:macro-doc-raw-str-hashes, r=nikomatsakis

Any documentation comments that contain raw-string-looking sequences may pretty-print invalid code when expanding them, as the current logic always uses the `r"literal"` form, without appending any `#`s.

This commit calculates the minimum number of `#`s required to wrap a comment correctly and appends `#`s appropriately.

Fixes #27489.

8 years agoAdded assertion ensuring zero-sized type.
Sean Leffler [Tue, 2 Feb 2016 19:41:19 +0000 (11:41 -0800)]
Added assertion ensuring zero-sized type.

8 years agoAuto merge of #31312 - alexcrichton:no-le-in-powerpc64le, r=alexcrichton
bors [Tue, 2 Feb 2016 17:11:48 +0000 (17:11 +0000)]
Auto merge of #31312 - alexcrichton:no-le-in-powerpc64le, r=alexcrichton

Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the
`target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the
`powerpc64le` target does indeed set the `target_arch` as `powerpc64le`,
causing a bit of inconsistency between theset two.

As these are just the same instance of one instruction set, let's use
`target_endian` to switch between them and only set the `target_arch` as one
value. This should cut down on the number of `#[cfg]` annotations necessary and
all around be a little more ergonomic.

8 years agoAdd note about temporaries
Steve Klabnik [Tue, 2 Feb 2016 16:15:45 +0000 (11:15 -0500)]
Add note about temporaries

8 years agoFix reference to `expect`
Paul Smith [Tue, 2 Feb 2016 14:47:23 +0000 (08:47 -0600)]
Fix reference to `expect`

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

8 years agoAuto merge of #31254 - tmiasko:macro-pretty-print-fix, r=sfackler
bors [Tue, 2 Feb 2016 14:00:50 +0000 (14:00 +0000)]
Auto merge of #31254 - tmiasko:macro-pretty-print-fix, r=sfackler

Pretty printing of macro with braces but without terminated semicolon
removed more boxes from stack than it put there, resulting in panic.
This fixes the issue #30731.

8 years agoAuto merge of #30991 - rthomas:master, r=Gankro
bors [Tue, 2 Feb 2016 10:45:06 +0000 (10:45 +0000)]
Auto merge of #30991 - rthomas:master, r=Gankro

Using the test @bluss suggested in #30983

8 years agoAuto merge of #31359 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 2 Feb 2016 07:28:04 +0000 (07:28 +0000)]
Auto merge of #31359 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #30971, #31202, #31247, #31270, #31281, #31327, #31339, #31340, #31342, #31344, #31345, #31346, #31348
- Failed merges:

8 years agoRevert "mk: fix some undefined variable warnings"
Alex Crichton [Tue, 2 Feb 2016 07:27:04 +0000 (23:27 -0800)]
Revert "mk: fix some undefined variable warnings"

This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.

8 years agoEnsure capacity returned of HashMap is max(capacity, length).
Ryan Thomas [Tue, 2 Feb 2016 06:15:27 +0000 (17:15 +1100)]
Ensure capacity returned of HashMap is max(capacity, length).

r? @Gankro

8 years agoEnable more fs tests on Windows
Paul Dicker [Tue, 2 Feb 2016 06:04:55 +0000 (07:04 +0100)]
Enable more fs tests on Windows

8 years agoRollup merge of #31348 - alexcrichton:shuffle-tiers, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:20 +0000 (00:32 -0500)]
Rollup merge of #31348 - alexcrichton:shuffle-tiers, r=steveklabnik

Some other shufflings as well:

* Three powerpc triples for Linux have been added recently
* An armv7 linux triple was added recently
* The 64-bit Solaris triple is now mentioned in tier 3

We are currently now also building nightlies for iOS, powerpc triples, and
armv7, but there hasn't been much vetting of the triples themselves so I've left
them in tier 3 for now.

8 years agoRollup merge of #31346 - alopatindev:fixes, r=aturon
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31346 - alopatindev:fixes, r=aturon

Space character is missed after `let some_usize`

8 years agoRollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31345 - kamalmarhubi:book-docs-special-section-errors, r=steveklabnik

This matches the usage in the standard library's documentation.

8 years agoRollup merge of #31344 - steveklabnik:gh31334, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31344 - steveklabnik:gh31334, r=alexcrichton

Fixes #31334

This is just a quicker fix for this issue; since I'm working on the next draft of the book, I don't want to put a huuuge amount of work into improving it here.

8 years agoRollup merge of #31342 - reeze:patch-1, r=steveklabnik
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31342 - reeze:patch-1, r=steveklabnik

8 years agoRollup merge of #31340 - pra85:patch-1, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:19 +0000 (00:32 -0500)]
Rollup merge of #31340 - pra85:patch-1, r=alexcrichton

Spelling mistake -
`familliar` > `familiar`

8 years agoRollup merge of #31339 - rthomas:doc, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31339 - rthomas:doc, r=alexcrichton

When trying to run a specific test, I found the contributing docs a bit confusing and through a bit of googling found out that TESTNAME takes the fully qual'd name of the test.

I'm unsure if this can also take the source file, but I was unable to get that to work.

8 years agoRollup merge of #31327 - dirk:dirk/process-child-safety-docs, r=alexcrichton
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31327 - dirk:dirk/process-child-safety-docs, r=alexcrichton

`Drop` is not implemented for `Child`, so if it goes out of scope in Rust-land and gets deallocated the child process will continue to exist and execute. If users want a guarantee that the process has finished running and exited they must manually use `kill`, `wait`, or `wait_with_output`.

Fixes #31289.

r? @steveklabnik

8 years agoRollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis
Steve Klabnik [Tue, 2 Feb 2016 05:32:18 +0000 (00:32 -0500)]
Rollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis