]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #27850 - alexcrichton:fix-musl, r=brson
bors [Tue, 18 Aug 2015 23:20:52 +0000 (23:20 +0000)]
Auto merge of #27850 - alexcrichton:fix-musl, r=brson

Some new allocator tests require dynamic libraries to run the full test, but
dylibs aren't currently working on MUSL.

8 years agoAuto merge of #27836 - alexcrichton:rename-cstring-raw, r=bluss
bors [Tue, 18 Aug 2015 21:47:06 +0000 (21:47 +0000)]
Auto merge of #27836 - alexcrichton:rename-cstring-raw, r=bluss

This commit renames the `CString::{into_ptr, from_ptr}` methods to `into_raw`
and `from_raw` to mirror the corresponding methods on `Box` and the naming of
"raw" for `from_raw_parts` on slices and vectors.

cc #27769

8 years agoAuto merge of #27891 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 18 Aug 2015 20:13:44 +0000 (20:13 +0000)]
Auto merge of #27891 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27881, #27882, #27883, #27884, #27888
- Failed merges:

8 years agoRollup merge of #27888 - steveklabnik:gh27686, r=alexcrichton
Steve Klabnik [Tue, 18 Aug 2015 19:03:11 +0000 (15:03 -0400)]
Rollup merge of #27888 - steveklabnik:gh27686, r=alexcrichton

Fixes #27686

8 years agoRollup merge of #27884 - steveklabnik:gh27632, r=alexcrichton
Steve Klabnik [Tue, 18 Aug 2015 19:03:11 +0000 (15:03 -0400)]
Rollup merge of #27884 - steveklabnik:gh27632, r=alexcrichton

Fixes #27632

8 years agoRollup merge of #27883 - steveklabnik:gh27587, r=alexcrichton
Steve Klabnik [Tue, 18 Aug 2015 19:03:11 +0000 (15:03 -0400)]
Rollup merge of #27883 - steveklabnik:gh27587, r=alexcrichton

Fixes #27587

8 years agoRollup merge of #27882 - steveklabnik:gh27428, r=alexcrichton
Steve Klabnik [Tue, 18 Aug 2015 19:03:11 +0000 (15:03 -0400)]
Rollup merge of #27882 - steveklabnik:gh27428, r=alexcrichton

This is where panic!() is introduced.

8 years agoRollup merge of #27881 - jotomicron:patch-1, r=steveklabnik
Steve Klabnik [Tue, 18 Aug 2015 19:03:10 +0000 (15:03 -0400)]
Rollup merge of #27881 - jotomicron:patch-1, r=steveklabnik

Added the cost of the edge 3 -> 4 on the example in the module documentation

8 years agoAuto merge of #27624 - apasel422:issue-27620, r=Gankro
bors [Tue, 18 Aug 2015 18:41:17 +0000 (18:41 +0000)]
Auto merge of #27624 - apasel422:issue-27620, r=Gankro

Closes #27620.

8 years agoadd cfg(target_env) to the reference
Steve Klabnik [Tue, 18 Aug 2015 17:45:01 +0000 (13:45 -0400)]
add cfg(target_env) to the reference

Fixes #27587

8 years agoAdd note about backtraces to TRPL
Steve Klabnik [Tue, 18 Aug 2015 17:42:34 +0000 (13:42 -0400)]
Add note about backtraces to TRPL

This is where panic!() is introduced.

Fixes #27428

8 years agoMake distinction between -l and --extern more clear
Steve Klabnik [Tue, 18 Aug 2015 17:59:18 +0000 (13:59 -0400)]
Make distinction between -l and --extern more clear

Fixes #27686

8 years agoAdd notes about building documentation to the README.
Steve Klabnik [Tue, 18 Aug 2015 17:49:20 +0000 (13:49 -0400)]
Add notes about building documentation to the README.

Fixes #27632

8 years agoAuto merge of #27536 - steveklabnik:doc_object_safety, r=alexcrichton
bors [Tue, 18 Aug 2015 16:28:13 +0000 (16:28 +0000)]
Auto merge of #27536 - steveklabnik:doc_object_safety, r=alexcrichton

Fixes #26938

8 years agostd: Rename `cstr_memory` feature to use "raw"
Alex Crichton [Fri, 14 Aug 2015 17:29:47 +0000 (10:29 -0700)]
std: Rename `cstr_memory` feature to use "raw"

