Commit Graph

50412 Commits

Author SHA1 Message Date
Sébastien Marie 263de3d0e7 pass CXX to run-make
use CXX value found at configure time inside run-make tests.

it permits OpenBSD to pass llvm-module-pass test (which use CXX
variable).
2016-02-16 06:30:30 +01:00
bors f3619ce026 Auto merge of #31626 - mitaa:rdoc-srch-escape, r=alexcrichton
Maybe they should be Markdown rendered instead, though that doesn't really seem to work all that well.

fixes #31059

r? @alexcrichton
2016-02-14 12:13:58 +00:00
bors 083dc5b12d Auto merge of #31614 - mitaa:rdoc_locitem_extmac, r=alexcrichton
fixes #26606

r? @alexcrichton
2016-02-14 10:10:50 +00:00
bors 86e6e3235e Auto merge of #31391 - frewsxcv:test, r=alexcrichton
Part of #31185
2016-02-14 08:25:39 +00:00
bors 9d98390765 Auto merge of #31581 - petrochenkov:patrefact, r=Manishearth
cc https://github.com/rust-lang/rust/pull/31487#issuecomment-182945101
plugin-[breaking-change]

The first commit renames `ast::Pat_` to `ast::PatKind` and uses its variants in enum qualified form. I've also taken the opportunity and renamed `PatKind::Region` into `PatKind::Ref`.

