Commit Graph

45549 Commits

Author SHA1 Message Date
Alex Crichton
e837258bbd rollup merge of #27630: sylvestre/master 2015-08-11 22:42:19 -07:00
Alex Crichton
737397c584 rollup merge of #27622: eefriedman/https-url
Also fixes a few outdated links.
2015-08-11 22:11:25 -07:00
Alex Crichton
e132f76703 rollup merge of #27618: dotdash/drop_fixes 2015-08-11 22:11:22 -07:00
Alex Crichton
a0d51819c3 rollup merge of #27615: GuillaumeGomez/send_sync
Part of #22709.
cc @Veedrac

r? @bluss
2015-08-11 22:11:21 -07:00
Alex Crichton
93bb57e765 rollup merge of #27605: AlisdairO/diagnostics387
As title :-)
Part of #24407.

r? @Manishearth
2015-08-11 22:11:20 -07:00
bors
542d56ea91 Auto merge of #27615 - GuillaumeGomez:send_sync, r=huonw
Part of #22709.
cc @Veedrac

r? @bluss
2015-08-12 03:11:48 +00:00
Niranjan Padmanabhan
d73d22b8cc Update version number response for new version of rust 2015-08-11 18:45:53 -07:00
Alex Burka
27c44c8106 correct copy/paste typos in stdio.rs comments
I'm not 100% sure lines 63 and 73 are typos.
2015-08-11 20:58:15 -04:00
Chris Krycho
09ed80fc9c mk/docs: remove Pandoc and LaTeX elements. 2015-08-11 20:12:11 -04:00
Alex Crichton
b6b4f5a0e7 trans: Re-enable unwinding on 64-bit MSVC
This commit leverages the runtime support for DWARF exception info added
in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally
adds a few minor fixes here and there in the test harness and such to get
`make check` entirely passing on 64-bit MSVC:

