]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichton
Jeffrey Seyfried [Sat, 25 Jun 2016 22:27:27 +0000 (22:27 +0000)]
Rollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichton

This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors).  This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes.

As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos).  While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.

8 years agoRollup merge of #34368 - petrochenkov:astqpath, r=Manishearth
Jeffrey Seyfried [Sat, 25 Jun 2016 22:26:47 +0000 (22:26 +0000)]
Rollup merge of #34368 - petrochenkov:astqpath, r=Manishearth

The AST part of https://github.com/rust-lang/rust/pull/34365

plugin-[breaking-change] cc https://github.com/rust-lang/rust/issues/31645

8 years agoRollup merge of #34213 - josephDunne:trait_item_macros, r=jseyfried
Jeffrey Seyfried [Sat, 25 Jun 2016 22:05:08 +0000 (22:05 +0000)]
Rollup merge of #34213 - josephDunne:trait_item_macros, r=jseyfried

**syntax-[breaking-change]** cc #31645
New `TraitItemKind::Macro` variant

This change adds support for macro expansion inside trait items by adding the new `TraitItemKind::Macro` and associated parsing code.

8 years agoAuto merge of #34464 - Manishearth:rollup, r=Manishearth
bors [Sat, 25 Jun 2016 13:45:07 +0000 (06:45 -0700)]
Auto merge of #34464 - Manishearth:rollup, r=Manishearth

Rollup of 8 pull requests

- Successful merges: #34379, #34406, #34411, #34414, #34435, #34438, #34445, #34449
- Failed merges:

8 years agoRollup merge of #34449 - regexident:ast_docs, r=steveklabnik
Manish Goregaokar [Sat, 25 Jun 2016 08:46:21 +0000 (14:16 +0530)]
Rollup merge of #34449 - regexident:ast_docs, r=steveklabnik

Improve `syntax::ast::*` type docs (examples, etc)

An attempt at making the public types in `syntax::ast` a bit more approachable.