The second commit splits `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::UnitStruct`.
So, pattern kinds now correspond to their struct/variant kinds - `Struct`, `TupleStruct` and `UnitStruct`.
@nikomatsakis @nrc @arielb1 Are you okay with this naming scheme?
An alternative possible naming scheme is `PatKind::StructVariant`, `PatKind::TupleVariant`, `PatKind::UnitVariant` (it's probably closer to the common use, but I like it less).

I intend to apply these changes to HIR later, they should not necessarily go in the same nightly with https://github.com/rust-lang/rust/pull/31487
r? @Manishearth
2016-02-14 06:18:10 +00:00
Corey Farwell e5e2cdb9e3 Add LLVM ModulePass regression test using run-make.
Part of #31185
2016-02-13 22:04:51 -05:00
bors 09395bbfb0 Auto merge of #31551 - alexcrichton:deprecate-std-os-raw, r=brson
This commit is an implementation of [RFC 1415][rfc] which deprecates all types
in the `std::os::*::raw` modules.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md

Many of the types in these modules don't actually have a canonical platform
representation, for example the definition of `stat` on 32-bit Linux will change
depending on whether C code is compiled with LFS support or not. Unfortunately
the current types in `std::os::*::raw` are billed as "compatible with C", which
in light of this means it isn't really possible.

To make matters worse, platforms like Android sometimes define these types as
*smaller* than the way they're actually represented in the `stat` structure
itself. This means that when methods like `DirEntry::ino` are called on Android
the result may be truncated as we're tied to returning a `ino_t` type, not the
underlying type.

The commit here incorporates two backwards-compatible components:

* Deprecate all `raw` types that aren't in `std::os::raw`
* Expand the `std::os::*::fs::MetadataExt` trait on all platforms for method
  accessors of all fields. The fields now returned widened types which are the
  same across platforms (consistency across platforms is not required, however,
  it's just convenient).

and two also backwards-incompatible components:

* Change the definition of all `std::os::*::raw` type aliases to
  correspond to the newly widened types that are being returned on each
  platform.
* Change the definition of `std::os::*::raw::stat` on Linux to match the LFS
  definitions rather than the standard ones.

The breaking changes here will specifically break code that assumes that `libc`
and `std` agree on the definition of `std::os::*::raw` types, or that the `std`
types are faithful representations of the types in C. An [audit] has been
performed of crates.io to determine the fallout which was determined two be
minimal, with the two found cases of breakage having been fixed now.

[audit]: https://github.com/rust-lang/rfcs/pull/1415#issuecomment-180645582

---

Ok, so after all that, we're finally able to support LFS on Linux! This commit
then simultaneously starts using `stat64` and friends on Linux to ensure that we
can open >4GB files on 32-bit Linux. Yay!

Closes #28978
Closes #30050
Closes #31549
2016-02-14 02:17:38 +00:00
bors fae516277b Auto merge of #31643 - Manishearth:rollup, r=Manishearth
- Successful merges: #31535, #31537, #31542, #31559, #31563, #31582, #31584, #31585, #31589, #31607, #31609, #31610, #31612, #31629, #31635, #31637, #31638
- Failed merges:
2016-02-13 23:37:10 +00:00
Manish Goregaokar b34e625faf Rollup merge of #31638 - rkruppe:rm-tex, r=alexcrichton
This file is unused since #27789
2016-02-14 05:06:36 +05:30
Manish Goregaokar 5c835e9389 Rollup merge of #31637 - rkruppe:ignore-pdb, r=alexcrichton 2016-02-14 05:06:36 +05:30
Manish Goregaokar 97a87ef509 Rollup merge of #31635 - semarie:grep-e, r=alexcrichton
The BSD grep for "basic regex" don't support \| as alternate operator (at least under OpenBSD).

Use multiple -e arguments for expressing alternative. I have checked it under Linux (Debian).
2016-02-14 05:06:36 +05:30
Manish Goregaokar 6d0d6088b4 Rollup merge of #31629 - petevine:master, r=alexcrichton
This PR should make it easier to create a baseline x86 compiler  as well as make cross-compilation possible through a separate set of rlibs.

Plus, a few Linux distributions (e.g. Debian) have voiced interest in having this target available.
2016-02-14 05:06:36 +05:30
Manish Goregaokar 34d95f498c Rollup merge of #31612 - raindev:grammar, r=steveklabnik
I feel sorry for bothering you with such a literally one character changes. If it is counter productive feel free to point it out in the comments, that would be totally understandable. I could try to pack such a changes together in one PR to make them less distractive.

r? @steveklabnik
2016-02-14 05:06:35 +05:30
Manish Goregaokar 8873732585 Rollup merge of #31610 - Manishearth:doc-clarify-txrx, r=steveklabnik
Not everyone knows this convention. We could just rename the variables in the
example, but since this notation is commonly used it's a good opportunity to
introduce it.

r? @steveklabnik
2016-02-14 05:06:35 +05:30
Manish Goregaokar 1407645f17 Rollup merge of #31609 - erickt:nit, r=sfackler 2016-02-14 05:06:35 +05:30
Manish Goregaokar 8a5ec51eff Rollup merge of #31589 - reem:remove-unnecessary-poison-bounds, r=sfackler
None
2016-02-14 05:06:34 +05:30
Manish Goregaokar f1f6db688b Rollup merge of #31585 - tshepang:over-explanation, r=brson
…o read
2016-02-14 05:06:34 +05:30
Manish Goregaokar a40f2b6e92 Rollup merge of #31584 - tshepang:shorten, r=steveklabnik 2016-02-14 05:06:34 +05:30
Manish Goregaokar d5dddb4acd Rollup merge of #31582 - tshepang:missing-words, r=steveklabnik 2016-02-14 05:06:33 +05:30
Manish Goregaokar 1598995766 Rollup merge of #31563 - SDX2000:docfixes1, r=steveklabnik
This is a minor change. Please see title. IMO this is important since this is the first instance when we talk about allocating a vector. Not saying that it is allocated on the stack here leaves room for speculation and this might put off some people (they might not even read the later sections which go into more detail about this).
2016-02-14 05:06:33 +05:30
Manish Goregaokar 302e5cb232 Rollup merge of #31559 - scottrobertwhittaker:fix-typo, r=steveklabnik
"destructors" was misspelled.

r? @steveklabnik
2016-02-14 05:06:32 +05:30
Manish Goregaokar 42d17cc7cd Rollup merge of #31542 - nodakai:concat_idents-desc, r=steveklabnik
Just a small documentation change.

It would be great if anyone could check my English.
2016-02-14 05:06:32 +05:30
Manish Goregaokar 1c5c2f548e Rollup merge of #31537 - ollie27:book_doc_example, r=steveklabnik
The code sections shouldn't be inside a ```text block.

r? @steveklabnik
2016-02-14 05:06:32 +05:30
Manish Goregaokar 3c845fe869 Rollup merge of #31535 - Ketsuban:more-detail-in-wrapping-shift-documentation, r=steveklabnik
`wrapping_shl` and `wrapping_shr` are easy to mistake for rotations, when in fact they work somewhat differently. The documentation currently available is a little sparse and easy to misinterpret, so I've added a warning to anyone who bumps into them that the equivalent rotate methods may actually be what they're looking for.

If it's deemed useful to add a symmetrical mention to the documentation for the `rotate_left` and `rotate_right` methods, I can certainly have a go at that, but my gut feeling is that people likely to want a rotate will already know about the wrapping-arithmetic methods, for example from writing CPU simulators.
2016-02-14 05:06:32 +05:30
Alex Crichton aa23c98450 std: Deprecate all std::os::*::raw types
This commit is an implementation of [RFC 1415][rfc] which deprecates all types
in the `std::os::*::raw` modules.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md

Many of the types in these modules don't actually have a canonical platform
representation, for example the definition of `stat` on 32-bit Linux will change
depending on whether C code is compiled with LFS support or not. Unfortunately
the current types in `std::os::*::raw` are billed as "compatible with C", which
in light of this means it isn't really possible.

To make matters worse, platforms like Android sometimes define these types as
*smaller* than the way they're actually represented in the `stat` structure
itself. This means that when methods like `DirEntry::ino` are called on Android
the result may be truncated as we're tied to returning a `ino_t` type, not the
underlying type.

The commit here incorporates two backwards-compatible components:

* Deprecate all `raw` types that aren't in `std::os::raw`
* Expand the `std::os::*::fs::MetadataExt` trait on all platforms for method
  accessors of all fields. The fields now returned widened types which are the
  same across platforms (consistency across platforms is not required, however,
  it's just convenient).

and two also backwards-incompatible components:

* Change the definition of all `std::os::*::raw` type aliases to
  correspond to the newly widened types that are being returned on each
  platform.
* Change the definition of `std::os::*::raw::stat` on Linux to match the LFS
  definitions rather than the standard ones.

The breaking changes here will specifically break code that assumes that `libc`
and `std` agree on the definition of `std::os::*::raw` types, or that the `std`
types are faithful representations of the types in C. An [audit] has been
performed of crates.io to determine the fallout which was determined two be
minimal, with the two found cases of breakage having been fixed now.

[audit]: https://github.com/rust-lang/rfcs/pull/1415#issuecomment-180645582

---

Ok, so after all that, we're finally able to support LFS on Linux! This commit
then simultaneously starts using `stat64` and friends on Linux to ensure that we
can open >4GB files on 32-bit Linux. Yay!

Closes #28978
Closes #30050
Closes #31549
2016-02-13 14:42:55 -08:00
bors 6e446532e8 Auto merge of #31602 - mitaa:rdoc_doc_shorter, r=alexcrichton
fixes #25787
fixes #30366

r? @alexcrichton
2016-02-13 21:43:28 +00:00
bors c438802aa7 Auto merge of #31596 - mitaa:rdoc_assoc_item, r=alexcrichton 2016-02-13 19:28:09 +00:00
Robin Kruppe 3e34519141 Remove the last remaining .tex file 2016-02-13 20:27:57 +01:00
Robin Kruppe e4ef60c6c5 Add *.pdb to .gitignore 2016-02-13 20:24:31 +01:00
Sébastien Marie 15e5cf383d use a compatible syntax for grep GNU/BSD
The BSD grep for "basic regex" don't support \| as alternate operator.
Use multiple -e arguments for expressing alternative.
2016-02-13 20:03:08 +01:00
bors bc9192738d Auto merge of #31591 - alexcrichton:make-clean-with-rustbuild, r=brson
At the same time also touch up the job management on Windows to be a little more resilient to failure.
2016-02-13 17:05:50 +00:00
petevine d3ca33fc6e Add a new i586 Linux target 2016-02-13 17:03:00 +01:00
bors 4b7245047b Auto merge of #31588 - soltanmm:layer, r=nikomatsakis
<sup>**context:** moving back to a layered approach to type checking.</sup>

It looks like they'd not ended up tightly coupled in the time one was owned by the other. Every instance outside of `FnCtxt.inh` was from an `InferCtxt` created and dropped in the same function body.

This conflicts slightly with #30652, but there too it looks like the `FulfillmentContext` is from an `InferCtxt` that is created and dropped within the same function body (across one call to a module-private function).

That said, I heard that the PR that originally moved `FulfillmentContext` into `InferCtxt` was big, which leaves me concerned that I'm missing something.

r? @nikomatsakis
2016-02-13 15:25:23 +00:00
bors 5367776bd1 Auto merge of #31579 - ollie27:msvc_link, r=alexcrichton
/LARGEADDRESSAWARE is already enabled for i686-pc-windows-gnu so we should probably be consistent.
https://msdn.microsoft.com/en-us/library/wz223b1z.aspx

/SAFESEH is a good thing to enable by default.
https://msdn.microsoft.com/en-us/library/9a89h429.aspx
2016-02-13 13:44:02 +00:00
Vadim Petrochenkov 9f414a44a7 Split ast::PatKind::Enum into tuple struct and path patterns 2016-02-13 15:51:27 +03:00
bors 7fc4df6d23 Auto merge of #31570 - tomaka:ignore-emscripten, r=brson
Ignores 82 rpass tests that use threads.
I took care to only ignore tests that call `thread::spawn`. Some tests, for example `issue-16597`, also do fail because of lack of threads support, but for other reasons.

With this PR, we're down to 49 failures.

r? @brson
2016-02-13 12:03:38 +00:00
Vadim Petrochenkov 14adc9bb63 Rename ast::Pat_ and its variants 2016-02-13 13:49:24 +03:00
mitaa dcb352647b Escape search-index item descriptions
The item descriptions are included verbatim in search results
causing certain character sequences to misbehave.
2016-02-13 11:27:53 +01:00
bors 1ab22d77f9 Auto merge of #31564 - durka:lang-item-icemelt, r=nikomatsakis
This changes three ICEs to fatal errors.

I've grepped for `lang_item.*expect` and `\.expect.*lang` and didn't come up with any more. But, there could be more ICEs lurking.

I wasn't sure about a test because there already _is_ a cfail test for missing lang items, but it only checks one.

Relevant to (already closed) #31477 #31480 #31558.
cc @lilred
2016-02-13 10:23:49 +00:00
bors 5801991b5d Auto merge of #31562 - llogiq:lint_post, r=Manishearth
This fixes #31512 for me.

A bit of explanation: I want to have `check_block_post(&mut self, &Context, &Block)` and `check_crate_post(&mut self, &Context, &Crate)` methods in both early and late lint passes. Ideally we'd have _post methods for all operations that walk, but this'll do for now.

@Manishearth r?
2016-02-13 08:27:42 +00:00
bors a94642c6f5 Auto merge of #31557 - retep998:house-directory, r=alexcrichton
This is the simple solution. I know @nodakai was working on a more complex solution that overhauled the `fill_utf16_buf` stuff.

r? @alexcrichton
2016-02-13 06:47:29 +00:00
bors 97842f54c9 Auto merge of #31358 - japaric:print-targets, r=alexcrichton
that prints a list of all the triples supported by the `--target` flag

r? @alexcrichton
2016-02-13 03:21:49 +00:00
bors 3548b8c273 Auto merge of #31524 - jonas-schievink:autoderef, r=steveklabnik 2016-02-13 00:16:03 +00:00
mitaa a31d63320f Omit src-links for items from extern macros
If the span of a local item points into an external macro
its source-file will be bogus.
2016-02-12 22:45:17 +01:00
Andrew Barchuk eb0f9f81f0 Remove unnecessary article 2016-02-12 21:40:02 +02:00
Manish Goregaokar 9ec112749b Clarify what tx/rx mean in concurrency docs 2016-02-13 00:57:52 +05:30
Erick Tryzelaar e56cb87f30 syntax: Replace unstable `vec.as_slice().get()` with `vec.get()` 2016-02-12 10:59:26 -08:00
Alex Crichton 07638b95ce bootstrap: Be resilient to job object failures
The build bots already use job objects, and they don't support nested job
objects, and we shouldn't entirely bail out in this case anyway!
2016-02-12 10:40:32 -08:00
Jonas Schievink 559fca0fd3 Autoderef in librustc 2016-02-12 19:28:42 +01:00
Jonas Schievink 62bada40de Autoderef in librustc_borrowck 2016-02-12 19:28:42 +01:00