Commit Graph

45640 Commits

Author SHA1 Message Date
Guillaume Gomez
a4e4233828 Add Send/Sync traits on Iter struct in hash/table 2015-08-10 22:46:58 +02:00
bors
8856927f64 Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichton
An implementation of [RFC 1219](https://github.com/rust-lang/rfcs/pull/1219).

The RFC is not merged yet, but once merged, this could be.
2015-08-10 20:24:06 +00:00
Alisdair Owens
f0419661f0 fix import nit for long diagnostics on E0387 2015-08-10 20:35:27 +01:00
bors
3d69bec881 Auto merge of #27252 - tbu-:pr_less_transmutes, r=alexcrichton
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.

This builds upon #27233.
2015-08-10 18:46:21 +00:00
Tim Neumann
d46e84081f add and use Span.substitute_dummy method 2015-08-10 20:43:11 +02:00
bors
96a1f40402 Auto merge of #27516 - alexcrichton:osx-flaky-zomg, r=brson
The investigation into #14232 discovered that it's possible that signal delivery
to a newly spawned process is racy on OSX. This test has been failing spuriously
on the OSX bots for some time now, so ignore it as we don't currently know a
solution and it looks like it may be out of our control.
2015-08-10 17:06:15 +00:00
Alisdair Owens
78d28336fe add info about cell types to diagnostic message E0387 2015-08-10 16:48:53 +01:00
bors
1db1417736 Auto merge of #27547 - vberger:more_perseverant_resolve, r=nrc
As noted in my previous PR #27439 , the import resolution algorithm has two cases where it bails out:

- The algorithm will delay an import if the module containing the target of the import still has unresolved glob imports
- The algorithm will delay a glob import of the target module still has unresolved imports

This PR alters the behaviour to only bail out when the above described unresolved imports are `pub`, as non-pub imports don't affect the result anyway.

It is still possible to fail the algorithm with examples like
```rust
pub mod a {
    pub use b::*;
}

pub mod b {
    pub use a::*;
}
```
but such configurations cannot be resolved in any meaningful way, as these are cyclic imports.

Closes #4865
2015-08-10 14:40:07 +00:00
llogiq
86191e2014 Fixed algorithm to match shootout requirements
See line 181: The lookup should start with the random index and iterate from there.

Also locked stdout (which makes it a bit faster on my machine).

Perhaps the multi-thread output from the fasta benchmark could be used to speed it up even more.
2015-08-10 15:41:19 +02:00
Guillaume Gomez
347991540a Add another example for E0425 2015-08-10 15:29:06 +02:00
Ulrik Sverdrup
664fdbed32 std: Allow ?Sized parameters in std::io::copy
std::io::copy did not allow passing trait objects directly (only with an
extra &mut wrapping).
2015-08-10 14:29:08 +02:00
bors
a136d4c95f Auto merge of #27634 - TimNN:master, r=dotdash
I don't know how this single inline caused the breakage but it seems to be the cause of the issue (see https://github.com/rust-lang/rust/issues/27619#issuecomment-129420094).
2015-08-10 12:01:01 +00:00
Tim Neumann
03f561c5f2 Revert "Mark round_up_to_next as inline"
This reverts commit febdc3b201.
2015-08-10 13:51:55 +02:00
Tshepang Lekhonkhobe
3b686a3ffb doc: add missing symbol 2015-08-10 13:46:03 +02:00
Sylvestre Ledru
5bcbc5c735 Bug #27621 - Make sure that LLVM FileCheck is available on the system 2015-08-10 09:53:00 +02:00
William Throwe
f001f9a73e Make tidy-binaries find invocation work on Linux
New enough find on Linux doesn't support "-perm +..." and suggests
using "-perm /..." instead, but that doesn't work on Windows.
Hopefully all platforms are happy with this expanded version.
2015-08-10 00:12:45 -04:00
Eli Friedman
7d3c4bd72a Tweak style guide to avoid referencing the removed ascii::Ascii. 2015-08-09 18:56:48 -07:00
Tobias Bucher
33af24ca4c Remove unused feature 2015-08-09 23:53:28 +02:00
Eli Friedman
bbbfed2f93 Use https URLs to refer to rust-lang.org where appropriate.
Also fixes a few outdated links.
2015-08-09 14:28:46 -07:00
Tobias Bucher
2ec26681a4 Remove #[cfg(stage0)] annotation 2015-08-09 22:05:23 +02:00
Tobias Bucher
587a32b61b Change TODO to FIXME 2015-08-09 22:05:23 +02:00
Tobias Bucher
5309fbb6c9 Make str::as_bytes_mut private 2015-08-09 22:05:22 +02:00
Tobias Bucher
47041fe289 Make slice::transmute* private 2015-08-09 22:05:22 +02:00
Tobias Bucher
22ec5f4af7 Replace many uses of mem::transmute with more specific functions
The replacements are functions that usually use a single `mem::transmute` in
their body and restrict input and output via more concrete types than `T` and
`U`. Worth noting are the `transmute` functions for slices and the `from_utf8*`
family for mutable slices. Additionally, `mem::transmute` was often used for
casting raw pointers, when you can already cast raw pointers just fine with
`as`.
2015-08-09 22:05:22 +02:00
Alisdair Owens
d07a094fb0 add diagnostics for E0193 2015-08-09 16:45:56 +01:00
Ariel Ben-Yehuda
febdc3b201 Mark round_up_to_next as inline
This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s
2015-08-09 17:20:12 +03:00
Robin Kruppe
82dbc2ea61 Add optional, external tests for floating point parsing.
Running these tests takes hours, so they are not run by @bors.
2015-08-09 14:17:39 +02:00
Vincent Bernat
721dc47a69 doc/core: fix description of nth function
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.
2015-08-09 01:04:59 +02:00
Vincent Bernat
b67adbed5a TRPL: minor correction on how chars().nth() work
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.
2015-08-09 00:56:38 +02:00
bors
a5d33d8911 Auto merge of #27182 - AlisdairO:diagnostics382, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-08-08 20:32:27 +00:00
Alisdair Owens
dadc717041 add long diagnostics for E0382 2015-08-08 20:17:03 +01:00
Sean McArthur
cfcd449c4c rustc: rename multiple imports in a list 2015-08-08 11:54:15 -07:00
Alisdair Owens
d83a0fdf7d add diagnostics for E0387 2015-08-08 17:38:50 +01:00
bors
cbf4c342cf Auto merge of #27595 - mike-marcacci:patch-1, r=steveklabnik
Keeping integer values and integer references in the "value" columns made the examples quite difficult for me to follow. I've added unicode arrows to references to make them more obvious, without using any characters with actual meaning in the rust language (like `&` or previously `~`).

r? @steveklabnik
2015-08-08 16:27:12 +00:00
Robin Kruppe
ba792a4baa Accurate decimal-to-float parsing routines.
This commit primarily adds implementations of the algorithms from William
Clinger's paper "How to Read Floating Point Numbers Accurately". It also
includes a lot of infrastructure necessary for those algorithms, and some
unit tests.

Since these algorithms reject a few (extreme) inputs that were previously
accepted, this could be seen as a [breaking-change]
2015-08-08 17:15:31 +02:00
Robin Kruppe
b7e39a1c2d Script for generating the powers-of-ten tables necessary for correct and
fast decimal-to-float conversions.
2015-08-08 17:15:25 +02:00
Robin Kruppe
7ebd7f3b9a Add various methods to Bignum:
- Exposing digits and individual bits
- Counting the number of bits
- Add small (digit-sized) values
- Multiplication by power of 5
- Division with remainder

All are necessary for decimal to floating point conversions.
All but the most trivial ones come with tests.
2015-08-08 17:15:19 +02:00
Robin Kruppe
7ff10209aa Enlarge Bignum type from 1152 to 1280 bits.
This is necessary for decimal-to-float code (in a later commit) to handle
inputs such as 4.9406564584124654e-324 (the smallest subnormal f64).
According to the benchmarks for flt2dec::dragon, this does not
affect performance measurably. It probably uses slightly more stack
space though.
2015-08-08 17:15:14 +02:00
Robin Kruppe
b55806ca8f Make core::num::dec2flt::strategy::grisu::Fp methods public.
The intent is to allow decimal-to-float parsing to use Fp in its fast path.
That code is added in a later commit.
2015-08-08 17:12:29 +02:00
Björn Steinbrink
f804872502 Fix the function return type used in get_res_dtor()
Instead of the actual return type, we're currently passing the function
type to get_extern_fn(). The only reason this doesn't explode is because
get_extern_fn() actually doesn't care about the actual return type, just
about it being converging or not.
2015-08-08 15:32:35 +02:00
bors
920cf4b4b2 Auto merge of #27596 - tsion:fix-27450, r=arielb1
Fixes #27450.

r? @steveklabnik
2015-08-08 09:55:42 +00:00
Mike Marcacci
bcf3921a2a Added arrows to references in tables
Keeping integer values and integer references in the "value" columns made the examples quite difficult for me to follow. I've added unicode arrows to make references more obvious, without using a character with actual meaning in the rust language (like `&` or previously `~`).
2015-08-07 23:13:08 -07:00
Scott Olson
f351e762f0 Fix the diagnostic for fat pointer to usize casts.
Fixes #27450.
2015-08-07 22:08:28 -04:00
bors
e5d90d9840 Auto merge of #27378 - GuillaumeGomez:patch-2, r=brson
Part of #24407.
r? @Manishearth
2015-08-07 17:58:17 +00:00
Björn Steinbrink
1eeaf2065b Fix ICE when trying to drop an unsized type from a different crate
The code to get the LLVM type signature for the drop function doesn't
handle unsized types correctly.
2015-08-07 18:29:44 +02:00
bors
1b5d52122e Auto merge of #27582 - pnkfelix:disable-nonzeroing-move-hint-by-default, r=nikomatsakis
Turn nonzeroing move hints back off by default.

Works around bugs injected by PR #26173.

 * (@pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.)

 * When the bugs are fixed, we will turn nonzeroing move hints back on by default.

Fix #27401
2015-08-07 16:24:22 +00:00
Felix S. Klock II
1a68b18763 placate the pretty tests by ignoring my test. 2015-08-07 18:23:37 +02:00
Tim Neumann
c115c51363 improve span of erroneous empty macro invocation
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-07 16:53:13 +02:00
Felix S. Klock II
6170435055 Regression test for dropflag reinit issue.
Fix #27401.
2015-08-07 16:21:22 +02:00
Felix S. Klock II
e9b28d22fb Turn nonzeroing move hints back off by default.
This is a temporary workaround for the bugs that have been found in
the implementation of PR #26173.

 * pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.

 * When the bugs are fixed, we will turn this back on by default.

(If you want to play with the known-to-be-buggy optimization in the
meantime, you can opt-back in via the debugging option that this
commit is toggling.)
2015-08-07 15:51:25 +02:00