Commit Graph

43906 Commits

Author SHA1 Message Date
Alex Crichton
8790958237 std: Avoid missing fns on i686-pc-windows-msvc
It turns out that the 32-bit toolchain for MSVC has many of these functions as
`static inline` functions in header files so there's not actually a symbol for
Rust to call. All of the implementations just cast floats to their 64-bit
variants and then cast back to 32-bit at the end, so the standard library now
takes this strategy.
2015-06-27 13:02:18 -07:00
Alex Crichton
5de665e8b3 rustc_back: Learn about i686-pc-windows-msvc
This commit adds the i686-pc-windows-msvc triple to the compiler's repertoire of
triples to prepare for targeting 32-bit MSVC.
2015-06-27 13:02:18 -07:00
Alex Crichton
ae36d4f72a mk: Add support for i686-pc-windows-msvc
This commit modifies the configure script and our makefiles to support building
32-bit MSVC targets. The MSVC toolchain is now parameterized over whether it can
produce a 32-bit or 64-bit binary. The configure script was updated to export
more variables at configure time, and the makefiles were rejiggered to
selectively reexport the relevant environment variables for the applicable
targets they're going to run for.
2015-06-27 13:02:18 -07:00
bors
2ba46f8bbc Auto merge of #26616 - Manishearth:rollup, r=Manishearth
- Successful merges: #26565, #26584, #26596, #26603
- Failed merges:
2015-06-27 14:53:15 +00:00
bors
b36ae01946 Auto merge of #26609 - huonw:align, r=alexcrichton
These will first be deprecated in 1.2.0, not 1.1.0.
2015-06-27 13:02:17 +00:00
bors
04daae77be Auto merge of #26579 - Techern:start-12-doc, r=brson
At the moment, it only mentions the fix to parallel codegen.

I was going to add more, but I have to go for a while - If this isn't reviewed when I get back, I'll remove it and resubmit it after filling in more :)
2015-06-27 09:54:15 +00:00
Manish Goregaokar
6dd33b459b Rollup merge of #26603 - Gankro:ref, r=steveklabnik
Quick poll of basically the entire core team says this is ok.
2015-06-27 14:18:47 +05:30
Manish Goregaokar
0bf0ea3a52 Rollup merge of #26596 - richo:richo-cleanup-macros, r=alexcrichton 2015-06-27 14:18:47 +05:30
Manish Goregaokar
1ce9b5927e Rollup merge of #26584 - omasanori:fix-26537, r=alexcrichton
Fix #26537.
2015-06-27 14:18:47 +05:30
Manish Goregaokar
ec232c8d93 Rollup merge of #26565 - Techern:ignore-kdevelop, r=brson
This is just a simple change to ignore KDevelop 4 (and pre-release versions of KDevelop 5) project files.
2015-06-27 14:18:47 +05:30
bors
650566ef2a Auto merge of #26575 - eddyb:tycx, r=nikomatsakis
Next step towards split local/global type contexts, after #26351.
cc @rust-lang/compiler @jroesch
2015-06-27 07:32:56 +00:00
bors
d3c03d0987 Auto merge of #26569 - alexcrichton:msvc-llvm-update, r=brson
Now that LLVM has been updated, the only remaining roadblock to implementing
unwinding for MSVC is to fill out the runtime support in `std::rt::unwind::seh`.
This commit does precisely that, fixing up some other bits and pieces along the
way:

