]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #27875 - alexcrichton:msvc-f32-rem, r=nrc
bors [Wed, 19 Aug 2015 07:14:43 +0000 (07:14 +0000)]
Auto merge of #27875 - alexcrichton:msvc-f32-rem, r=nrc

Currently `f32 % f32` will generate a link error on 32-bit MSVC because LLVM
will lower the operation to a call to the nonexistent function `fmodf`. Work
around in this in the backend by lowering to a call to `fmod` instead with
necessary extension/truncation between floats/doubles.

Closes #27859

8 years agoAuto merge of #27493 - GSam:master, r=nrc
bors [Wed, 19 Aug 2015 03:50:05 +0000 (03:50 +0000)]
Auto merge of #27493 - GSam:master, r=nrc

In order to test the validity of identifiers, exposing the name resolution module is necessary. Other changes mostly comprise of exposing modules publicly like parts of save-analysis, so they can be called appropriately.

8 years agoAuto merge of #27849 - jonas-schievink:macro-errors, r=nikomatsakis
bors [Wed, 19 Aug 2015 00:54:38 +0000 (00:54 +0000)]
Auto merge of #27849 - jonas-schievink:macro-errors, r=nikomatsakis

And some small indentation/code style fixes in the macro parser.

8 years agostd: Add into_raw_os traits to the OS preludes
Alex Crichton [Wed, 19 Aug 2015 00:23:45 +0000 (17:23 -0700)]
std: Add into_raw_os traits to the OS preludes

These traits were mistakenly left out of the OS-specific prelude modules when
they were added.

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 agoadd a regression test for #27583. Fixes #27583.
Niko Matsakis [Tue, 18 Aug 2015 21:44:01 +0000 (17:44 -0400)]
add a regression test for #27583. Fixes #27583.

8 years agokill the old funky `can_reach` fn
Niko Matsakis [Tue, 18 Aug 2015 21:41:46 +0000 (17:41 -0400)]
kill the old funky `can_reach` fn

8 years agorewrite `free_region`/`region_inference` to use newly minted
Niko Matsakis [Tue, 18 Aug 2015 21:41:20 +0000 (17:41 -0400)]
rewrite `free_region`/`region_inference` to use newly minted
`TransitiveRelation`

8 years agoimplement transitive relation type that can compute transitive
Niko Matsakis [Tue, 18 Aug 2015 21:38:19 +0000 (17:38 -0400)]
implement transitive relation type that can compute transitive
closures, upper bounds, and other fun things

8 years agoremove unused import
Niko Matsakis [Tue, 18 Aug 2015 21:38:05 +0000 (17:38 -0400)]
remove unused import

8 years agoreorder imports to respect the alphabet, only one of the single most
Niko Matsakis [Tue, 18 Aug 2015 21:37:15 +0000 (17:37 -0400)]
reorder imports to respect the alphabet, only one of the single most
important inventions of all time

8 years agogeneralize bitvector code into a bitmatrix; write some unit tests, but
Niko Matsakis [Tue, 18 Aug 2015 21:36:32 +0000 (17:36 -0400)]
generalize bitvector code into a bitmatrix; write some unit tests, but
probably not enough. This code is so simple, what could possibly go
wrong?

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 agotrans: Call `fmod` manually for 32-bit float rem
Alex Crichton [Tue, 18 Aug 2015 00:00:45 +0000 (17:00 -0700)]
trans: Call `fmod` manually for 32-bit float rem

Currently `f32 % f32` will generate a link error on 32-bit MSVC because LLVM
will lower the operation to a call to the nonexistent function `fmodf`. Work
around in this in the backend by lowering to a call to `fmod` instead with
necessary extension/truncation between floats/doubles.

Closes #27859

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 agocore: Shuffle around float parsing
Alex Crichton [Mon, 17 Aug 2015 21:16:41 +0000 (14:16 -0700)]
core: Shuffle around float parsing

Stop using stability to hide the implementation details of ParseFloatError and
instead move the error type into the `dec2flt` module. Also move the
implementation blocks of `FromStr for f{32,64}` into `dec2flt` directly.

8 years agocore: Stabilize prelude::v1
Alex Crichton [Mon, 17 Aug 2015 21:02:15 +0000 (14:02 -0700)]
core: Stabilize prelude::v1

This commit stabilizes the prelude::v1 module of libcore after verifying that
it's a subset of the prelude of the standard library with the addition of a few
extension traits.

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 agocore: Move `atomic` into a new `sync` module
Alex Crichton [Mon, 17 Aug 2015 20:56:55 +0000 (13:56 -0700)]
core: Move `atomic` into a new `sync` module

This mirrors the same hierarchy in the standard library.

8 years agostd: Clean up primitive integer modules
Alex Crichton [Mon, 17 Aug 2015 20:23:36 +0000 (13:23 -0700)]
std: Clean up primitive integer modules

All of the modules in the standard library were just straight reexports of those
in libcore, so remove all the "macro modules" from the standard library and just
reexport what's in core directly.

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 agorustdoc: Add test for #27759
Martin Wernstål [Mon, 17 Aug 2015 20:05:07 +0000 (22:05 +0200)]
rustdoc: Add test for #27759

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 agorustdoc: Removed issue_tracker_base_url from crates not in public API docs
Martin Wernstål [Mon, 17 Aug 2015 18:37:30 +0000 (20:37 +0200)]
rustdoc: Removed issue_tracker_base_url from crates not in public API docs

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 agorustdoc: Removed command line option issue-tracker-base-url
Martin Wernstål [Mon, 17 Aug 2015 18:24:28 +0000 (20:24 +0200)]
rustdoc: Removed command line option issue-tracker-base-url

8 years agorustdoc: Adjusted style for unstable feature-name
Martin Wernstål [Mon, 17 Aug 2015 18:23:47 +0000 (20:23 +0200)]
rustdoc: Adjusted style for unstable feature-name

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 agoAdd E0390 error explanation
Guillaume Gomez [Mon, 17 Aug 2015 12:30:38 +0000 (14:30 +0200)]
Add E0390 error explanation

8 years agolibrustdoc: Fix tidy
Martin Wernstål [Sun, 16 Aug 2015 21:06:57 +0000 (23:06 +0200)]
librustdoc: Fix tidy

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 agorustdoc: Added issue_tracker_base_url annotations to crates
Martin Wernstål [Sun, 16 Aug 2015 15:22:50 +0000 (17:22 +0200)]
rustdoc: Added issue_tracker_base_url annotations to crates