Commit Graph

80058 Commits

Author SHA1 Message Date
kennytm
7f4347f8e2
Rollup merge of #51824 - vorner:thread-local-try-with-doc, r=kennytm
Fix the error reference for LocalKey::try_with

There's no such thing as `ThreadLocalError` and the method obviously returns `AccessError`, so adjusting (probably only outdated docs).
2018-06-28 06:15:42 +08:00
kennytm
700a2f799a
Rollup merge of #51800 - mark-i-m:edition2018compiletest, r=nikomatsakis
Add a compiletest header for edition

r? @nikomatsakis

Are the `-Zunstable-options` options needed in these tests? It looks like they aren't. If not, I can remove them.
2018-06-28 06:15:41 +08:00
kennytm
770d0fba63
Rollup merge of #51799 - mark-i-m:lower_case_feature_gate, r=mark-i-m
Lower case some feature gate error messages
2018-06-28 06:15:40 +08:00
kennytm
1ebd9adef4
Rollup merge of #51658 - oli-obk:unregress_perf, r=nikomatsakis
Only do sanity check with debug assertions on

r? @nnethercote

I'm slighty confused. These changes address code that the `unused-warnings` benchmark doesn't go through, yet I see a 5% improvement to nightly on the `check` run, and no improvement on the other runs.

Maybe this change allows unrelated code in the same function to be better optimized?
2018-06-28 06:15:39 +08:00
kennytm
63531f515d
Rollup merge of #50342 - fkjogu:euclidean, r=BurntSushi
Document round-off error in `.mod_euc()`-method, see issue #50179

Due to a round-off error the method `.mod_euc()` of both `f32` and `f64` can produce mathematical invalid outputs. If `self` in magnitude is much small than the modulus `rhs` and negative, `self + rhs` in the first branch cannot be represented in the given precision and results into `rhs`. In the mathematical strict sense, this breaks the definition. But given the limitation of floating point arithmetic it can be thought of the closest representable value to the true result, although it is not strictly in the domain `[0.0, rhs)` of the function. It is rather the left side asymptotical limit. It would be desirable that it produces the mathematical more sound approximation of `0.0`, the right side asymptotical limit. But this breaks the property, that `self == self.div_euc(rhs) * rhs + a.mod_euc(rhs)`.

The discussion in issue #50179 did not find an satisfying conclusion to which property is deemed more important. But at least we can document the behaviour. Which this pull request does.
2018-06-28 06:15:38 +08:00
kennytm
e5462b82e3
Rollup merge of #49987 - clarcharr:split_ascii_whitespace, r=SimonSapin
Add str::split_ascii_whitespace.

As mentioned in #48656.

While `str::split_whitespace` now works in `libcore`, it still makes sense to offer this method, considering how it is still more performant in cases where only ASCII is necessary.
2018-06-28 06:15:37 +08:00
Clar Charr
b5cee029a5 Add str::split_ascii_whitespace. 2018-06-27 17:54:27 -04:00
Matthew Jasper
2cb0a0631a Update tests for grouped nll move errors 2018-06-27 22:46:58 +01:00
Matthew Jasper
0193d1f736 Group move errors before reporting, add suggestions 2018-06-27 22:46:58 +01:00
bors
cd494c1f09 Auto merge of #51139 - vakaras:issue-50716, r=nikomatsakis
Fix NLL issue 50716 and add a regression test.

Fix for NLL issue #50716.

r? @nikomatsakis
2018-06-27 21:32:44 +00:00
Matthew Jasper
43fce075d3 Update MIR opt tests 2018-06-27 22:06:21 +01:00
Matthew Jasper
9185bb3061 Generate a direct assignment in MIR for let x = y; 2018-06-27 22:04:45 +01:00
Niko Matsakis
1523de34a2 rustfmt various files 2018-06-27 16:30:38 -04:00
Niko Matsakis
9b1d2229ff change the enter_canonical_trait_query method to give a fulfill cx 2018-06-27 16:04:32 -04:00
Niko Matsakis
f0fdce31d9 update comments 2018-06-27 15:45:53 -04:00
Niko Matsakis
5fd3b26280 rename prequery to try_fast_path 2018-06-27 15:45:53 -04:00
Niko Matsakis
0a0dae0964 pull out ParamEnvAnd and remove QueryKey 2018-06-27 15:45:49 -04:00
bors
23b55161ab Auto merge of #51852 - oli-obk:miri_fix, r=Zoxc
Don't use `ParamEnv::reveal_all()` if there is a real one available

fixes #51841

r? @Zoxc
2018-06-27 19:30:14 +00:00
Josef Reinhard Brandl
30d825ce72 Fix doc links 2018-06-27 20:22:49 +02:00
Niko Matsakis
5c06b23025 run rustfmt 2018-06-27 13:32:00 -04:00
bors
4aff10bb1b Auto merge of #51850 - abarth:draw_again, r=cramertj
[fuchsia] Update zx_cprng_draw to target semantics