* The invocation of `maketest.py` now works with spaces/quotes in CC
* debuginfo tests are disabled on MSVC
* A link error for librustc was hacked around (see #27438)
2015-08-11 16:45:02 -07:00
bors
58b0aa5e42 Auto merge of #27584 - TimNN:macro-eof-span, r=huonw
The ideas is to use the span of the complete macro invocation if the span of a macro error is `DUMMY_SP`.

fixes #7970
2015-08-11 23:21:19 +00:00
Alex Crichton
938099a7eb Register new snapshots
* Lots of core prelude imports removed
* Makefile support for MSVC env vars and Rust crates removed
* Makefile support for morestack removed
2015-08-11 15:11:13 -07:00
Michael Macias
8f4aee8e7f std: Fix imports for ios target 2015-08-11 14:57:14 -05:00
Eli Friedman
155689b699 Use correct target CPU for iOS simulator.
This matches the behavior of clang.
2015-08-11 12:05:36 -07:00
Vadim Chugunov
cb5cd5497c Fix copy-paste bug.
(that didn't seem to affect anything as the Rust type of the args wasn't getting used for code generation)
2015-08-11 10:41:22 -07:00
bors
dcdcc6f6bc Auto merge of #27571 - TimNN:pretty-no-crate-type, r=alexcrichton
Because I wanted to change the pretty test as little as possible I added `// compiler-flags: --crate-type=lib` to those test that failed because of a missing `main`. Passes `make check-stage1-pretty` locally.

cc @nrc
cc #27567
2015-08-11 17:27:34 +00:00
Corey Farwell
3acec57d36 Fix formatting for E0067 and E0070 error messages
They are currently rendered incorrectly

https://doc.rust-lang.org/error-index.html#E0067

https://doc.rust-lang.org/error-index.html#E0070
2015-08-11 13:25:11 -04:00
Guillaume Gomez
f1e613eeb1 Update E0425 error explanation 2015-08-11 19:16:23 +02:00
Guillaume Gomez
f2f4a5c862 Add HashSet and HashMap tests 2015-08-11 18:44:39 +02:00
Georg Brandl
29945d5db0 syntax: fix use of "vector" for [x; n] literal and [x, y] patterns 2015-08-11 17:41:06 +02:00
Tobias Bucher
0354d7a800 Remove unneeded FIXME 2015-08-11 17:13:35 +02:00
bors
91c618f133 Auto merge of #27575 - brson:lint, r=alexcrichton
This reverts commit 9191a78955.

This was reverted previously until the `--cap-lints` option was implemented.
2015-08-11 14:42:23 +00:00
Alisdair Owens
fef60c03e0 add long diagnostics for E0194 2015-08-11 15:09:09 +01:00
bors
1af31d4974 Auto merge of #27553 - Diggsey:win-path-fix, r=alexcrichton
I have no idea how bors keeps working without this - I can only assume it's some peculiarity of how windows searches for DLLs.

Without this change, running `make check` on windows will not correctly set PATH to include eg. `x86_64-pc-windows-gnu\stage1\bin\rustlib\x86_64-pc-windows-gnu\lib`, and when it tries to run eg. `stage1/test/stdtest-x86_64-pc-windows-gnu.exe`, it will fail because windows can't find the DLLs on which it relies.

It seems to be just a mistake: when the equivalent was added for the branch that deals with unix-like platforms, the windows branch was left unchanged.
2015-08-11 12:59:14 +00:00
bors
c756526eb2 Auto merge of #27658 - Manishearth:rollup, r=Manishearth
- Successful merges: #27542, #27571, #27572, #27577, #27611, #27612, #27617, #27633, #27647, #27648, #27651
- Failed merges:
2015-08-11 11:20:11 +00:00
Manish Goregaokar
aebd6d5106 Rollup merge of #27651 - tshepang:patch-8, r=Gankro 2015-08-11 16:48:03 +05:30
Manish Goregaokar
4645662a12 Rollup merge of #27648 - tshepang:patch-7, r=brson 2015-08-11 16:48:03 +05:30
Manish Goregaokar
306d2ca49a Rollup merge of #27647 - rust-lang:issue-27646, r=alexcrichton
This is in line with other targets.

Closes #27646
2015-08-11 16:48:02 +05:30
Manish Goregaokar
1bcbeb21a3 Rollup merge of #27633 - tshepang:patch-6, r=alexcrichton 2015-08-11 16:48:02 +05:30
Manish Goregaokar
2fdfe09275 Rollup merge of #27617 - AlisdairO:diagnostics193, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-08-11 16:48:02 +05:30
Manish Goregaokar
93f8031303 Rollup merge of #27612 - vincentbernat:fix/doc/iter-nth, r=steveklabnik
The "nth" element can be confusing. In an array context, we know indexes
start from 0 but one may believe this is not the case with "nth". For
example, would `.nth(1)` return the first (1th/1st) or the second
element?  Rephrase a bit to be less confusing.

r? @steveklabnik
2015-08-11 16:48:02 +05:30
Manish Goregaokar
a917f61569 Rollup merge of #27611 - vincentbernat:fix/doc/chars-iterator, r=steveklabnik
The previous wording was confusing. While would we need to go through
the whole list just to find the first code point? `chars()` being an
iterator, we only need to walk from the beginning of the list.

Note that I am not a native English speaker and I have still difficulties to spot if a "the" is needed somewhere. Feel free to take this PR as a mere suggestion.

r? @steveklabnik
2015-08-11 16:48:02 +05:30
Manish Goregaokar
be2d4fbcb0 Rollup merge of #27577 - diaphore:trailing-newline-formatmessagew, r=alexcrichton
`FormatMessageW` always inserts trailing `\r\n` to system messages which is a minor annoyance when they're fed to `Debug` but can break formatting with `Display`.

```rust
fn main() {
    use std::env;
    if let Err(err) = env::set_current_dir("???") {
        println!("{:#?}\n{}", err, err);
    }
}
```
```_
Error {
    repr: Os {
        code: 2,
        message: "The system cannot find the file specified.\r\n"
    }
}
The system cannot find the file specified.
 (os error 2)
```
2015-08-11 16:48:01 +05:30
Manish Goregaokar
2cad6fef60 Rollup merge of #27572 - brson:authors, r=alexcrichton 2015-08-11 16:48:01 +05:30
Manish Goregaokar
e40516bcb4 Rollup merge of #27542 - steveklabnik:gh27303, r=alexcrichton
Fixes #27303
2015-08-11 16:48:01 +05:30
Tim Neumann
f0ea2b66f3 Fix #27567: remove --crate-type=lib from pretty test 2015-08-11 13:00:38 +02:00
Tim Neumann
c8f32769b8 remove unused file in test/pretty 2015-08-11 13:00:14 +02:00
Jose Narvaez
b7a88d8702 Updated the link with rendered version of the Spanish trpl translation. 2015-08-11 11:02:38 +01:00
bors
23f43896ce Auto merge of #27518 - alexcrichton:msvc-builtin-llvm-ar, r=huonw
This means that we no longer need to ship the `llvm-ar.exe` binary in the MSVC
distribution, and after a snapshot we can remove a good bit of logic from the
makefiles!
2015-08-11 07:48:39 +00:00
bors
f1ae605db8 Auto merge of #27549 - tshepang:clarity, r=alexcrichton 2015-08-11 06:11:29 +00:00
bors
50141d7e1e Auto merge of #26818 - sfackler:duration-stabilization, r=aturon
This commit stabilizes the `std::time` module and the `Duration` type.
`Duration::span` remains unstable, and the `Display` implementation for
`Duration` has been removed as it is still being reworked and all trait
implementations for stable types are de facto stable.

This is a [breaking-change] to those using `Duration`'s `Display`
implementation.

I'm opening this PR as a platform for discussion - there may be some method renaming to do as part of the stabilization process.
2015-08-11 03:47:16 +00:00
Steven Fackler
b51e009069 Fix doc test 2015-08-10 22:31:17 -04:00
bors
8b3705528a Auto merge of #27416 - alexcrichton:fix-dll-export, r=brson
These two commits are aimed at "fixing" our usage of `dllexport` in the compiler. Currently we blanket apply this attribute to *everything* public in a crate, but this ends up with a few downsides:

* Executables are larger than the should be as a result of thinking they should export everything
* Native libraries aren't handled correctly because technically a statically included native library should be exported from a DLL in some cases.
* Symbols don't actually need to be exported if they never end up in a DLL.

The first commit adds a new unstable attribute, `#[linked_from]`, which is a way to tell the compiler what native library a block of symbols comes from. This is used to inform the compiler what set of native libraries are statically included in the rlib (or other output). This information is later used to export them from a DLL if necessary. Currently this is only used in a few places (such as the LLVM bindings) to get the compiler to link correctly.

The second commit stops adding `dllexport` to all items in LLVM and instead explicitly telling the linker what symbols should be exported. We only need to do this when building a dynamic library, and otherwise we can avoid adding `dllexport` or telling the linker about exported symbols.

As a testament to this change, the size of "Hello World" on MSVC drops from 1.2MB to 67KB as a result of this patch. This is because the linker can much more aggressively remove unused code.

These commits do not yet attempt to fix our story with `dllimport`, and I'll leave that to a future PR and issue, for now though I'm going to say that this

Closes #7196
2015-08-11 02:10:31 +00:00
Alex Crichton
e648c96c5f trans: Stop informing LLVM about dllexport
Rust's current compilation model makes it impossible on Windows to generate one
object file with a complete and final set of dllexport annotations. This is
because when an object is generated the compiler doesn't actually know if it
will later be included in a dynamic library or not. The compiler works around
this today by flagging *everything* as dllexport, but this has the drawback of
exposing too much.

Thankfully there are alternate methods of specifying the exported surface area
of a dll on Windows, one of which is passing a `*.def` file to the linker which
lists all public symbols of the dynamic library. This commit removes all
locations that add `dllexport` to LLVM variables and instead dynamically
generates a `*.def` file which is passed to the linker. This file will include
all the public symbols of the current object file as well as all upstream
libraries, and the crucial aspect is that it's only used when generating a
dynamic library. When generating an executable this file isn't generated, so all
the symbols aren't exported from an executable.

To ensure that statically included native libraries are reexported correctly,
the previously added support for the `#[linked_from]` attribute is used to
determine the set of FFI symbols that are exported from a dynamic library, and
this is required to get the compiler to link correctly.
2015-08-10 18:20:42 -07:00
Alex Crichton
18607149fb syntax: Add a new unstable #[linked_from] attribute
To correctly reexport statically included libraries from a DLL on Windows, the
compiler will soon need to have knowledge about what symbols are statically
included and which are not. To solve this problem a new unstable
`#[linked_from]` attribute is being added and recognized on `extern` blocks to
indicate which native library the symbols are coming from.

The compiler then keeps track of what the set of FFI symbols are that are
included statically. This information will be used in a future commit to
configure how we invoke the linker on Windows.
2015-08-10 18:20:00 -07:00
Alex Crichton
138252cc6a trans: Specify archive_format for MSVC
This means that we no longer need to ship the `llvm-ar.exe` binary in the MSVC
distribution, and after a snapshot we can remove a good bit of logic from the
makefiles!
2015-08-10 17:45:16 -07:00
Steven Fackler
e29a62f140 Add back and deprecate old methods. 2015-08-10 20:04:22 -04:00
Steven Fackler
999bdeca88 Stabilize the Duration API
This commit stabilizes the `std::time` module and the `Duration` type.
`Duration::span` remains unstable, and the `Display` implementation for
`Duration` has been removed as it is still being reworked and all trait
implementations for stable types are de facto stable.

This is a [breaking-change] to those using `Duration`'s `Display`
implementation.
2015-08-10 20:04:18 -04:00
Felix S. Klock II
af32c015aa placate the pretty tests by ignoring my test. 2015-08-10 20:04:17 -04:00
Felix S. Klock II
fc54934d88 Regression test for dropflag reinit issue.
Fix #27401.
2015-08-10 20:04:17 -04:00