Commit Graph

57486 Commits

Author SHA1 Message Date
Niels Sascha Reedijk
783ab7766f Haiku: Work around the lack of the FIOCLEX ioctl
* Hand rebased from Niels original work on 1.9.0
2016-09-25 11:13:57 -05:00
Niels Sascha Reedijk
1a6fc8b7b8 Add support for the Haiku operating system on x86 and x86_64 machines
* Hand rebased from Niels original work on 1.9.0
2016-09-25 11:12:23 -05:00
bors
49dd95b078 Auto merge of #36564 - vanjacosic:patch-2, r=GuillaumeGomez
Docs: Update to "Ownership" section

Found #34865 while looking for easy docs wins I could contribute with.
2016-09-25 08:08:18 -07:00
bors
2d1d4d1994 Auto merge of #36713 - TimNN:fix-36708, r=arielb1
don't unwrap non-local span

Fixes #36708.
2016-09-25 02:46:18 -07:00
Tim Neumann
47b918d59a fix 36708 2016-09-25 08:50:59 +02:00
bors
d6dc33907a Auto merge of #36709 - Mark-Simulacrum:fix-wsl-tidy, r=Aatch
Skip binary tidy check when on Windows Linux Subsystem

While it's possible that other linux systems will include "Microsoft" in
their /proc/version, this is deemed unlikely, and since this is a tidy
check, will likely be caught by buildbot/travis either way.

Fixes #36706.
2016-09-24 22:20:25 -07:00
Peter N
0a72b4dc9f Suggesting a change to a comment that puzzled me
While reading this, the comment made it difficult for me to simply absorb the concept.  It interrupted my reading flow, and I think this expresses the same meaning, but reads a bit better.
2016-09-25 00:17:31 -04:00
Mark-Simulacrum
50dad3f1fd Skip binary tidy check when on Windows Linux Subsystem
While it's possible that other linux systems will include "Microsoft" in
their /proc/version, this is deemed unlikely, and since this is a tidy
check, will likely be caught by buildbot/travis either way.
2016-09-24 21:08:29 -06:00
Austin Hicks
f2f7ace213 Update codegen/link_section.rs. 2016-09-24 21:56:26 -04:00
Mark-Simulacrum
dfe8bd10fe Move ty_align and ty_size out of most C ABI code
s390x's C ABI ty_align and ty_size are not moved because the
implementation of ty_align varies in an atypical pattern: it calls
ty_size for the llvm::Vector type kind. ty_size then cannot be moved
since it indirectly calls ty_align through align.
2016-09-24 18:27:39 -06:00
Austin Hicks
12ff05fc50 Clean up matches that determine integers for specific alignment requirements 2016-09-24 18:21:16 -04:00
Austin Hicks
4038189688 Optimize struct_field_ptr 2016-09-24 18:21:12 -04:00
Austin Hicks
f16068e577 Completely kill represent_type and the adt::Repr type that goes with it. 2016-09-24 18:21:10 -04:00
bors
a0843d7210 Auto merge of #36657 - nnethercote:rm-TypedArena-with_capacity, r=eddyb
[breaking-change] Remove TypedArena::with_capacity

This is a follow-up to #36592.

The function is unused by rustc. Also, it doesn't really follow the
usual meaning of a `with_capacity` function because the first chunk
allocation is now delayed until the first `alloc` call.

This change reduces the size of `TypedArena` by one `usize`.

@eddyb: we discussed this on IRC. Would you like to review it?
2016-09-24 15:17:07 -07:00
Jeffrey Seyfried
b4906a93a0 Load macros from #[macro_use] extern crates in resolve. 2016-09-24 20:22:25 +00:00
bors
05c2fdd64f Auto merge of #36639 - pcwalton:const-prop, r=eddyb
librustc_mir: Propagate constants during copy propagation.

This optimization kicks in a lot when bootstrapping the compiler.

r? @eddyb
2016-09-24 10:48:42 -07:00
Patrick Walton
79cb2dbfac librustc_mir: Propagate constants during copy propagation.
This optimization kicks in a lot when bootstrapping the compiler.
2016-09-24 10:47:33 -07:00
Guillaume Gomez
323701e345 Fix some typos and improve doc comments style 2016-09-24 18:48:15 +02:00
bors
bdad70213b Auto merge of #36685 - brson:rev-string-from, r=sfackler
Revert "implement `From<Vec<char>>` and `From<&'a [char]>` for `String`"

This reverts commit ac73335f2f.