* The `seh` unwinding module now uses `RaiseException` to initiate a panic.
* The `rust_try.ll` file was rewritten for MSVC (as it's quite different) and is
  located at `rust_try_msvc_64.ll`, only included on MSVC builds for now.
* The personality function for all landing pads generated by LLVM is hard-wired
  to `__C_specific_handler` instead of the standard `rust_eh_personality` lang
  item. This is required to get LLVM to emit SEH unwinding information instead
  of DWARF unwinding information. This also means that on MSVC the
  `rust_eh_personality` function is entirely unused (but is defined as it's a
  lang item).

More details about how panicking works on SEH can be found in the
`rust_try_msvc_64.ll` or `seh.rs` files, but I'm always open to adding more
comments!

A key aspect of this PR is missing, however, which is that **unwinding is still
turned off by default for MSVC**. There is a [bug in llvm][llvm-bug] which
causes optimizations to inline enough landing pads that LLVM chokes. If the
compiler is optimized at `-O1` (where inlining isn't enabled) then it can
bootstrap with unwinding enabled, but when optimized at `-O2` (inlining is
enabled) then it hits a fatal LLVM error.

[llvm-bug]: https://llvm.org/bugs/show_bug.cgi?id=23884
2015-06-27 05:06:22 +00:00
bors
773052a608 Auto merge of #26574 - brson:relnotes-fix, r=alexcrichton
My bad!
2015-06-27 02:43:00 +00:00
Cruz Julian Bishop
1aabbd01c3 Initial documentation for 1.2.0, uploading to test markdown 2015-06-27 09:16:11 +10:00
bors
cb7d062155 Auto merge of #26605 - Ms2ger:raw-doc, r=alexcrichton 2015-06-26 22:44:44 +00:00
Huon Wilson
0f6d4aa786 core: fix deprecation since version of align_of_min.
These will first be deprecated in 1.2.0, not 1.1.0.
2015-06-26 15:00:31 -07:00
Ms2ger
532235be27 Use Box::into_raw rather than the deprecated boxed::into_raw in tests and documentation. 2015-06-26 22:29:40 +02:00
bors
1032384661 Auto merge of #26568 - barosl:rel-notes-refs, r=alexcrichton
I found some typos in the upcoming 1.1 release note. I corrected them, but I wanted to go further. So I wrote a script that checks the integrity of the Markdown references, and ran it against `RELEASES.md`.

This commit fixes some trivial cases, but also removes the following "unused" references:

- [`Iterator::cloned`](http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned)
- [`thread::scoped`](http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html)
- [`Debug` improvements](https://github.com/rust-lang/rfcs/blob/master/text/0640-debug-improvements.md)
- [Rebalancing coherence.](https://github.com/rust-lang/rfcs/pull/1023)

However, I think there's a possibility that these features might need to get descriptions as well. How do you feel about it?
2015-06-26 20:09:13 +00:00
Alexis Beingessner
9001da658a make book match reference 2015-06-26 12:06:05 -07:00
Alexis Beingessner
c98e46c7ca accessing private fields is not safe, and io isn't scary 2015-06-26 11:44:02 -07:00
Richo Healey
30cde078c6 std: clean up duplicated attrs and comment on panic 2015-06-26 09:53:56 -07:00
bors
2cb8a31e7c Auto merge of #26595 - dotdash:fca_slice, r=eddyb
Storing them as FCAs is a regression from the recent change that made
fat pointers immediate return values so that they are passed in
registers instead of memory.
2015-06-26 15:07:27 +00:00
Björn Steinbrink
2051b3e28f Avoid storing fat pointers as first class aggregates
Storing them as FCAs is a regression from the recent change that made
fat pointers immediate return values so that they are passed in
registers instead of memory.
2015-06-26 16:40:51 +02:00
Eduard Burtescu
ad66c215aa rustc: switch most remaining middle::ty functions to methods. 2015-06-26 07:34:57 +03:00
Eduard Burtescu
5cedd66a6c rustc: remove 3 dead functions in middle::ty. 2015-06-26 07:34:56 +03:00
Eduard Burtescu
6db5126240 rustc: make ty::mk_* constructors into methods on ty::ctxt. 2015-06-26 07:34:56 +03:00
Eduard Burtescu
2332765cbc rustc: prefer unqualified ctxt to ty::ctxt in middle::ty. 2015-06-26 07:34:56 +03:00
Eduard Burtescu
59935f70e0 rustc: move some functions in middle::ty working on Ty to methods. 2015-06-26 07:34:56 +03:00
Eduard Burtescu
aa03871a6e rustc: combine type-flag-checking traits and fns and into one trait. 2015-06-26 07:34:56 +03:00
bors
378a370ff2 Auto merge of #25646 - huonw:align, r=alexcrichton
This removes a footgun, since it is a reasonable assumption to make that
pointers to `T` will be aligned to `align_of::<T>()`. This also matches
the behaviour of C/C++. `min_align_of` is now deprecated.

Closes #21611.
2015-06-26 02:58:31 +00:00
OGINO Masanori
fd9b2caa5f Correct a missing reference in the release note.
Fix #26537.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2015-06-26 11:09:15 +09:00
bors
b70d1c601d Auto merge of #26415 - jroesch:rename-as-predicate, r=nikomatsakis
@nikomatsakis and I ran into this earlier and I figured we should rename the trait and method to match the typical naming convention.
2015-06-26 00:31:44 +00:00
Jared Roesch
44bccd8842 Rename AsPredicate to ToPredicate in order to match naming conventions 2015-06-25 17:29:20 -07:00
Cruz Julian Bishop
8e3ea5d501 Ignore KDevelop 4 (and 5 pre-release) project files 2015-06-25 23:26:05 +00:00
bors
912ab64a0d Auto merge of #26567 - Techern:os-dupe-code, r=alexcrichton
It's nearly midnight. I'm tired. I'll look for something worth doing in the morning :)
2015-06-25 20:22:27 +00:00
Cruz Julian Bishop
ad39fcc535 libstd/rand/os.rs: Remove a tiny bit of duplicated code
It's nearly midnight. I'm tired. I'll look for something worth doing in the morning :)
2015-06-25 23:37:28 +00:00
Barosl Lee
74fbe3e088 Correct typos and remove unused references from RELEASES.md
I found some typos in the upcoming 1.1 release note. I corrected them,
but I wanted to go further. So I wrote a script that checks the
integrity of the Markdown references, and ran it against `RELEASES.md`.

This commit fixes some trivial cases, but also removes the following
"unused" references:

- [`Iterator::cloned`](http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned)
- [`thread::scoped`](http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html)
- [`Debug` improvements](https://github.com/rust-lang/rfcs/blob/master/text/0640-debug-improvements.md)
- [Rebalancing coherence.](https://github.com/rust-lang/rfcs/pull/1023)

However, I think there's a possibility that these features might need to
get descriptions as well. How do you feel about it?
2015-06-26 05:17:10 +09:00
Brian Anderson
3f178b8653 Fix links in release notes.
My bad!
2015-06-25 12:31:06 -07:00
bors
8cf22b5eaf Auto merge of #26566 - michaelsproul:release-notes, r=alexcrichton
In the release notes, the link name `[err]` was used to refer both to the error index and the error chaining RFC. Another problem I noticed was that `[fs-expand]` is never defined.
2015-06-25 18:52:13 +00:00
bors
70b2f4789e Auto merge of #26542 - GuillaumeGomez:patch-2, r=Manishearth 2015-06-25 17:21:44 +00:00
Alex Crichton
759a7f1f66 test: Use liblibc in lang-item-public
Makes this test case more robust by using standard libraries to ensure the
binary can be built.
2015-06-25 09:33:15 -07:00
Alex Crichton
9e3cb64475 rustc_trans: Handle empty dlls on MSVC
If a dylib doesn't actually export any symbols then link.exe won't emit a
`foo.lib` file to link against (as one isn't necessary). Detect this case in the
backend by omitting the `foo.lib` argument to the linker if it doesn't actually
exist.
2015-06-25 09:33:15 -07:00
Alex Crichton
91d799eab0 msvc: Implement runtime support for unwinding
Now that LLVM has been updated, the only remaining roadblock to implementing
unwinding for MSVC is to fill out the runtime support in `std::rt::unwind::seh`.
This commit does precisely that, fixing up some other bits and pieces along the
way:

* The `seh` unwinding module now uses `RaiseException` to initiate a panic.
* The `rust_try.ll` file was rewritten for MSVC (as it's quite different) and is
  located at `rust_try_msvc_64.ll`, only included on MSVC builds for now.
* The personality function for all landing pads generated by LLVM is hard-wired
  to `__C_specific_handler` instead of the standard `rust_eh_personality` lang
  item. This is required to get LLVM to emit SEH unwinding information instead
  of DWARF unwinding information. This also means that on MSVC the
  `rust_eh_personality` function is entirely unused (but is defined as it's a
  lang item).

More details about how panicking works on SEH can be found in the
`rust_try_msvc_64.ll` or `seh.rs` files, but I'm always open to adding more
comments!

A key aspect of this PR is missing, however, which is that **unwinding is still
turned off by default for MSVC**. There is a [bug in llvm][llvm-bug] which
causes optimizations to inline enough landing pads that LLVM chokes. If the
compiler is optimized at `-O1` (where inlining isn't enabled) then it can
bootstrap with unwinding enabled, but when optimized at `-O2` (inlining is
enabled) then it hits a fatal LLVM error.

[llvm-bug]: https://llvm.org/bugs/show_bug.cgi?id=23884
2015-06-25 09:33:15 -07:00
Guillaume Gomez
7b4eb1aa90 Add E0327 error code. Thanks @nagisa for his help! 2015-06-25 18:20:29 +02:00
Alex Crichton
1ec520a531 mk: Move logic out of MSVC's 64-bit cfg makefile
This logic applies to all MSVC targets, so instead refactor it into platform.mk
so it can one day apply to 32-bit MSVC.
2015-06-25 09:20:12 -07:00
bors
cfb77788ce Auto merge of #26559 - BrodyHolden:ffi-doc-references-std-comm, r=bluss
The FFI documentation references std::comm. Replace with std::sync::mpsc.

Also wrap the line.
2015-06-25 14:53:16 +00:00
Michael Sproul
0716da555f relnotes: Fix error index link. 2015-06-25 23:29:09 +10:00
bors
b213c947f8 Auto merge of #26558 - nham:fix_24357, r=alexcrichton
Fixes #24357.

Also adds a (totally separate) regression test, which

Closes #18119
2015-06-25 10:39:09 +00:00
bors
688b62382c Auto merge of #26561 - SimonSapin:remove-titlecase, r=alexcrichton
I added it because it was easy (same a `char::to_lowercase`, just a different table), but it doesn’t make sense to have this in std but not str::to_titlecase, which would require https://github.com/unicode-rs/unicode-segmentation

At some point in the future this feature will be available (both on char and str) in a crates.io crate.
2015-06-25 08:24:23 +00:00
bors
124d1657cc Auto merge of #26563 - sfackler:vec-from-iter-overflow, r=Gankro
Closes #26550
2015-06-25 06:00:15 +00:00