Commit Graph

42010 Commits

Author SHA1 Message Date
Felix S. Klock II
2e23d8196e tests for lint that warns about mixing #[repr(C)] with Drop.
THis includes tests for struct and enum. (I suspect the closure case
is actually unreachable, but i see no harm in including it.)
2015-04-29 23:05:21 +02:00
Felix S. Klock II
78130a4690 lint for mixing #[repr(C)] with an impl of Drop. 2015-04-29 23:05:09 +02:00
tynopex
cf053d72a0 std: Fixup docs for std::process 2015-04-29 17:00:10 -04:00
Nick Hamann
42196ae7bf Improve libstd/net/udp.rs documentation.
This adds some missing punctuation, adds a missing word, and
corrects a bug in the description of `send_to`, which actually
returns the number of bytes written on success.

Fixes #24925.
2015-04-29 15:59:28 -05:00
Tamir Duberstein
9f36ec0d42 Use PIE on Android
This is OK to do given:
  - PIE is supported on Android starting with API 16.
  - The bots are running API 18.
  - API < 16 now has a 12.5% market share[0] as of 2015-04-29.

Unfortunately, this breaks backtrace support. See #17520.

Closes #17437.

[0] https://developer.android.com/about/dashboards/index.html
2015-04-29 13:50:26 -07:00
Peter Marheine
94c9bdeef6 Update SNAPs to latest snapshot. 2015-04-29 13:11:31 -06:00
Tamir Duberstein
7e2b09351d DRY Android targets 2015-04-29 11:15:27 -07:00
Felix S. Klock II
db3a58ae29 Add -g that I should have included in PR #24932.
Note it is safe, with respect to autobuilds, to land before #24945.

(In other words, landing this sooner won't break things for anyone any
worse than they were already broken, since there are *other* tests
that also add `-g` to their flags via `compile-flags: -g`.)
2015-04-29 18:58:42 +02:00
Felix S. Klock II
df82df8cf8 Unit test ensuring we accept repeated -g and -O. 2015-04-29 18:56:16 +02:00
Felix S. Klock II
2007169583 Allow -g and -O options to be specified multiple times at command line. 2015-04-29 18:56:10 +02:00
Tamir Duberstein
8c58fe1739 Fallout 2015-04-29 08:55:31 -07:00
Tamir Duberstein
9504d8cdae bitflags! uses associated constants 2015-04-29 08:55:30 -07:00
Tamir Duberstein
0c0d138739 bitflags! is no longer used in std 2015-04-29 08:55:30 -07:00
Felix S. Klock II
bd4b984537 add --enable-debuginfo-tests, analogous to --disable-optimize-tests.
Then, decouple the question of whether the compiler/stdlib carry
debuginfo (which is controlled via `--enable-debuginfo` and implied by
`--enable-debug`) from the question of whether the tests carry
debuginfo (which now no longer is implied by `--enable-debug` nor
`--enable-debuginfo`, and is off by default).
2015-04-29 17:18:44 +02:00
Alex Crichton
c1149edf7a std: Fix inheriting standard handles on windows
Currently if a standard I/O handle is set to inherited on Windows, no action is
taken and the slot in the process information description is set to
`INVALID_HANDLE_VALUE`. Due to our passing of `STARTF_USESTDHANDLES`, however,
this means that the handle is actually set to nothing and if a child tries to
print it will generate an error.

This commit fixes this behavior by explicitly creating stdio handles to be
placed in these slots by duplicating the current process's I/O handles. This is
presumably what previously happened silently by using a file-descriptor-based
implementation instead of a `HANDLE`-centric implementation.

Along the way this cleans up a lot of code in `Process::spawn` for Windows by
ensuring destructors are always run, using more RAII, and limiting the scope of
`unsafe` wherever possible.
2015-04-29 08:01:16 -07:00
Björn Steinbrink
36dccec2f3 Currently, LLVM lowers a cttz8 on x86_64 to these instructions:
```asm
    movzbl      %dil, %eax
    bsfl        %eax, %eax
    movl        $32, %ecx
    cmovnel     %eax, %ecx
    cmpl        $32, %ecx
    movl        $8, %eax
    cmovnel     %ecx, %eax
```

which has some unnecessary overhead, having two conditional moves.

To improve the codegen, we can zero extend the 8 bit integer, then set
bit 8 and perform a cttz operation on the extended value. That way
there's no conditional operation involved at all.
2015-04-29 14:45:23 +02:00
bors
551a74dddd Auto merge of #24932 - pnkfelix:fix-issue-24687, r=huonw
metdata: Fix zero-normalization of the pos of a `MultiByteChar`

Fix #24687

The source byte/character mappings for every crate track the collection of multi-characters from its source files specially.  When we import the source information for another file into the current compilation unit, we assign its byte-positions unique values by shifting them all by a fixed adjustment, tracked in the `start_pos` field.  But when we pull out the source span information for one function from one crate and into our own crate, we need to re-normalize the byte positions: subtracting the old `start_pos` and adding the new `start_pos`. The `new_imported_filemap(..)` method handles adding the new `start_pos`, so all `creader` needs to do is re-normalize each `pos` to zero.