This is a revert of https://github.com/rust-lang/rust/pull/35054, which resulted in at least 7 known regressions, reported [here](https://internals.rust-lang.org/t/regression-report-stable-2016-08-16-vs-beta-2016-09-21/4119) and [here](https://github.com/rust-lang/rust/issues/36352), which will hit stable next week.

I think this breakage was somewhat unanticipated, and we did not realize so many crates were broken until this week, so reverting is the conservative thing to do until we figure out how not to cause so much breakage. I've run crater on the revert and did not find any new breakage from the revert.

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

cc @pwoolcoc @rust-lang/libs
2016-09-24 02:03:18 -07:00
bors
41e3aee3cc Auto merge of #36370 - michaelwoerister:incr-comp-metadata-hashes-check, r=nikomatsakis
ICH: Add ability to test the ICH of exported metadata items.

Also adds an example test case for ICH testing.

r? @nikomatsakis
2016-09-23 21:14:53 -07:00
Jeffrey Seyfried
1599461256 Refactor ext::tt::macro_rules::compile to take a ParseSess instead of an ExtCtxt. 2016-09-24 01:06:53 +00:00
bors
5a71fb35fd Auto merge of #36684 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests

- Successful merges: #36018, #36498, #36500, #36559, #36566, #36578, #36664
- Failed merges:
2016-09-23 17:00:28 -07:00
Guillaume Gomez
f342ece6d4 Rollup merge of #36664 - frewsxcv:vec-deque, r=GuillaumeGomez
Minor `VecDeque` doc examples cleanup.

None
2016-09-24 00:15:46 +02:00
Guillaume Gomez
812f908bc0 Rollup merge of #36578 - GuillaumeGomez:fix_typo, r=steveklabnik
Replace 'e.g.' by 'i.e.'

Fixes #36577.

r? @steveklabnik
2016-09-24 00:15:46 +02:00
Guillaume Gomez
9b7c375582 Rollup merge of #36566 - frewsxcv:9837, r=nikomatsakis
Add regression test for #9837.

Fixes https://github.com/rust-lang/rust/issues/9837
2016-09-24 00:15:45 +02:00
Guillaume Gomez
d56b116e63 Rollup merge of #36559 - grimreaper:eax/fix/r1, r=nikomatsakis
Fix a variety of minor issues

CSS:
- use integer values for font-size in CSS
- use correct ordering of @import
- "invisible" isn't a tag - presume its a class
- "border-color" defines the complete border

python:
- use "not" instead of == "[]" for python
- prefer triple quoted docstrings
- prefer static functions where possible
- prefer modern style classes where possible
- remove semicolons;

global:
- remove duplicated words words
2016-09-24 00:15:45 +02:00
Guillaume Gomez
677ede2623 Rollup merge of #36500 - orbea:docdir, r=nikomatsakis
This installs documentation not man pages

This fixes the description for docdir in configure, it was my mistake for leaving it as "man pages", oops.
2016-09-24 00:15:45 +02:00
Guillaume Gomez
f17bdb7eec Rollup merge of #36498 - jonathandturner:macro_std_lib, r=nikomatsakis
Fix wording for out-of-crate macro error

This fixes the wording of the note for out-of-crate macro errors to fix https://github.com/rust-lang/rust/issues/36469

The previous wording came from older logic in the PR that was replaced without updating the note.
2016-09-24 00:15:44 +02:00
Guillaume Gomez
f45283b93e Rollup merge of #36018 - durka:patch-28, r=steveklabnik
strengthen doc warning about CString::from_raw

Saw unsound code using this function on IRC.
2016-09-24 00:15:43 +02:00
Michael Woerister
6a2666d5b0 ICH: Add ability to test the ICH of exported metadata items. 2016-09-23 17:23:23 -04:00
bors
ee959a8cbe Auto merge of #36525 - jseyfried:load_crates_in_resolve, r=nikomatsakis
Load extern crates in `resolve`

This PR loads `extern crate`s in `resolve`'s `BuildReducedGraphVistor`.

r? @nikomatsakis
2016-09-23 13:40:45 -07:00
Ulrik Sverdrup
e82d13ea4b rustdoc css: Put where in trait listings on a new line
This is about the gray area at the top of a trait's documentation page,
that lists all methods and their signatures. A big trait page like
Iterator is very crowded without this tweak.
2016-09-23 20:31:14 +02:00
Brian Anderson
2e02803c73 Revert "implement From<Vec<char>> and From<&'a [char]> for String"
This reverts commit ac73335f2f.
2016-09-23 17:25:26 +00:00
bors
cb1b1eef8d Auto merge of #36649 - eddyb:selfish-idents, r=pnkfelix
Don't let a type parameter named "Self" unchanged past HIR lowering.