This change is the final step in improving the semantics of
zx_cprng_draw. Now the syscall always generates the requested number of
bytes. If the syscall would have failed to generate the requested number
of bytes, the syscall either terminates the entire operating system or
terminates the calling process, depending on whether the error is a
result of the kernel misbehaving or the userspace program misbehaving.
2018-06-27 17:20:27 +00:00
Niko Matsakis
497273620b don't use Iterator and zip but just invoke next manually
This micro-optimizes some if checks away; the compiler may already
have been doing it, not sure.
2018-06-27 13:01:23 -04:00
Oliver Schneider
89d8e0a260 Don't use ParamEnv::reveal_all() if there is a real one available 2018-06-27 18:24:24 +02:00
Vytautas Astrauskas
03ecd982bf Fix the error of selecting obligation by not running the borrow checker. 2018-06-27 18:14:00 +02:00
Felix S. Klock II
f288b87c23 Move regression test from compile-fail/ to ui/ test directory. 2018-06-27 18:13:43 +02:00
Vytautas Astrauskas
8b1ea84265 Fix the regression test for issue 50716. 2018-06-27 18:13:43 +02:00
Vytautas Astrauskas
612eeb1df7 Fix NLL issue 50716 and add a regression test. 2018-06-27 18:13:43 +02:00
Adam Barth
a9f7cc3b49 [fuchsia] Update zx_cprng_draw to target semantics
This change is the final step in improving the semantics of
zx_cprng_draw. Now the syscall always generates the requested number of
bytes. If the syscall would have failed to generate the requested number
of bytes, the syscall either terminates the entire operating system or
terminates the calling process, depending on whether the error is a
result of the kernel misbehaving or the userspace program misbehaving.
2018-06-27 08:56:19 -07:00
Niko Matsakis
e10414e055 avoid use of vectors etc 2018-06-27 11:47:58 -04:00
Niko Matsakis
edf14d1884 extract places_conflict into its own module 2018-06-27 11:47:58 -04:00
bors
ed0350e945 Auto merge of #51356 - Zoxc:encode-cleanup, r=michaelwoerister
Make opaque::Encoder append-only and make it infallible
2018-06-27 14:25:52 +00:00
Niko Matsakis
b2e899f843 move into provide methods 2018-06-27 09:42:21 -04:00
Niko Matsakis
c3f7e02fb6 rename to shrink_to_tcx_lifetime 2018-06-27 09:27:07 -04:00
Simon Sapin
1565fc2120 Document that Layout::from_size_align does not allow align=0
This was already implied since zero is not a power of two, but maybe
worth pointing out.
2018-06-27 15:07:42 +02:00
Niko Matsakis
c2f7757bc5 extend comment to note complications around lifetimes 2018-06-27 08:55:41 -04:00
Michael Woerister
ba30c1dac9 syntax_pos: Store multibyte char size as u8 instead of u32. 2018-06-27 14:00:34 +02:00
Michael Woerister
ba1d18fe29 Add comments to analzye_filemap(). 2018-06-27 14:00:34 +02:00
Michael Woerister
5a6dc8c4f5 Add SSE2 accelerated version of FileMap analysis. 2018-06-27 14:00:34 +02:00
Michael Woerister
3497138634 Use u32 instead of usize of encoding byte count of multi-byte chars. 2018-06-27 14:00:34 +02:00
Michael Woerister
04d4da1bf9 Update CodeMap tests after changing FileMap construction. 2018-06-27 14:00:34 +02:00
Michael Woerister
095a339bec Remove the now redundant CodeMap::new_filemap_with_lines() method. 2018-06-27 14:00:34 +02:00
Michael Woerister
257d279fe4 Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable. 2018-06-27 14:00:34 +02:00
Oliver Schneider
0fa166ad7f Detect overflows of non u32 shifts 2018-06-27 13:47:19 +02:00
Niko Matsakis
35a5065573 pacify the mercilous tidy 2018-06-27 07:28:25 -04:00
Niko Matsakis
c6a7c6fc68 improve comments on dropck_outlives 2018-06-27 07:26:29 -04:00
bors
142c98dd5a Auto merge of #51496 - petrochenkov:mhelper2, r=nikomatsakis
Implement `#[macro_export(local_inner_macros)]` (a solution for the macro helper import problem)

Implement a solution for the macro helper issue discussed in https://github.com/rust-lang/rust/issues/35896 as described in https://github.com/rust-lang/rust/issues/35896#issuecomment-395977901.

Macros exported from libraries can be marked with `#[macro_export(local_inner_macros)]` and this annotation changes how nested macros in them are resolved.

If we have a fn-like macro call `ident!(...)` and `ident` comes from a `macro_rules!` macro marked with  `#[macro_export(local_inner_macros)]` then it's replaced with `$crate::ident!(...)` and resolved as such (`$crate` gets the same context as `ident`).
2018-06-27 11:20:16 +00:00
Niko Matsakis
1be4fffc24 improve comment on instantiate NLL query result fn 2018-06-27 07:19:17 -04:00
Niko Matsakis
5bfdb97684 remove either dependency we are not using 2018-06-27 07:05:40 -04:00
Niko Matsakis
59ea17ed3f rename upcast to cast_to_tcx_lifetime and improve comment 2018-06-27 07:02:37 -04:00
Niko Matsakis
d695512437 fix wrong query description 2018-06-27 06:57:20 -04:00