[#rust-doc-days](https://facility9.com/2016/06/announcing-rust-doc-days/)

8 years agoRollup merge of #34445 - pyjarrett:lang_item_table_macro_rename, r=jseyfried
Manish Goregaokar [Sat, 25 Jun 2016 08:46:21 +0000 (14:16 +0530)]
Rollup merge of #34445 - pyjarrett:lang_item_table_macro_rename, r=jseyfried

Renames "lets_do_this" macro more appropriately.

The macro gets used to create a mapping of identifiers to names and their
associated functions. Since it creates a table of language items, let's rename
it in a similar manner to how vec! creates a vec.

8 years agoRollup merge of #34438 - frewsxcv:joinhandle, r=GuillaumeGomez
Manish Goregaokar [Sat, 25 Jun 2016 08:46:20 +0000 (14:16 +0530)]
Rollup merge of #34438 - frewsxcv:joinhandle, r=GuillaumeGomez

Indicate how the `JoinHandle` struct is created.

None

8 years agoRollup merge of #34435 - sanxiyn:typo, r=apasel422
Manish Goregaokar [Sat, 25 Jun 2016 08:46:20 +0000 (14:16 +0530)]
Rollup merge of #34435 - sanxiyn:typo, r=apasel422

Fix typo in future incompatible lint

Found in release triage.

8 years agoRollup merge of #34414 - alfiedotwtf:patch-1, r=steveklabnik
Manish Goregaokar [Sat, 25 Jun 2016 08:46:20 +0000 (14:16 +0530)]
Rollup merge of #34414 - alfiedotwtf:patch-1, r=steveklabnik

Switched tense to clarify what is happening in the example

8 years agoRollup merge of #34411 - Vogtinator:patch-1, r=sanxiyn
Manish Goregaokar [Sat, 25 Jun 2016 08:46:20 +0000 (14:16 +0530)]
Rollup merge of #34411 - Vogtinator:patch-1, r=sanxiyn

Fix typo in bootstrap README

"boostrap" instead of "bootstrap"

8 years agoRollup merge of #34379 - liigo:patch-11, r=GuillaumeGomez
Manish Goregaokar [Sat, 25 Jun 2016 08:46:19 +0000 (14:16 +0530)]
Rollup merge of #34379 - liigo:patch-11, r=GuillaumeGomez

Improve diagnostics E0425: `use` (public) name

E0425: unresolved name

8 years agoAuto merge of #34452 - frewsxcv:unwrap-or, r=alexcrichton
bors [Sat, 25 Jun 2016 06:14:12 +0000 (23:14 -0700)]
Auto merge of #34452 - frewsxcv:unwrap-or, r=alexcrichton

Use `Option::expect` instead of `unwrap_or_else` with `panic!`.

None

8 years agoAuto merge of #34441 - tbu-:pr_dont_ignore_errors, r=alexcrichton
bors [Sat, 25 Jun 2016 01:28:23 +0000 (18:28 -0700)]
Auto merge of #34441 - tbu-:pr_dont_ignore_errors, r=alexcrichton

Don't ignore errors of syscalls in std::sys::unix::fd

If any of these syscalls fail, it indicates a programmer error that
should not be silently ignored.

8 years agoreexport errors from syntax. fix failing cfail test
Jonathan Turner [Fri, 24 Jun 2016 23:10:15 +0000 (19:10 -0400)]
reexport errors from syntax. fix failing cfail test

8 years agoAuto merge of #34401 - GuillaumeGomez:err-codes, r=brson
bors [Fri, 24 Jun 2016 22:42:13 +0000 (15:42 -0700)]
Auto merge of #34401 - GuillaumeGomez:err-codes, r=brson

Add error code flags

r? @brson

cc @steveklabnik
cc @jonathandturner

8 years agoAuto merge of #34439 - ollie27:rustdoc_panic_fix, r=alexcrichton
bors [Fri, 24 Jun 2016 19:57:29 +0000 (12:57 -0700)]
Auto merge of #34439 - ollie27:rustdoc_panic_fix, r=alexcrichton

rustdoc: Fix panic caused by doc(hidden) trait methods

Fixes: #34423
r? @alexcrichton

8 years agoFix codemap tests to not double import
Jonathan Turner [Fri, 24 Jun 2016 17:20:23 +0000 (13:20 -0400)]
Fix codemap tests to not double import

8 years agoAdd examples in docs for `JoinHandle`.
Corey Farwell [Fri, 24 Jun 2016 12:12:58 +0000 (08:12 -0400)]
Add examples in docs for `JoinHandle`.

8 years agoImprove `syntax::ast::*` type docs (examples, etc)
Vincent Esche [Fri, 24 Jun 2016 11:14:34 +0000 (13:14 +0200)]
Improve `syntax::ast::*` type docs (examples, etc)

8 years agoAuto merge of #34425 - tbu-:pr_len_instead_of_size_hint, r=alexcrichton
bors [Fri, 24 Jun 2016 16:03:54 +0000 (09:03 -0700)]
Auto merge of #34425 - tbu-:pr_len_instead_of_size_hint, r=alexcrichton

Use `len` instead of `size_hint` where appropiate

This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.

8 years agoReexport syntax_pos in codemap and fix some cfail tests
Jonathan Turner [Fri, 24 Jun 2016 13:05:28 +0000 (09:05 -0400)]
Reexport syntax_pos in codemap and fix some cfail tests

8 years agoUse `Option::expect` instead of `unwrap_or_else` with `panic!`.
Corey Farwell [Fri, 24 Jun 2016 12:19:22 +0000 (08:19 -0400)]
Use `Option::expect` instead of `unwrap_or_else` with `panic!`.

8 years agoIndicate how the `JoinHandle` struct is created.
Corey Farwell [Thu, 23 Jun 2016 22:16:37 +0000 (18:16 -0400)]
Indicate how the `JoinHandle` struct is created.

8 years agoAuto merge of #34399 - alexcrichton:issue-audit, r=brson
bors [Fri, 24 Jun 2016 10:39:47 +0000 (03:39 -0700)]
Auto merge of #34399 - alexcrichton:issue-audit, r=brson

std: Fix up stabilization discrepancies

* Remove the deprecated `CharRange` type which was forgotten to be removed
  awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
  stabilized as part of #32804

8 years agoFix rfail test missing import
Jonathan Turner [Fri, 24 Jun 2016 10:31:19 +0000 (06:31 -0400)]
Fix rfail test missing import

8 years agoBubble up the errors in `set_nonblocking` and `set_cloexec`
Tobias Bucher [Fri, 24 Jun 2016 09:31:58 +0000 (11:31 +0200)]
Bubble up the errors in `set_nonblocking` and `set_cloexec`

8 years agoAuto merge of #34055 - brson:cmake, r=alexcrichton
bors [Fri, 24 Jun 2016 06:33:32 +0000 (23:33 -0700)]
Auto merge of #34055 - brson:cmake, r=alexcrichton

Convert makefiles to build LLVM/compiler-rt with CMake

This is certainly buggy, but I have successfully built on x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu. I haven't built successfully on mac yet, and I've seen mysterious test failures on Linux, but I'm interested in throwing this at the bots to see what they think.

8 years agoRenames "lets_do_this" macro more appropriately.
Paul Jarrett [Fri, 24 Jun 2016 03:02:30 +0000 (23:02 -0400)]
Renames "lets_do_this" macro more appropriately.

The macro gets used to create a mapping of identifiers to names and their
associated functions. Since it creates a table of language items, let's rename
it in a similar manner to how vec! creates a vec.

8 years agoAuto merge of #34077 - durka:patch-23, r=alexcrichton
bors [Fri, 24 Jun 2016 02:22:51 +0000 (19:22 -0700)]
Auto merge of #34077 - durka:patch-23, r=alexcrichton

upgrade thread_local! invocation syntax

Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items. In particular, `#![forbid(missing_docs, unused)]` is now tenable on a crate/module containing thread locals.

For an example see [here](https://is.gd/aVFZZF). This change is fully backwards compatible as far as I can tell.

cc @frankmcsherry

8 years agoFix up rpass tests missing imports
Jonathan Turner [Fri, 24 Jun 2016 01:21:35 +0000 (21:21 -0400)]
Fix up rpass tests missing imports

8 years agorustdoc: Fix panic caused by doc(hidden) trait methods
Oliver Middleton [Thu, 23 Jun 2016 22:17:35 +0000 (23:17 +0100)]
rustdoc: Fix panic caused by doc(hidden) trait methods

8 years agoAdd missing 'extern crate' for test
Jonathan Turner [Thu, 23 Jun 2016 22:02:50 +0000 (18:02 -0400)]
Add missing 'extern crate' for test

8 years agostd: Fix up stabilization discrepancies
Alex Crichton [Tue, 21 Jun 2016 17:14:16 +0000 (10:14 -0700)]
std: Fix up stabilization discrepancies

* Remove the deprecated `CharRange` type which was forgotten to be removed
  awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
  stabilized as part of #32804

8 years agoUpdating test I missed for old school refactor
Jonathan Turner [Thu, 23 Jun 2016 19:40:54 +0000 (15:40 -0400)]
Updating test I missed for old school refactor

8 years agomake old school mode a bit more configurable
Jonathan Turner [Thu, 23 Jun 2016 19:19:40 +0000 (15:19 -0400)]
make old school mode a bit more configurable

8 years agoFix typo in future incompatible lint
Seo Sanghyeon [Thu, 23 Jun 2016 18:33:40 +0000 (03:33 +0900)]
Fix typo in future incompatible lint

8 years agoAuto merge of #34372 - ollie27:rustdoc_sidebar, r=steveklabnik
bors [Thu, 23 Jun 2016 17:56:38 +0000 (10:56 -0700)]
Auto merge of #34372 - ollie27:rustdoc_sidebar, r=steveklabnik

rustdoc: Add more types to the sidebar

They're displayed in the same order as they are on modules pages.

You can test [here](https://ollie27.github.io/rust_doc_test/std/).
For example:
[before](https://doc.rust-lang.org/nightly/std/char/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/char/constant.MAX.html)
[before](https://doc.rust-lang.org/nightly/std/os/raw/type.c_char.html) [after](https://ollie27.github.io/rust_doc_test/std/os/raw/type.c_char.html)

8 years agoAdd missing refernce to RenderedLine
Jonathan Turner [Thu, 23 Jun 2016 16:12:02 +0000 (12:12 -0400)]
Add missing refernce to RenderedLine

8 years agoMove test helper functions to consolidated codemap testing
Jonathan Turner [Thu, 23 Jun 2016 14:50:05 +0000 (10:50 -0400)]
Move test helper functions to consolidated codemap testing

8 years agoActually consolidate the CodeMap tests
Jonathan Turner [Thu, 23 Jun 2016 13:05:39 +0000 (09:05 -0400)]
Actually consolidate the CodeMap tests

8 years agoFix touchy test to work with old and new error format
Jonathan Turner [Wed, 22 Jun 2016 22:56:09 +0000 (18:56 -0400)]
Fix touchy test to work with old and new error format

8 years agoConsolidate codemap tests and fix more errors for travis
Jonathan Turner [Wed, 22 Jun 2016 22:39:43 +0000 (18:39 -0400)]
Consolidate codemap tests and fix more errors for travis

8 years agoAddress more travis errors
Jonathan Turner [Wed, 22 Jun 2016 16:50:19 +0000 (12:50 -0400)]
Address more travis errors

8 years agoAddress comments and fix travis warning
Jonathan Turner [Tue, 21 Jun 2016 23:57:03 +0000 (19:57 -0400)]
Address comments and fix travis warning

8 years agoMove errors from libsyntax to its own crate
Jonathan Turner [Tue, 21 Jun 2016 22:08:13 +0000 (18:08 -0400)]
Move errors from libsyntax to its own crate

8 years agoDon't ignore errors of syscalls in std::sys::unix::fd
Tobias Bucher [Thu, 23 Jun 2016 11:57:55 +0000 (13:57 +0200)]
Don't ignore errors of syscalls in std::sys::unix::fd

If any of these syscalls fail, it indicates a programmer error that
should not be silently ignored.

8 years agoAuto merge of #34364 - cynicaldevil:develop, r=GuillaumeGomez
bors [Thu, 23 Jun 2016 11:43:40 +0000 (04:43 -0700)]
Auto merge of #34364 - cynicaldevil:develop, r=GuillaumeGomez

Modified E0220 to show error messages for more general cases

This PR extends `E0220`'s description to explain more cases.
Refer to [#34342](https://github.com/rust-lang/rust/pull/34342) for more.
r? @GuillaumeGomez

8 years agoUse `len` instead of `size_hint` where appropiate
Tobias Bucher [Thu, 23 Jun 2016 10:26:15 +0000 (12:26 +0200)]
Use `len` instead of `size_hint` where appropiate

This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.

8 years agoAuto merge of #34253 - jseyfried:improve_multi_modifiers, r=nrc
bors [Thu, 23 Jun 2016 08:04:47 +0000 (01:04 -0700)]
Auto merge of #34253 - jseyfried:improve_multi_modifiers, r=nrc

Allow `MultiItemModifier`s to expand into zero or many items

Fixes #34223.
r? @nrc

8 years agoImprove diagnostics E0425: `use` (public) items
Liigo Zhuang [Mon, 20 Jun 2016 08:19:19 +0000 (16:19 +0800)]
Improve diagnostics E0425: `use` (public) items

E0425: unresolved name

8 years agoAuto merge of #34374 - jseyfried:fix_hygiene_bug, r=nrc
bors [Thu, 23 Jun 2016 04:11:27 +0000 (21:11 -0700)]
Auto merge of #34374 - jseyfried:fix_hygiene_bug, r=nrc

Fix macro hygiene regression

The regression was caused by #32923, which is currently in beta.

The following is an example of regressed code:
```rust
fn main() {
    let x = 0;
    macro_rules! foo { () => {
        println!("{}", x); // prints `0` on stable and after this PR, prints `1` on beta and nightly
    } }

    let x = 1;
    foo!();
}
```

For code to regress, the following is necessary (but not sufficient):
 - There must be a local variable before a macro in a block, and the macro must use the variable.
 - There must be a second local variable with the same name after the macro.
 - The macro must be invoked in a statement position after the second local variable.

For example, if the `let x = 0;` from the breaking example were commented out, it would (correctly) not compile on beta/nightly. If the semicolon were removed from `foo!();`, it would (correctly) print `0` on beta and nightly.

r? @nrc

8 years agoupgrade thread_local! invocation syntax
Alex Burka [Sat, 4 Jun 2016 19:19:22 +0000 (15:19 -0400)]
upgrade thread_local! invocation syntax

Allows declaring multiple statics in one macro invocation, and supports attaching attributes to the generated items.

8 years agoMore hygiene tests
Jeffrey Seyfried [Wed, 22 Jun 2016 22:42:26 +0000 (22:42 +0000)]
More hygiene tests

8 years agoAuto merge of #33748 - emilio:mpsc-recv-timeout, r=alexcrichton
bors [Wed, 22 Jun 2016 20:35:12 +0000 (13:35 -0700)]
Auto merge of #33748 - emilio:mpsc-recv-timeout, r=alexcrichton

std: sync: Implement recv_timeout()

This is an attempt to implement https://github.com/rust-lang/rfcs/issues/962.

I'm not sure about if a change like this would require an rfc or something like
that, and this surely needs a lot more testing, but I wanted to take some eyes
on it before following.

cc @metajack @asajeffrey https://github.com/servo/servo/pull/11279 https://github.com/servo/servo/pull/11283

r? @aturon

8 years agoSwitched tense to clarify what is happening in the example
Alfie John [Wed, 22 Jun 2016 20:20:29 +0000 (06:20 +1000)]
Switched tense to clarify what is happening in the example

8 years agostd: sync: Implement recv_timeout()
Emilio Cobos Álvarez [Fri, 20 May 2016 00:43:18 +0000 (02:43 +0200)]
std: sync: Implement recv_timeout()

8 years agoFix typo in bootstrap README
Fabian Vogt [Wed, 22 Jun 2016 13:09:11 +0000 (15:09 +0200)]
Fix typo in bootstrap README

"boostrap" instead of "bootstrap"

8 years agoAuto merge of #34408 - Manishearth:rollup, r=Manishearth
bors [Wed, 22 Jun 2016 11:21:59 +0000 (04:21 -0700)]
Auto merge of #34408 - Manishearth:rollup, r=Manishearth

Rollup of 7 pull requests

- Successful merges: #34190, #34363, #34367, #34383, #34387, #34394, #34404
- Failed merges:

8 years agoRollup merge of #34404 - ollie27:concat_idents, r=alexcrichton
Manish Goregaokar [Wed, 22 Jun 2016 08:51:09 +0000 (09:51 +0100)]
Rollup merge of #34404 - ollie27:concat_idents, r=alexcrichton

Mark concat_idents! unstable

This is mostly just a documentation fix as I don't think stability
attributes have any effect on macros.

[before](https://doc.rust-lang.org/nightly/std/macro.concat_idents!.html) [after](https://ollie27.github.io/rust_doc_test/std/macro.concat_idents!.html)

8 years agoRollup merge of #34394 - oli-obk:const_cast_false_positive, r=eddyb
Manish Goregaokar [Wed, 22 Jun 2016 08:51:08 +0000 (09:51 +0100)]
Rollup merge of #34394 - oli-obk:const_cast_false_positive, r=eddyb

don't warn on casting byte strs to slices

r? @durka

8 years agoRollup merge of #34387 - ollie27:rustdoc_src_links, r=alexcrichton
Manish Goregaokar [Wed, 22 Jun 2016 08:51:08 +0000 (09:51 +0100)]
Rollup merge of #34387 - ollie27:rustdoc_src_links, r=alexcrichton

rustdoc: Fix a couple of issues with src links to external crates

- src links/redirects to extern fn from another crate had an extra '/'.
- src links to `pub use` of a crate module had an extra '/'.
- src links to renamed reexports from another crate used the new name
  for the link but should use the original name.

Fixes: #34274
8 years agoRollup merge of #34383 - alexcrichton:less-compiler-checks, r=brson
Manish Goregaokar [Wed, 22 Jun 2016 08:51:08 +0000 (09:51 +0100)]
Rollup merge of #34383 - alexcrichton:less-compiler-checks, r=brson

configure: Remove clang version checks

We no C++ and an incredibly small amount of C code as part of the build, so
there's not really much need for us to strictly check the version of compilers
as we're not really stressing anything. LLVM is a pretty huge chunk of C++ but
it should be the responsibility of LLVM to ensure that it can build with a
particular clang/gcc version, not ours (as this logic changes over time).

These version checks seem to basically just by us a regular stream of PRs every
six weeks or so when a new version is releases, so they're not really buying us
much. As a result, remove them and we can add then back piecemeal perhaps as a
blacklist if we really need to.

8 years agoRollup merge of #34367 - Stebalien:issue-23281, r=sfackler
Manish Goregaokar [Wed, 22 Jun 2016 08:51:07 +0000 (09:51 +0100)]
Rollup merge of #34367 - Stebalien:issue-23281, r=sfackler

Add regression test for #23281

Closes #23281

8 years agoRollup merge of #34363 - GuillaumeGomez:sleep, r=alexcrichton
Manish Goregaokar [Wed, 22 Jun 2016 08:51:07 +0000 (09:51 +0100)]
Rollup merge of #34363 - GuillaumeGomez:sleep, r=alexcrichton

Fix overflow error in thread::sleep

Fixes #34330

I added a test to have a more clear error inside the function. Since `time_t` is `i64` and we expect `u64`, maybe we should changed the awaited type?

8 years agoRollup merge of #34190 - ollie27:wrapping_fmt, r=alexcrichton
Manish Goregaokar [Wed, 22 Jun 2016 08:51:06 +0000 (09:51 +0100)]
Rollup merge of #34190 - ollie27:wrapping_fmt, r=alexcrichton

Implement Binary, Octal, LowerHex and UpperHex for Wrapping<T>

Fixes: #33659
8 years agoAuto merge of #33976 - komamitsu:assert_eq_with_msg, r=alexcrichton
bors [Wed, 22 Jun 2016 08:05:56 +0000 (01:05 -0700)]
Auto merge of #33976 - komamitsu:assert_eq_with_msg, r=alexcrichton

Add custom message parameter to `assert_eq!`

`assert!` macro accepts a custom message parameter and it's sometimes useful. But `assert_eq!` doesn't have it and users need to use `assert!` instead of `assert_eq!` when they want to output a custom message even if the assertion just compares two values. This pull request will resolve those cases.

8 years agoAuto merge of #33830 - moosingin3space:feature/mutable-high-priority-binaryheap,...
bors [Wed, 22 Jun 2016 03:52:23 +0000 (20:52 -0700)]
Auto merge of #33830 - moosingin3space:feature/mutable-high-priority-binaryheap, r=alexcrichton

Mutable access to the top element of a BinaryHeap

An implementation of the library change discussed here: https://github.com/rust-lang/rfcs/issues/1626

8 years agoConvert makefiles to build LLVM/compiler-rt with CMake
Brian Anderson [Thu, 2 Jun 2016 00:41:27 +0000 (00:41 +0000)]
Convert makefiles to build LLVM/compiler-rt with CMake

8 years agoAuto merge of #34402 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Tue, 21 Jun 2016 23:14:38 +0000 (16:14 -0700)]
Auto merge of #34402 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 7 pull requests

- Successful merges: #34356, #34360, #34369, #34371, #34378, #34380, #34391
- Failed merges:

8 years agoMark concat_idents! unstable
Oliver Middleton [Tue, 21 Jun 2016 22:30:15 +0000 (23:30 +0100)]
Mark concat_idents! unstable

This is mostly just a documentation fix as I don't think stability
attributes have any effect on macros.

8 years agoRollup merge of #34391 - pyjarrett:master, r=jseyfried
Guillaume Gomez [Tue, 21 Jun 2016 21:54:29 +0000 (23:54 +0200)]
Rollup merge of #34391 - pyjarrett:master, r=jseyfried

Improves organization of driver includes.

Minor reordering of use's in librustc_driver/driver.rs

- puts her::lower::lower_create with it's siblings
- groups link and write of rustc_trans::back

8 years agoRollup merge of #34380 - sanxiyn:travis-gdb, r=alexcrichton
Guillaume Gomez [Tue, 21 Jun 2016 21:54:29 +0000 (23:54 +0200)]
Rollup merge of #34380 - sanxiyn:travis-gdb, r=alexcrichton

Run debuginfo tests on Travis

8 years agoRollup merge of #34378 - liigo:patch-10, r=Manishearth
Guillaume Gomez [Tue, 21 Jun 2016 21:54:29 +0000 (23:54 +0200)]
Rollup merge of #34378 - liigo:patch-10, r=Manishearth

diagnostics comes from different places now

8 years agoRollup merge of #34371 - frewsxcv:thread-name, r=steveklabnik
Guillaume Gomez [Tue, 21 Jun 2016 21:54:28 +0000 (23:54 +0200)]
Rollup merge of #34371 - frewsxcv:thread-name, r=steveklabnik

Add examples for `std::thread::Thread::name`.

None

8 years agoRollup merge of #34369 - astocko:fix_doc_urls, r=steveklabnik
Guillaume Gomez [Tue, 21 Jun 2016 21:54:28 +0000 (23:54 +0200)]
Rollup merge of #34369 - astocko:fix_doc_urls, r=steveklabnik

book: Fixed links in book/compiler-plugins.md

Updated the links referring to roman_numerals.rs and lint_plugin_test.rs. Went from src/test/auxiliary/ to src/test/run-pass-fulldeps/auxiliary/.

8 years agoRollup merge of #34360 - dsprenkels:ops-doc, r=apasel422
Guillaume Gomez [Tue, 21 Jun 2016 21:54:28 +0000 (23:54 +0200)]
Rollup merge of #34360 - dsprenkels:ops-doc, r=apasel422

Markdown formatting fix

This pull request fixes some bad markdown formatting in the[ `std::ops::RangeTo` documentation](https://doc.rust-lang.org/std/ops/struct.RangeTo.html):

![screenshot from 2016-06-19 14 29 21](https://cloud.githubusercontent.com/assets/439973/16177354/5439a9bc-362a-11e6-97e5-374fd0bcf5a2.png)

8 years agoRollup merge of #34356 - matklad:cstr-docs, r=GuillaumeGomez
Guillaume Gomez [Tue, 21 Jun 2016 21:54:28 +0000 (23:54 +0200)]
Rollup merge of #34356 - matklad:cstr-docs, r=GuillaumeGomez

Document `CStr::as_ptr` dangers.

r? @steveklabnik

Hi! I've tried to document `CString::new("hello").unwrap().as_ptr()` footgun. Related [RFC] and the original [discussion].

[RFC]: https://github.com/rust-lang/rfcs/pull/1642
[discussion]: https://users.rust-lang.org/t/you-should-stop-telling-people-that-safe-rust-is-always-safe/6094

8 years agoAdd error code flags
Guillaume Gomez [Tue, 21 Jun 2016 21:52:30 +0000 (23:52 +0200)]
Add error code flags

8 years agoimplemented peek_mut and unit tests
Nathan Moos [Mon, 23 May 2016 23:59:11 +0000 (16:59 -0700)]
implemented peek_mut and unit tests

8 years agoModified E0220 to show error messages for more general cases
Nikhil Shagrithaya [Sun, 19 Jun 2016 14:03:47 +0000 (19:33 +0530)]
Modified E0220 to show error messages for more general cases

8 years agoFix overflow error in thread::sleep
Guillaume Gomez [Sun, 19 Jun 2016 13:58:40 +0000 (15:58 +0200)]
Fix overflow error in thread::sleep

8 years agoAuto merge of #34155 - ollie27:unzip, r=alexcrichton
bors [Tue, 21 Jun 2016 09:18:42 +0000 (02:18 -0700)]
Auto merge of #34155 - ollie27:unzip, r=alexcrichton

Remove unzip() SizeHint hack

This was using an invalid iterator so is likely to end with buggy
behaviour.

It also doesn't even benefit many type in std including Vec so removing it
shouldn't cause any problems.

Fixes: #33468
8 years agodon't warn on casting byte strs to slices
Oliver Schneider [Tue, 21 Jun 2016 08:08:31 +0000 (10:08 +0200)]
don't warn on casting byte strs to slices

8 years agoAdd message argument to `assert_eq` macro
Mitsunori Komatsu [Mon, 30 May 2016 16:53:14 +0000 (01:53 +0900)]
Add message argument to `assert_eq` macro

8 years agoAuto merge of #34189 - eddyb:mir-trans-imm, r=nagisa
bors [Tue, 21 Jun 2016 04:04:48 +0000 (21:04 -0700)]
Auto merge of #34189 - eddyb:mir-trans-imm, r=nagisa

trans: generalize immediate temporaries to all MIR locals.

Added `Mir::local_index` which gives you an unified index for `Arg`, `Var`, `Temp` and `ReturnPointer`.
Also available is `Mir::count_locals` which returns the total number of the above locals.
This simplifies a lot of the code which can treat all of the local lvalues in the same manner.
If we had `-> impl Iterator`, I could have added a bunch of useful `Ty` or `Lvalue` iterators for all locals.
We could of course manually write such iterators as they are needed.

The only place which currently takes advantage of unified locals is trans' alloca elision.
Currently it's not as good as it could be, due to our usage of `llvm.dbg.declare` in debug mode.
But passing some arguments and variables as immediates has some effect on release-mode `libsyntax`:

Old trans:
```
time: 11.500; rss: 710MB        translation
time: 0.002; rss: 710MB assert dep graph
time: 0.000; rss: 710MB serialize dep graph
  time: 4.410; rss: 628MB       llvm function passes [0]
  time: 84.485; rss: 633MB      llvm module passes [0]
  time: 23.898; rss: 634MB      codegen passes [0]
  time: 0.002; rss: 634MB       codegen passes [0]
time: 113.408; rss: 634MB       LLVM passes
```
`-Z orbit`, previously:
```
time: 12.588; rss: 723MB        translation
time: 0.002; rss: 723MB assert dep graph
time: 0.000; rss: 723MB serialize dep graph
  time: 4.597; rss: 642MB       llvm function passes [0]
  time: 77.347; rss: 646MB      llvm module passes [0]
  time: 24.703; rss: 648MB      codegen passes [0]
  time: 0.002; rss: 615MB       codegen passes [0]
time: 107.233; rss: 615MB       LLVM passes
```
`-Z orbit`, after this PR:
```
time: 13.820; rss: 672MB        translation
time: 0.002; rss: 672MB assert dep graph
time: 0.000; rss: 672MB serialize dep graph
  time: 3.969; rss: 591MB       llvm function passes [0]
  time: 72.294; rss: 595MB      llvm module passes [0]
  time: 24.610; rss: 597MB      codegen passes [0]
  time: 0.002; rss: 597MB       codegen passes [0]
time: 101.439; rss: 597MB       LLVM passes
```

8 years agoImproves organization of driver includes.
Paul Jarrett [Tue, 21 Jun 2016 02:11:45 +0000 (22:11 -0400)]
Improves organization of driver includes.

8 years agoAuto merge of #34186 - GuillaumeGomez:err-code-check, r=alexcrichton
bors [Mon, 20 Jun 2016 22:54:17 +0000 (15:54 -0700)]
Auto merge of #34186 - GuillaumeGomez:err-code-check, r=alexcrichton

Implementation of #34168

r? @brson

cc @alexcrichton
cc @steveklabnik
cc @jonathandturner

I only updated `librustc_privacy/diagnostics.rs`, and I already found a case where the code doesn't throw the expected error code (E0448).

Fixes #34168.

8 years agorustdoc: Fix a couple of issues with src links to external crates
Oliver Middleton [Sat, 18 Jun 2016 17:41:13 +0000 (18:41 +0100)]
rustdoc: Fix a couple of issues with src links to external crates

- src links/redirects to extern fn from another crate had an extra '/'.
- src links to `pub use` of a crate module had an extra '/'.
- src links to renamed reexports from another crate used the new name
  for the link but should use the original name.

8 years agotrans: generalize immediate temporaries to all MIR locals.
Eduard Burtescu [Mon, 20 Jun 2016 20:55:14 +0000 (23:55 +0300)]
trans: generalize immediate temporaries to all MIR locals.

8 years agoMerge PatKind::QPath into PatKind::Path in AST
Vadim Petrochenkov [Sat, 11 Jun 2016 15:47:47 +0000 (18:47 +0300)]
Merge PatKind::QPath into PatKind::Path in AST

8 years agotrans: noop drops don't need their lvalue in an alloca.
Eduard Burtescu [Thu, 9 Jun 2016 15:15:15 +0000 (18:15 +0300)]
trans: noop drops don't need their lvalue in an alloca.

8 years agotrans: derefs don't need the pointer in an alloca.
Eduard Burtescu [Thu, 9 Jun 2016 15:14:47 +0000 (18:14 +0300)]
trans: derefs don't need the pointer in an alloca.

8 years agotrans: split trans_consume off from trans_operand.
Eduard Burtescu [Thu, 9 Jun 2016 15:13:16 +0000 (18:13 +0300)]
trans: split trans_consume off from trans_operand.

8 years agoAdd regression test for #23281
Steven Allen [Sun, 19 Jun 2016 17:50:37 +0000 (13:50 -0400)]
Add regression test for #23281

Closes #23281

8 years agoAdd error code flag
Guillaume Gomez [Thu, 9 Jun 2016 22:34:46 +0000 (00:34 +0200)]
Add error code flag

8 years agoconfigure: Remove clang version checks
Alex Crichton [Mon, 20 Jun 2016 17:02:48 +0000 (10:02 -0700)]
configure: Remove clang version checks

We no C++ and an incredibly small amount of C code as part of the build, so
there's not really much need for us to strictly check the version of compilers
as we're not really stressing anything. LLVM is a pretty huge chunk of C++ but
it should be the responsibility of LLVM to ensure that it can build with a
particular clang/gcc version, not ours (as this logic changes over time).

These version checks seem to basically just by us a regular stream of PRs every
six weeks or so when a new version is releases, so they're not really buying us
much. As a result, remove them and we can add then back piecemeal perhaps as a
blacklist if we really need to.

8 years agoAdd more hygiene tests
Jeffrey Seyfried [Mon, 20 Jun 2016 12:13:05 +0000 (12:13 +0000)]
Add more hygiene tests

8 years agoAdd regression test
Jeffrey Seyfried [Mon, 20 Jun 2016 10:57:34 +0000 (10:57 +0000)]
Add regression test

8 years agoRemove unit tests
Jeffrey Seyfried [Mon, 20 Jun 2016 10:51:48 +0000 (10:51 +0000)]
Remove unit tests

8 years agoFix hygiene regression
Jeffrey Seyfried [Mon, 20 Jun 2016 10:28:32 +0000 (10:28 +0000)]
Fix hygiene regression