This commit renames the `CString::{into_ptr, from_ptr}` methods to `into_raw`
and `from_raw` to mirror the corresponding methods on `Box` and the naming of
"raw" for `from_raw_parts` on slices and vectors.

cc #27769

8 years agoAdd object safety to TRPL
Steve Klabnik [Wed, 5 Aug 2015 16:58:49 +0000 (12:58 -0400)]
Add object safety to TRPL

Fixes #26938

8 years agoFixed example in documentation
jotomicron [Tue, 18 Aug 2015 14:58:05 +0000 (15:58 +0100)]
Fixed example in documentation

Added the cost of the edge 3 -> 4 on the example in the module documentation

8 years agoAuto merge of #27880 - remram44:doc-seek-repetitions, r=steveklabnik
bors [Tue, 18 Aug 2015 14:08:24 +0000 (14:08 +0000)]
Auto merge of #27880 - remram44:doc-seek-repetitions, r=steveklabnik

"Don't seek past end of stream" is mentioned twice in a row. This happened because seeking before offset 0 was previously mentioned there, and was moved to the "errors" section afterwards.

Somehow made it through [#26924](https://github.com/rust-lang/rust/pull/26924/files#diff-668f8f358d4a93474b396dcb3727399eR825).

8 years agoRemove repetition in Seek::seek() doc
Remi Rampin [Tue, 18 Aug 2015 14:01:41 +0000 (10:01 -0400)]
Remove repetition in Seek::seek() doc

8 years agoAuto merge of #27870 - durka:patch-5, r=steveklabnik
bors [Tue, 18 Aug 2015 10:26:35 +0000 (10:26 +0000)]
Auto merge of #27870 - durka:patch-5, r=steveklabnik

I just took out the sentences that were lies. I'm not sure if they need to be replaced.

r? steveklabnik

8 years agoAuto merge of #27869 - alexcrichton:libtest-panic, r=brson
bors [Tue, 18 Aug 2015 08:51:02 +0000 (08:51 +0000)]
Auto merge of #27869 - alexcrichton:libtest-panic, r=brson

This commit removes the call to `panic!("Some tests failed")` at the end of all
tests run when running with libtest. The panic is replaced with
`std::process::exit` to have a nonzero error code, but this change both:

1. Makes the test runner no longer print out the extraneous panic message at the
   end of a failing test run that some tests failed. (this is already summarized
   in the output of the test run).
2. When running tests with `RUST_BACKTRACE` set it removes an extraneous
   backtrace from the output (only failing tests will have their backtraces in
   the output.

8 years agoAuto merge of #27866 - arielb1:really-fast-reject, r=nikomatsakis
bors [Tue, 18 Aug 2015 07:16:10 +0000 (07:16 +0000)]
Auto merge of #27866 - arielb1:really-fast-reject, r=nikomatsakis

also, use the right caching logic for type_moves_by_default (this was
broken by @jroesch).

```
before:
593.10user 5.21system 7:51.41elapsed 126%CPU (0avgtext+0avgdata 1150016maxresident)k

after:
567.03user 4.00system 7:28.23elapsed 127%CPU (0avgtext+0avgdata 1133112maxresident)k
```

A nice 4.5% improvement. For reference, on the last run LLVM takes 429.267s, which is 75% - hopefully this can be reduced.

I think the regression since #27751 is because of the wf patch - need to investigate it through.

r? @nikomatsakis

8 years agoAuto merge of #27823 - eefriedman:float-dep-core, r=alexcrichton
bors [Tue, 18 Aug 2015 04:23:25 +0000 (04:23 +0000)]
Auto merge of #27823 - eefriedman:float-dep-core, r=alexcrichton

There wasn't any particular reason the functions needed to be there
anyway, so just get rid of them, and adjust libstd to compensate.

With this change, libcore depends on exactly two floating-point functions:
fmod and fmodf.  They are implicitly referenced because they are used to
implement "%".

Dependencies of libcore on Linux x86-x64 with this patch:
```
0000000000000000         *UND* 0000000000000000 __powidf2
0000000000000000         *UND* 0000000000000000 __powisf2
0000000000000000         *UND* 0000000000000000 fmod
0000000000000000         *UND* 0000000000000000 fmodf
0000000000000000         *UND* 0000000000000000 memcmp
0000000000000000         *UND* 0000000000000000 memcpy
0000000000000000         *UND* 0000000000000000 memset
0000000000000000         *UND* 0000000000000000 rust_begin_unwind
0000000000000000         *UND* 0000000000000000 rust_eh_personality
```

8 years agoAuto merge of #27474 - bluss:twoway-reverse, r=brson
bors [Tue, 18 Aug 2015 02:02:57 +0000 (02:02 +0000)]
Auto merge of #27474 - bluss:twoway-reverse, r=brson

StrSearcher: Implement the complete reverse case for the two way algorithm

Fix quadratic behavior in StrSearcher in reverse search with periodic
needles.

This commit adds the missing pieces for the "short period" case in
reverse search. The short case will show up when the needle is literally
periodic, for example "abababab".

Two way uses a "critical factorization" of the needle: x = u v.

Searching matches v first, if mismatch at character k, skip k forward.
Matching u, if mismatch, skip period(x) forward.

To avoid O(mn) behavior after mismatch in u, memorize the already
matched prefix.

The short period case requires that |u| < period(x).

For the reverse search we need to compute a different critical
factorization x = u' v' where |v'| < period(x), because we are searching
for the reversed needle. A short v' also benefits the algorithm in
general.

The reverse critical factorization is computed quickly by using the same
maximal suffix algorithm, but terminating as soon as we have a location
with local period equal to period(x).

This adds extra fields crit_pos_back and memory_back for the reverse
case. The new overhead for TwoWaySearcher::new is low, and additionally
I think the "short period" case is uncommon in many applications of
string search.

The maximal_suffix methods were updated in documentation and the
algorithms updated to not use !0 and wrapping add, variable left is now
1 larger, offset 1 smaller.

Use periodicity when computing byteset: in the periodic case, just
iterate over one period instead of the whole needle.

Example before (rfind) after (twoway_rfind) benchmark shows the removal
of quadratic behavior.

needle: "ab" * 100, haystack: ("bb" + "ab" * 100) * 100

```
test periodic::rfind           ... bench:   1,926,595 ns/iter (+/- 11,390) = 10 MB/s
test periodic::twoway_rfind    ... bench:      51,740 ns/iter (+/- 66) = 386 MB/s
```

8 years agoAuto merge of #27169 - huonw:simd, r=alexcrichton
bors [Mon, 17 Aug 2015 23:41:36 +0000 (23:41 +0000)]
Auto merge of #27169 - huonw:simd, r=alexcrichton

This implements https://github.com/rust-lang/rfcs/pull/1199 (except for doing all the platform intrinsics).

Things remaining for SIMD (not necessarily in this PR):

- [x] I (@huonw) am signed up to ensure the compiler matches the RFC, when it lands
- [x] the platform specific intrinsics aren't properly type checked at the moment (LLVM will throw a "random" assertion)
- [ ] there's a lot of useful intrinsics that are missing, including whole platforms (mips, powerpc)
- [ ] the target-feature `cfg` detection/adding is not so great at the moment
- [x] I think the platform specific intrinsics should go in their own `extern` ABI (i.e. not `"rust-intrinsic"`)

(I'm adjusting the RFC to reflect the latter.)

I think it would be very nice for this to land without requiring the RFC to land first, because of the first point, and because this is the only way for any further work to happen/be experimented with, without requiring people to build/install/multirust a compiler from a custom branch.

r? @alexcrichton

8 years agoAdd AArch64 vrecpeq_... intrinsic (necessary for minimal API).
Huon Wilson [Sat, 15 Aug 2015 04:25:52 +0000 (21:25 -0700)]
Add AArch64 vrecpeq_... intrinsic (necessary for minimal API).

8 years agoClean up simd_cast translation.
Huon Wilson [Fri, 14 Aug 2015 22:46:51 +0000 (15:46 -0700)]
Clean up simd_cast translation.

8 years agoRevamp SIMD intrinsic trans error handling.
Huon Wilson [Fri, 14 Aug 2015 22:20:22 +0000 (15:20 -0700)]
Revamp SIMD intrinsic trans error handling.

Factor out common pieces, follow `expected ..., found ...` convention
everywhere.

8 years agosimd_shuffleNNN returns its type parameter directly.
Huon Wilson [Fri, 14 Aug 2015 20:45:42 +0000 (13:45 -0700)]
simd_shuffleNNN returns its type parameter directly.

I.e. the signature now must be

    fn simd_shuffleNNN<T, U>(x: T, y: T, idx: [u32; NNN]) -> U;

(modulo names.)

8 years agoShim some of the old std::simd functionality.
Huon Wilson [Fri, 14 Aug 2015 19:06:10 +0000 (12:06 -0700)]
Shim some of the old std::simd functionality.

Overload the operators using the traits so that things mostly keep
working during the deprecation period.

8 years agoRebase cleanup: is_simd lost its parameter.
Huon Wilson [Fri, 14 Aug 2015 04:34:20 +0000 (21:34 -0700)]
Rebase cleanup: is_simd lost its parameter.

8 years agoCode style tweaks.
Huon Wilson [Thu, 13 Aug 2015 23:00:44 +0000 (16:00 -0700)]
Code style tweaks.

8 years agoAdd tests for various intrinsic behaviours.
Huon Wilson [Thu, 13 Aug 2015 04:12:36 +0000 (21:12 -0700)]
Add tests for various intrinsic behaviours.

8 years agoTweak intrinsic error handling.
Huon Wilson [Thu, 13 Aug 2015 04:11:50 +0000 (21:11 -0700)]
Tweak intrinsic error handling.

Better error messages, US spelling, more real checks.

8 years agoFix existing tests for new `#[repr(simd)]`.
Huon Wilson [Wed, 12 Aug 2015 23:09:02 +0000 (16:09 -0700)]
Fix existing tests for new `#[repr(simd)]`.

8 years agoAllow generic repr(simd) types.
Huon Wilson [Wed, 12 Aug 2015 22:37:21 +0000 (15:37 -0700)]
Allow generic repr(simd) types.

Absolute correctness is checked at monomorphisation time.

8 years agoSwitch shuffle intrinsics to arrays of indices.
Huon Wilson [Wed, 12 Aug 2015 18:25:37 +0000 (11:25 -0700)]
Switch shuffle intrinsics to arrays of indices.

Format:

    fn shuffle_simdNNN<T, U>(x: T, y: T, idx: [u32; NNN]) -> U;

8 years agoAdd most ARM intrinsics.
Huon Wilson [Wed, 12 Aug 2015 00:44:18 +0000 (17:44 -0700)]
Add most ARM intrinsics.

8 years agoReorganise ARM intrinsic definitions.
Huon Wilson [Tue, 11 Aug 2015 16:55:16 +0000 (09:55 -0700)]
Reorganise ARM intrinsic definitions.

8 years agoAdd most AVX2 intrinsics.
Huon Wilson [Tue, 11 Aug 2015 01:30:33 +0000 (18:30 -0700)]
Add most AVX2 intrinsics.

8 years agoAdd most AVX intrinsics.
Huon Wilson [Tue, 11 Aug 2015 01:09:07 +0000 (18:09 -0700)]
Add most AVX intrinsics.

8 years agoRearrange x86 intrinsics to prepare for AVX.
Huon Wilson [Tue, 11 Aug 2015 00:50:31 +0000 (17:50 -0700)]
Rearrange x86 intrinsics to prepare for AVX.

8 years agoAdd most SSE4.1 intrinsics.
Huon Wilson [Tue, 11 Aug 2015 00:46:02 +0000 (17:46 -0700)]
Add most SSE4.1 intrinsics.

8 years agoAdd most SSSE3 intrinsics.
Huon Wilson [Tue, 11 Aug 2015 00:33:06 +0000 (17:33 -0700)]
Add most SSSE3 intrinsics.

8 years agoAdd most SSE3 intrinsics.
Huon Wilson [Tue, 11 Aug 2015 00:24:15 +0000 (17:24 -0700)]
Add most SSE3 intrinsics.

8 years agoReorganise x86 intrinsic definitions.
Huon Wilson [Tue, 11 Aug 2015 00:20:32 +0000 (17:20 -0700)]
Reorganise x86 intrinsic definitions.

- factor out redundant mm prefix
- group methods by instruction set

8 years agoAdd most SSE2 intrinsics.
Huon Wilson [Tue, 11 Aug 2015 00:15:34 +0000 (17:15 -0700)]
Add most SSE2 intrinsics.

8 years agoGeneralise SIMD casting to unequal bitwidths.
Huon Wilson [Mon, 10 Aug 2015 23:34:25 +0000 (16:34 -0700)]
Generalise SIMD casting to unequal bitwidths.

8 years agoAdd _mm_shuffle_epi8 intrinsic.
Huon Wilson [Mon, 10 Aug 2015 23:32:30 +0000 (16:32 -0700)]
Add _mm_shuffle_epi8 intrinsic.

8 years agoRename `simd_basics` feature gate to `repr_simd`.
Huon Wilson [Thu, 6 Aug 2015 23:03:41 +0000 (16:03 -0700)]
Rename `simd_basics` feature gate to `repr_simd`.

8 years agoUse error codes for platform-intrinsic typeck errors.
Huon Wilson [Thu, 6 Aug 2015 21:52:40 +0000 (14:52 -0700)]
Use error codes for platform-intrinsic typeck errors.

8 years agoCreate separate module for intrinsic typechecking.
Huon Wilson [Thu, 6 Aug 2015 18:29:26 +0000 (11:29 -0700)]
Create separate module for intrinsic typechecking.

8 years agoCreate "platform-intrinsic" ABI for SIMD/platform intrinsics.
Huon Wilson [Thu, 6 Aug 2015 18:11:26 +0000 (11:11 -0700)]
Create "platform-intrinsic" ABI for SIMD/platform intrinsics.

This is purposely separate to the "rust-intrinsic" ABI, because these
intrinsics are theoretically going to become stable, and should be fine
to be independent of the compiler/language internals since they're
intimately to the platform.

8 years agoType check platform-intrinsics in typeck.
Huon Wilson [Wed, 5 Aug 2015 16:08:03 +0000 (09:08 -0700)]
Type check platform-intrinsics in typeck.

8 years agoRemove automatic built-in SIMD operators.
Huon Wilson [Tue, 4 Aug 2015 00:24:12 +0000 (17:24 -0700)]
Remove automatic built-in SIMD operators.

These should now go via the intrinsics, and implement the standard traits.

8 years agoAdd intrinsics for SIMD arithmetic.
Huon Wilson [Fri, 31 Jul 2015 18:23:12 +0000 (11:23 -0700)]
Add intrinsics for SIMD arithmetic.

8 years agoAdd simd_cast intrinsic.
Huon Wilson [Wed, 29 Jul 2015 23:40:22 +0000 (16:40 -0700)]
Add simd_cast intrinsic.

8 years agoAdd x86 & arm reciprocal approximation intrinsics.
Huon Wilson [Wed, 29 Jul 2015 23:39:21 +0000 (16:39 -0700)]
Add x86 & arm reciprocal approximation intrinsics.

8 years agoImplement the simd_insert/simd_extract intrinsics.
Huon Wilson [Mon, 20 Jul 2015 18:55:47 +0000 (11:55 -0700)]
Implement the simd_insert/simd_extract intrinsics.

8 years agoAdd rustc_platform_intrinsics & some arm/x86 intrs.
Huon Wilson [Thu, 16 Jul 2015 23:46:36 +0000 (16:46 -0700)]
Add rustc_platform_intrinsics & some arm/x86 intrs.

These are enough to implement a cross-platform SIMD single-precision
mandelbrot renderer.

8 years agoAdd comparison and shuffle SIMD intrinsics.
Huon Wilson [Thu, 16 Jul 2015 18:59:23 +0000 (11:59 -0700)]
Add comparison and shuffle SIMD intrinsics.

- simd_eq, simd_ne, simd_lt, simd_le, simd_gt, simd_ge
- simd_shuffleNNN

8 years agoAdd some SIMD target_feature cfg's when appropriate.
Huon Wilson [Tue, 14 Jul 2015 22:49:03 +0000 (15:49 -0700)]
Add some SIMD target_feature cfg's when appropriate.

NB. this may not be 100% perfect.

8 years agofeature gate `cfg(target_feature)`.
Huon Wilson [Tue, 14 Jul 2015 00:10:44 +0000 (17:10 -0700)]
feature gate `cfg(target_feature)`.

This is theoretically a breaking change, but GitHub search turns up no
uses of it, and most non-built-in cfg's are passed via cargo features,
which look like `feature = "..."`, and hence can't overlap.

8 years agoswitch core::simd to repr(simd) and deprecate it.
Huon Wilson [Mon, 13 Jul 2015 18:57:46 +0000 (11:57 -0700)]
switch core::simd to repr(simd) and deprecate it.

This functionality will be available out of tree in the `simd` crate on
crates.io.

[breaking-change]

8 years agodon't iterate over all impls when none match
Ariel Ben-Yehuda [Mon, 17 Aug 2015 21:17:02 +0000 (00:17 +0300)]
don't iterate over all impls when none match

before:
573.01user 4.04system 7:33.86elapsed 127%CPU (0avgtext+0avgdata 1141656maxresident)k
after:
567.03user 4.00system 7:28.23elapsed 127%CPU (0avgtext+0avgdata 1133112maxresident)k

an additional 1% improvement

8 years agoadd a fast-path to resolve_type_vars_if_possible
Ariel Ben-Yehuda [Mon, 17 Aug 2015 20:50:24 +0000 (23:50 +0300)]
add a fast-path to resolve_type_vars_if_possible

this avoids needless substituting

before:
577.76user 4.27system 7:36.13elapsed 127%CPU (0avgtext+0avgdata 1141608maxresident)k

after:
573.01user 4.04system 7:33.86elapsed 127%CPU (0avgtext+0avgdata 1141656maxresident)k

8 years agoAuto merge of #27833 - arielb1:robust-construction, r=eddyb
bors [Mon, 17 Aug 2015 21:02:47 +0000 (21:02 +0000)]
Auto merge of #27833 - arielb1:robust-construction, r=eddyb

Fixes #27815

r? @eddyb

8 years agoremove untrue doc from marker.rs
Alex Burka [Mon, 17 Aug 2015 20:37:48 +0000 (16:37 -0400)]
remove untrue doc from marker.rs

I just took out the sentences that were lies. I'm not sure if they need to be replaced.

8 years agotest: Don't panic if some tests failed
Alex Crichton [Mon, 17 Aug 2015 19:58:19 +0000 (12:58 -0700)]
test: Don't panic if some tests failed

This commit removes the call to `panic!("Some tests failed")` at the end of all
tests run when running with libtest. The panic is replaced with
`std::process::exit` to have a nonzero error code, but this change both:

1. Makes the test runner no longer print out the extraneous panic message at the
   end of a failing test run that some tests failed. (this is already summarized
   in the output of the test run).
2. When running tests with `RUST_BACKTRACE` set it removes an extraneous
   backtrace from the output (only failing tests will have their backtraces in
   the output.

8 years agouse an FnvHashSet instead of an HashSet in fulfill
Ariel Ben-Yehuda [Mon, 17 Aug 2015 18:17:16 +0000 (21:17 +0300)]
use an FnvHashSet instead of an HashSet in fulfill

this doesn't cause a measurable perf increase, but it makes callgrind output
cleaner. Anyway, rustc should be using FNV everywhere.

8 years agomake trait matching smarter with projections
Ariel Ben-Yehuda [Mon, 17 Aug 2015 17:26:22 +0000 (20:26 +0300)]
make trait matching smarter with projections

also, use the right caching logic for type_moves_by_default (this was
broken by @jroesch).

before:
593.10user 5.21system 7:51.41elapsed 126%CPU (0avgtext+0avgdata 1150016maxresident)k
llvm: 427.045

after:
577.76user 4.27system 7:36.13elapsed 127%CPU (0avgtext+0avgdata 1141608maxresident)k
llvm: 431.001

8 years agoRemove dependencies on libm functions from libcore.
Eli Friedman [Sun, 16 Aug 2015 07:42:53 +0000 (00:42 -0700)]
Remove dependencies on libm functions from libcore.

There wasn't any particular reason the functions needed to be there
anyway, so just get rid of them, and adjust libstd to compensate.

With this change, libcore depends on exactly two floating-point functions:
fmod and fmodf.  They are implicitly referenced because they are
used to implement "%".

8 years agoImplement `repr(simd)` as an alias for `#[simd]`.
Huon Wilson [Mon, 13 Jul 2015 18:35:00 +0000 (11:35 -0700)]
Implement `repr(simd)` as an alias for `#[simd]`.

8 years agoAuto merge of #27864 - frewsxcv:regression-test, r=alexcrichton
bors [Mon, 17 Aug 2015 16:29:31 +0000 (16:29 +0000)]
Auto merge of #27864 - frewsxcv:regression-test, r=alexcrichton

Closes #23304

8 years agouse the correct substs when checking struct patterns
Ariel Ben-Yehuda [Sat, 15 Aug 2015 22:20:36 +0000 (01:20 +0300)]
use the correct substs when checking struct patterns

also, make sure this is tested.

8 years agoAdd regression tests for #23304
Corey Farwell [Mon, 17 Aug 2015 13:36:03 +0000 (09:36 -0400)]
Add regression tests for #23304

Closes #23304

8 years agoStrSearcher: Additional comments and small code moves
Ulrik Sverdrup [Sun, 16 Aug 2015 20:37:18 +0000 (22:37 +0200)]
StrSearcher: Additional comments and small code moves

Break out a separate static method to create the "byteset".

8 years agoAuto merge of #27858 - rkruppe:rustdoc-codespans, r=alexcrichton
bors [Sun, 16 Aug 2015 17:17:43 +0000 (17:17 +0000)]
Auto merge of #27858 - rkruppe:rustdoc-codespans, r=alexcrichton

Fixes #24746

8 years agoAuto merge of #27689 - dotdash:die_odr, r=michaelwoerister
bors [Sun, 16 Aug 2015 14:50:52 +0000 (14:50 +0000)]
Auto merge of #27689 - dotdash:die_odr, r=michaelwoerister

When using a generic enum type that was defined in an external crate,
our debuginfo currently claims that the concrete type (e.g. Option<i32>)
was defined in the current crate, where it was first used.

This means that if there are multiple crates that all use, for example,
Option<i32> values, they'll have conflicting debuginfo, each crate
claiming to have defined that type. This doesn't cause problems in
regular builds, but with LTO enabled, LLVM complains because it tries to
merge the debuginfo for those types and sees the ODR violations.

Since I couldn't find a way to get the file info for the external crate
that actually defined the enum, I'm working around the issue by using
"<unknown>" as the file for enum types. We'll want to re-visit and fix
this later, but this at least this fixes the ICE. And with the file
being unknown instead of wrong, the debuginfo isn't really worse than
before either.

Fixes #26447

8 years agoCorrect signature of hoedown callback for codespans
Robin Kruppe [Sun, 16 Aug 2015 14:49:10 +0000 (16:49 +0200)]
Correct signature of hoedown callback for codespans

8 years agoAuto merge of #27643 - mitaa:get_item_, r=arielb1
bors [Sun, 16 Aug 2015 12:14:29 +0000 (12:14 +0000)]
Auto merge of #27643 - mitaa:get_item_, r=arielb1

(this incidentally fixes an error message where the paths separator is " " instead of "::")

8 years agoAuto merge of #27853 - seckar:master, r=steveklabnik
bors [Sun, 16 Aug 2015 06:53:43 +0000 (06:53 +0000)]
Auto merge of #27853 - seckar:master, r=steveklabnik

8 years agoAuto merge of #27818 - alexcrichton:tag-all-the-issues, r=aturon
bors [Sun, 16 Aug 2015 05:10:23 +0000 (05:10 +0000)]
Auto merge of #27818 - alexcrichton:tag-all-the-issues, r=aturon

This commit turns `#[unstable]` attributes missing an `issue` annotation into a hard error. This will require the libs team to ensure that there's a tracking issue for all unstable features in the standard library.

All existing unstable features have had issues created and they've all been updated. Yay!

Closes #26868

8 years agoFix typo in doc string.
Nicholas Seckar [Sun, 16 Aug 2015 03:17:52 +0000 (20:17 -0700)]
Fix typo in doc string.

8 years agotest: Fix tests for requiring issues
Alex Crichton [Thu, 13 Aug 2015 20:06:25 +0000 (13:06 -0700)]
test: Fix tests for requiring issues

8 years agoAuto merge of #27851 - nikomatsakis:cleanup-ty-decoder, r=eddyb
bors [Sun, 16 Aug 2015 02:25:36 +0000 (02:25 +0000)]
Auto merge of #27851 - nikomatsakis:cleanup-ty-decoder, r=eddyb

Just a little code cleanup I was doing as part of another refactoring (which may turn out not to be needed). The main thrust of this is to cleanup the interface to `tydecode.rs` to be less ridiculously repetitive. I also purged the generic "def-id conversion" parameter in favor of a trait object, just to reduce code duplication a bit and make the signatures a bit less messy. I measured the bootstrapping time to build stage2 with these changes, it was identical. (But it'd be easy enough to restore the unboxed closure if we wanted it.)

8 years agoremove the last remnants of old interface
Niko Matsakis [Sun, 16 Aug 2015 01:35:49 +0000 (21:35 -0400)]
remove the last remnants of old interface

8 years agoAdd issue for the rustc_private feature everywhere
Alex Crichton [Thu, 13 Aug 2015 17:21:36 +0000 (10:21 -0700)]
Add issue for the rustc_private feature everywhere

8 years agostd: Add issues to all unstable features
Alex Crichton [Thu, 13 Aug 2015 17:12:38 +0000 (10:12 -0700)]
std: Add issues to all unstable features

8 years agocollections: Add issues for unstable features
Alex Crichton [Thu, 13 Aug 2015 05:19:51 +0000 (22:19 -0700)]
collections: Add issues for unstable features

8 years agorustc_unicode: Add issues for unstable features
Alex Crichton [Thu, 13 Aug 2015 05:19:39 +0000 (22:19 -0700)]
rustc_unicode: Add issues for unstable features

8 years agolibc,rand: Add issues for all unstable features
Alex Crichton [Thu, 13 Aug 2015 05:19:19 +0000 (22:19 -0700)]
libc,rand: Add issues for all unstable features

8 years agoalloc: Add issues for all unstable features
Alex Crichton [Thu, 13 Aug 2015 05:19:08 +0000 (22:19 -0700)]
alloc: Add issues for all unstable features

8 years agocore: Fill out issues for unstable features
Alex Crichton [Thu, 13 Aug 2015 00:23:48 +0000 (17:23 -0700)]
core: Fill out issues for unstable features

8 years agosyntax: Require issues for unstable features
Alex Crichton [Thu, 13 Aug 2015 00:23:17 +0000 (17:23 -0700)]
syntax: Require issues for unstable features

This turns an `#[unstable]` tag without an `issue` annotation into a hard error
to ensure that we've always got a tracking issue for unstable features in the
standard library.

8 years agotest: Fix tests for MUSL
Alex Crichton [Sat, 15 Aug 2015 20:29:12 +0000 (13:29 -0700)]
test: Fix tests for MUSL

Some new allocator tests require dynamic libraries to run the full test, but
dylibs aren't currently working on MUSL.

8 years agoAuto merge of #27845 - dylanmckay:abstract-pointer-size-away, r=alexcrichton
bors [Sat, 15 Aug 2015 19:10:40 +0000 (19:10 +0000)]
Auto merge of #27845 - dylanmckay:abstract-pointer-size-away, r=alexcrichton

This patch rewrites code in several places which assume that the current target has either 32-bit or 64-bit pointers so that it can support arbitrary-width pointers.

It does not completely remove all assumptions of pointer width, but it does reduce them significantly. There is a discussion [here](https://internals.rust-lang.org/t/adding-16-bit-pointer-support/2484/10) about the change.

8 years agoprevent non-dict-structs from being intialized via FRU
Ariel Ben-Yehuda [Sat, 15 Aug 2015 18:03:10 +0000 (21:03 +0300)]
prevent non-dict-structs from being intialized via FRU

Fixes #27831

8 years agoclean-up ExprStruct and PatStruct type-checking
Ariel Ben-Yehuda [Sat, 15 Aug 2015 17:39:28 +0000 (20:39 +0300)]
clean-up ExprStruct and PatStruct type-checking

This fixes the crazy "transparent aliases" bug, which I hope nobody
relied on.

8 years agoAuto merge of #27847 - birkenfeld:patch-3, r=sfackler
bors [Sat, 15 Aug 2015 17:30:15 +0000 (17:30 +0000)]
Auto merge of #27847 - birkenfeld:patch-3, r=sfackler