It seems like it was indeed trying to do this, but it mistakenly added the old `start_pos` instead of subtracting it.
2015-04-29 10:40:03 +00:00
Oliver Schneider
d6043d1e71 fix broken link
compiler plugins are hosted unter "compiler-plugins.html" not "plugins.html"
2015-04-29 11:41:00 +02:00
Felix S. Klock II
2ae82fcd95 Regression test for issue 24687.
use visible characters for the multibyte character filler.
2015-04-29 10:53:09 +02:00
jooert
f99658d7c7 Adapt benchmark tests to unit test guidelines
Since #24783, the style guidelines recommend that unit tests should live in a submodule `tests` rather than `test` to not clash with the possible use of libtest. This is especially important for benchmark tests as they require libtest. Fixes #24923.
2015-04-29 10:36:43 +02:00
Felix S. Klock II
ecd3572f49 Fix zero-normalization of the pos of a MultiByteChar.
Fix #24687
2015-04-29 10:21:29 +02:00
bors
26c7635ccf Auto merge of #24893 - robinst:issue-24407-E0013, r=nrc
Part of #24407.
2015-04-29 07:37:58 +00:00
Nick Cameron
de2a4c0113 save-analysis: fix impl functions 2015-04-29 19:21:18 +12:00
Nick Cameron
7bfb5ed826 Reviewer changes 2015-04-29 18:56:13 +12:00
Nick Cameron
bb26aadaf3 Tidy up 2015-04-29 17:26:22 +12:00
Nick Cameron
88f840bdea debuginfo: extract adt.rs 2015-04-29 17:26:22 +12:00
Nick Cameron
9756349d11 debuginfo: extract metadata.rs 2015-04-29 17:26:22 +12:00
Nick Cameron
024e86fad5 debuginfo: extract types.rs 2015-04-29 17:26:22 +12:00
Nick Cameron
488694cf0d debuginfo: extract namespace.rs 2015-04-29 17:26:22 +12:00
Nick Cameron
5b53de1775 debuginfo: extract create.rs 2015-04-29 17:26:22 +12:00
Nick Cameron
a015547894 debuginfo: extract utils.rs 2015-04-29 17:26:22 +12:00
Nick Cameron
5753c8d6ca debuginfo: extract gdb.rs 2015-04-29 17:23:36 +12:00
Nick Cameron
5993ae86b8 debuginfo: pull out docs 2015-04-29 17:23:36 +12:00
Nick Cameron
39e2e649cb Tidy up word-wrapping in debuginfo 2015-04-29 17:23:36 +12:00
Nick Cameron
3f025fe7b2 Move debuginfo.rs to its own directory 2015-04-29 17:23:36 +12:00
Tamir Duberstein
f7947bc936 Unstub some tests 2015-04-28 21:23:28 -07:00
Tamir Duberstein
8073af7399 Tests need not be public 2015-04-28 21:22:58 -07:00
Tamir Duberstein
cd5abe7635 Remove unused variable 2015-04-28 21:22:06 -07:00
bors
d4cedea80a Auto merge of #24681 - tamird:unignore-android, r=alexcrichton
There are still quite a few ignored Android tests kicking around, most of which were added in 445faca844, which has a pretty unfortunate commit message.

r? @alexcrichton
2015-04-29 04:09:45 +00:00
Corey Farwell
960f8006d2 Fix punctuation placement in doc-comment 2015-04-28 23:06:00 -04:00
bors
c48b499ea3 Auto merge of #24888 - tamird:snapshot, r=alexcrichton
r? @alexcrichton cc @brson
2015-04-29 02:16:01 +00:00
Carol Nichols
0ddee94cfe Move explanation that references lexical grammar to the grammar
Reword so that the references to things above/below are up to date and a
bit more specific.
2015-04-28 22:02:53 -04:00
Carol (Nichols || Goulding)
3e521bfd96 Add boolean literal to the grammar
To make this rule match the definition of Lit_ in
https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs
2015-04-28 21:46:49 -04:00
Nicholas Mazzuca
83814325b4 Add intrinsics for unchecked division and modulo
The "unchecked_" div and rem functions will give UB in case of rhs == 0, or,
in the signed versions, lhs == INT::min and rhs == -1
2015-04-28 18:20:30 -07:00
Tamir Duberstein
bd5afb406d Reference the correct issue 2015-04-28 17:52:38 -07:00
Tamir Duberstein
c6364abbc1 #10356: Warnings 2015-04-28 17:52:37 -07:00
Tamir Duberstein
54de911f35 #10381: Warnings 2015-04-28 17:51:43 -07:00
Tamir Duberstein
9768447b64 Reference the correct issue and clarify failure 2015-04-28 17:51:01 -07:00
Tamir Duberstein
41ff911ae8 #10393 & #13206: Warnings 2015-04-28 17:49:22 -07:00
Alex Crichton
0368abb0a4 std: Implement fs::DirBuilder
This is the last remaining portion of #24796
2015-04-28 17:38:26 -07:00