Fixes #36638 by rewriting `Self` type parameters (which are a parse error) to a `gensym("Self")`.

Background: #35605 introduced code across rustc that determines `Self` by its keyword name.
Reverting the sanity checks around that would inadvertently cause confusion between the true `Self` of a `trait` and other type parameters named `Self` (which have caused parse errors already).

I do not like to use `gensym`, and we may do something different here in the future, but this should work.
2016-09-23 09:49:26 -07:00
Felix S. Klock II
3a9b7be10b Added tests and fixed corner case for trailing attributes with no attached binding in generics. 2016-09-23 17:01:04 +02:00
Felix S. Klock II
c242fc3ea3 Generic unit tests for attributes on lifetime/type formals in generics list. 2016-09-23 17:01:04 +02:00
Felix S. Klock II
4c37ad6607 Add attribute support to generic lifetime and type parameters.
I am using `ThinAttributes` rather than a vector for attributes
attached to generics, since I expect almost all lifetime and types
parameters to not carry any attributes.
2016-09-23 17:01:04 +02:00
bors
86a686c4f7 Auto merge of #36335 - mcarton:compiletest, r=GuillaumeGomez
Fix ICE test in compiletest fail-tests

While working on Clippy which uses *compiletest*, I noticed that as long as all expected error are found, *compile-fail* tests will be marked *ok* even if there is an ICE. One function seems to have not been updated with JSON errors because ICEs are now reported like this:
```json
{"message":"../src/librustc/ty/context.rs:161: Attempted to intern `_` which contains inference types/regions in the global type context","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":null}
```
I don't think I can add a test for that.

I guess:
r? @nikomatsakis
2016-09-23 06:17:26 -07:00
Corey Farwell
3b9734437b Minor VecDeque doc examples cleanup. 2016-09-23 09:02:35 -04:00
Jeffrey Seyfried
7b5c59ea65 Load extern crates in resolve. 2016-09-23 06:35:33 +00:00
bors
f2c53ea66b Auto merge of #36631 - frewsxcv:dir-entry-debug, r=sfackler
Implement Debug for DirEntry.

None
2016-09-22 23:12:23 -07:00
Jeffrey Seyfried
2c85733521 Fix indents. 2016-09-23 04:27:08 +00:00
Jeffrey Seyfried
1e1804db18 Cleanup. 2016-09-23 04:27:08 +00:00
Jeffrey Seyfried
167f70a52f Fix fallout in tests. 2016-09-23 04:26:59 +00:00
Jeffrey Seyfried
6c08d03039 Parse paths in item, trait item, and impl item macro invocations. 2016-09-23 04:26:59 +00:00
Jeffrey Seyfried
a0e178db79 Parse paths in statement and pattern macro invocations. 2016-09-23 04:26:56 +00:00
Mikhail Modin
20c10913ff Merge branch 'master' into 35123-map3 2016-09-23 06:52:06 +03:00
bors
533c04dbb3 Auto merge of #36573 - jseyfried:groundwork, r=nrc
resolve: groundwork for building the module graph during expansion

r? @nrc
2016-09-22 19:54:56 -07:00
Brian Anderson
fa5eb54881 rustbuild: Print out all build steps when --verbose 2016-09-23 01:37:31 +00:00
bors
3a5d975fdc Auto merge of #36154 - nrc:proc-macro-init, r=@jseyfried
Adds a `ProcMacro` form of syntax extension

This commit adds syntax extension forms matching the types for procedural macros 2.0 (RFC #1566), these still require the usual syntax extension boiler plate, but this is a first step towards proper implementation and should be useful for macros 1.1 stuff too.

Supports both attribute-like and function-like macros.

Note that RFC #1566 has not been accepted yet, but I think there is consensus that we want to head in vaguely that direction and so this PR will be useful in any case. It is also fairly easy to undo and does not break any existing programs.

This is related to #35957 in that I hope it can be used in the implementation of macros 1.1, however, there is no direct overlap and is more of a complement than a competing proposal. There is still a fair bit of work to do before the two can be combined.

r? @jseyfried

cc @alexcrichton, @cgswords, @eddyb, @aturon
2016-09-22 16:33:41 -07:00