Mazdak Farrokhzad
a7d993961f
Rollup merge of #62716 - RalfJung:unsafe-cell, r=Centril
...
state also in the intro that UnsafeCell has no effect on &mut
Just to be extra sure.
2019-07-24 16:13:09 +02:00
Mazdak Farrokhzad
21caaba2bc
Rollup merge of #62641 - cuviper:unicode-12.1, r=matklad
...
Regenerate character tables for Unicode 12.1
2019-07-24 16:13:07 +02:00
bors
a7f28678bb
Auto merge of #62902 - Mark-Simulacrum:rollup-mxfk0mm, r=Mark-Simulacrum
...
Rollup of 14 pull requests
Successful merges:
- #60951 (more specific errors in src/librustc/mir/interpret/error.rs)
- #62523 (Delay bug to resolve HRTB ICE)
- #62656 (explain how to search in slice without owned data)
- #62791 (Handle more cases of typos misinterpreted as type ascription)
- #62804 (rustc_typeck: improve diagnostics for _ const/static declarations)
- #62808 (Revert "Disable stack probing for gnux32.")
- #62817 (Tweak span for variant not found error)
- #62842 (Add tests for issue-58887)
- #62851 (move unescape module to rustc_lexer)
- #62859 (Place::as_place_ref is now Place::as_ref)
- #62869 (add rustc_private as a proper language feature gate)
- #62880 (normalize use of backticks in compiler messages for librustc_allocator)
- #62885 (Change "OSX" to "macOS")
- #62889 (Update stage0.txt)
Failed merges:
r? @ghost
2019-07-23 19:50:46 +00:00
Mark Rousskov
f11ffd3a6a
Rollup merge of #62869 - matklad:feature-gate, r=Mark-Simulacrum
...
add rustc_private as a proper language feature gate
At the moment, `rustc_private` as a (library) feature exists by
accident: `char::is_xid_start`, `char::is_xid_continue` methods in
libcore define it.
cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20to.20declare.20new.20langauge.20feature.3F
I don't know if this is at all reasonable, but at least tests seem to pass locally. That probably means that we can remove/rename to something more resonable the feature in libcore in the next release?
2019-07-23 12:51:18 -04:00
Mark Rousskov
4264f8376a
Rollup merge of #62656 - RalfJung:contains-no-own, r=Dylan-DPC
...
explain how to search in slice without owned data
Cc https://github.com/rust-lang/rust/issues/62367
2019-07-23 12:51:05 -04:00
bors
299ef86e1f
Auto merge of #62823 - RalfJung:miri, r=oli-obk
...
update Miri
Fixes https://github.com/rust-lang/rust/issues/62802
r? @oli-obk @eddyb
2019-07-23 15:55:26 +00:00
Mazdak Farrokhzad
5a20745c96
Rollup merge of #62799 - RalfJung:uninit-array, r=Centril
...
use const array repeat expressions for uninit_array
With a first implementation of https://github.com/rust-lang/rust/issues/49147 having landed, we can make this macro nicer and phase it out with the next bootstrap bump.
However, to make this work, we have to mark `MaybeUninit::uninit()` as promotable. I do feel uneasy about promoting stuff involving uninitialized memory, but OTOH no *operation* on `MaybeUninit` is promotable, so maybe this is okay?
r? @oli-obk @eddyb
2019-07-22 15:32:17 +02:00
Mazdak Farrokhzad
7dafdd21b1
Rollup merge of #62788 - fakenine:normalize_use_of_backticks_compiler_messages_p9, r=Centril
...
normalize use of backticks in compiler messages for libcore/ptr
https://github.com/rust-lang/rust/issues/60532
2019-07-22 15:32:15 +02:00
Aleksey Kladov
27b703dd40
add rustc_private as a proper language feature gate
...
At the moment, `rustc_private` as a (library) feature exists by
accident: `char::is_xid_start`, `char::is_xid_continue` methods in
libcore define it.
2019-07-22 16:32:13 +03:00
Mazdak Farrokhzad
1d7faafe47
Rollup merge of #62746 - RalfJung:deprecated, r=KodrAus
...
do not use assume_init in std::io
Cc https://github.com/rust-lang/rust/issues/62397
2019-07-22 15:32:12 +02:00
Mazdak Farrokhzad
2567af67a6
Rollup merge of #62713 - SimonSapin:cast, r=Centril
...
Stabilize <*mut _>::cast and <*const _>::cast
Fixes #60602 .
FCP: https://github.com/rust-lang/rust/issues/60602#issuecomment-511146402
2019-07-22 15:32:11 +02:00
Ralf Jung
f3abbf7103
tidy is being silly
2019-07-21 12:59:51 +02:00
Ralf Jung
4b47e78a16
use a const to hack around promotion limitations
2019-07-21 12:28:18 +02:00
Ralf Jung
10f877b5ea
disable overlapping check with Miri (does not work without intptrcast)
2019-07-21 12:28:06 +02:00
Ralf Jung
ad261f6852
avoid uninit_array! macro where it is not needed
2019-07-19 17:23:47 +02:00
Ralf Jung
e074db764a
use const array repeat expressions for uninit_array
2019-07-19 14:47:56 +02:00
Ralf Jung
13ed0cf9e8
do not use mem::uninitialized in std::io
2019-07-19 09:45:38 +02:00
Samy Kacimi
886fb218ed
normalize use of backticks in compiler messages for libcore/ptr
...
https://github.com/rust-lang/rust/issues/60532
2019-07-18 23:33:16 +02:00
Mark Rousskov
d961eb6034
Rollup merge of #62740 - lzutao:patch-2, r=alexcrichton
...
Add missing link to Infallible in TryFrom doc
2019-07-18 11:29:46 -04:00
Mark Rousskov
831d33b8b0
Rollup merge of #62728 - DutchGhost:fix-double-wording, r=jonas-schievink
...
Fix repeated wording in slice documentation
Changes `of the slice of the slice` to `of the slice` in the chunk- and friends documentation of slices
2019-07-18 11:29:42 -04:00
bors
e34d4ae869
Auto merge of #61339 - jridgewell:pointer-alignment, r=BurntSushi
...
Optimize pointer alignment in utf8 validation
This uses (and reuses) the u8 arrays's inherent block alignment when checking whether the current index is block aligned.
I initially thought that this would just move the expensive `align_offset` call out of the while loop and replace it with a subtraction and bitwise AND. But it appears this optimizes much better, too...
before: https://rust.godbolt.org/z/WIPvWl
after: https://rust.godbolt.org/z/-jBPoW
## Benchmarks
https://github.com/jridgewell/faster-from_utf8/tree/pointer-alignment
```
test from_utf8_2_bytes_fast ... bench: 310 ns/iter (+/- 42) = 1290 MB/s
test from_utf8_2_bytes_regular ... bench: 309 ns/iter (+/- 24) = 1294 MB/s
test from_utf8_3_bytes_fast ... bench: 1,027 ns/iter (+/- 62) = 1168 MB/s
test from_utf8_3_bytes_regular ... bench: 1,513 ns/iter (+/- 611) = 793 MB/s
test from_utf8_4_bytes_fast ... bench: 1,788 ns/iter (+/- 26) = 1342 MB/s
test from_utf8_4_bytes_regular ... bench: 1,907 ns/iter (+/- 181) = 1258 MB/s
test from_utf8_all_bytes_fast ... bench: 3,463 ns/iter (+/- 97) = 1155 MB/s
test from_utf8_all_bytes_regular ... bench: 4,083 ns/iter (+/- 89) = 979 MB/s
test from_utf8_ascii_fast ... bench: 88 ns/iter (+/- 4) = 28988 MB/s
test from_utf8_ascii_regular ... bench: 88 ns/iter (+/- 8) = 28988 MB/s
test from_utf8_cyr_fast ... bench: 7,707 ns/iter (+/- 531) = 665 MB/s
test from_utf8_cyr_regular ... bench: 8,202 ns/iter (+/- 135) = 625 MB/s
test from_utf8_enwik8_fast ... bench: 1,135,756 ns/iter (+/- 84,450) = 8804 MB/s
test from_utf8_enwik8_regular ... bench: 1,145,468 ns/iter (+/- 79,601) = 8730 MB/s
test from_utf8_jawik10_fast ... bench: 12,723,844 ns/iter (+/- 473,247) = 785 MB/s
test from_utf8_jawik10_regular ... bench: 13,384,596 ns/iter (+/- 666,997) = 747 MB/s
test from_utf8_mixed_fast ... bench: 2,321 ns/iter (+/- 123) = 2081 MB/s
test from_utf8_mixed_regular ... bench: 2,702 ns/iter (+/- 408) = 1788 MB/s
test from_utf8_mostlyasc_fast ... bench: 249 ns/iter (+/- 10) = 14666 MB/s
test from_utf8_mostlyasc_regular ... bench: 276 ns/iter (+/- 5) = 13231 MB/s
```
2019-07-17 12:13:36 +00:00
bors
d56128d291
Auto merge of #62596 - cuviper:expect_none, r=rkruppe
...
Add Option::expect_none(msg) and unwrap_none()
These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
2019-07-17 08:29:02 +00:00
lzutao
6471bd5f19
Add missing link to Infallible in TryFrom doc
2019-07-17 10:44:12 +07:00
Dodo
9341e90b44
found more repeated wording
2019-07-16 21:57:32 +02:00
Dodo
4785311893
fix double wording
2019-07-16 21:49:01 +02:00
Ralf Jung
d30b36efc5
state also in the intro that UnsafeCell has no effect on &mut
2019-07-16 14:47:51 +02:00
Simon Sapin
8040c54b08
Stabilize <*mut _>::cast and <*const _>::cast
...
FCP: https://github.com/rust-lang/rust/issues/60602#issuecomment-511146402
2019-07-16 08:51:53 +02:00
Mark Rousskov
ba3deeb01a
Rollup merge of #62689 - 0e4ef622:patch-1, r=Xanewok
...
Fix typo in RawWaker::new documentation
poiner -> pointer
2019-07-15 19:55:15 -04:00
Mark Rousskov
aa480100b3
Rollup merge of #62662 - DutchGhost:fix_space, r=sfackler
...
add spaces in front of trait requirements in libcore/cell.rs
Adds spaces before trait requirements in `libcore/cell.rs`.
2019-07-15 19:55:08 -04:00
Mark Rousskov
ee8194002e
Rollup merge of #62639 - immunant:invariant_valistimpl, r=eddyb
...
Make VaListImpl<'f> invariant over the 'f lifetime
After doing some research on variance and going back to look at `VaList` and `VaListImpl`, I realized that `VaList<'a, 'f>` is invariant over the `'f` lifetime (and covariant over `'a`), but `VaListImpl<'f>` isn't invariant but probably should be. This patch makes `VaListImpl<'f>` invariant over `'f`.
r? @eddyb
cc @dlrobertson
2019-07-15 19:55:06 -04:00
Mark Rousskov
caf10b5ffe
Rollup merge of #62634 - llogiq:uninit-array-docs, r=RalfJung
...
Less unsafe in the array example of MaybeUninit docs
I believe this is an acceptable way to initialize elements of `[MaybeUninit<T>; _]` arrays. Miri agrees. Conceptually, we are working at the array level, above the `MaybeUninit`, and as we are replacing it wholesale, this should pose no problem to soundness. And the code is easier to read.
r? @RalfJung
2019-07-15 19:55:04 -04:00
Mark Rousskov
64ceba73af
Rollup merge of #62533 - GuillaumeGomez:missing-urls-CannotReallocInPlace, r=QuietMisdreavus
...
Add missing links for CannotReallocInPlace type
r? @QuietMisdreavus
2019-07-15 19:55:03 -04:00
Mark Rousskov
d6f0c0c47d
Rollup merge of #62491 - GuillaumeGomez:fix-pin-urls-for-option, r=QuietMisdreavus
...
Fix Pin urls in Option documentation
Fixes the following situation:

r? @QuietMisdreavus
2019-07-15 19:55:01 -04:00
Mark Rousskov
f940617b8e
Rollup merge of #62103 - RalfJung:debug-assert, r=alexcrichton
...
Add debug assertions to write_bytes and copy*
Looks like @nitnelave went MIA in https://github.com/rust-lang/rust/pull/58783 , so I am re-submitting their PR, tweaked just a bit. I took care to preserve commit authorship.
Cc https://github.com/rust-lang/rust/issues/53871
2019-07-15 19:54:58 -04:00
0e4ef622
04cb314ab9
Fix typo in RawWaker::new documentation
...
poiner -> pointer
2019-07-15 10:03:53 -05:00
Valentin Tolmer
009c4a7efe
Add debug assertions to write_bytes and copy*
2019-07-15 16:56:43 +02:00
gnzlbg
677cf3de3a
Add rtm and f16c features to libcore
2019-07-15 14:05:39 +02:00
gnzlbg
77c14a5c5f
Update the stdarch submodule
2019-07-15 14:05:28 +02:00
Andrei Homescu
0c981e0a8a
Make VaListImpl<'f> invariant over the 'f lifetime
2019-07-14 18:14:15 -07:00
Andre Bogus
cb3aa4ce2c
Less unsafe in the array example of MaybeUninit docs
2019-07-14 13:32:14 +02:00
Ralf Jung
3f77f2cd5b
better comments
2019-07-14 10:03:04 +02:00
Dodo
4e1d467700
add spaces in front of trait requirements
2019-07-13 17:15:16 +02:00
Ralf Jung
d73c23d114
explain how to search without owned data
2019-07-13 15:16:05 +02:00
Josh Stone
de1e489115
Regenerate character tables for Unicode 12.1
2019-07-12 16:29:40 -07:00
Josh Stone
76128c304d
Update unicode scripts for the current coding style
2019-07-12 16:28:58 -07:00
Mazdak Farrokhzad
d69e9588f0
Rollup merge of #62599 - RalfJung:uninit, r=cramertj
...
move mem::uninitialized deprecation back by 1 release, to 1.39
As per discussion at https://github.com/rust-lang/rust/issues/53491#issuecomment-509271182 . Three releases also agrees with the precedent from `trim_left/right`. Three releases means that even nightly users (including rustc itself) get a full cycle from when the announcement is made in the stable release to when nightly starts to warn.
2019-07-12 22:46:49 +02:00
Mazdak Farrokhzad
f169b15e1d
Rollup merge of #62431 - czipperz:add-messages-to-must-use-is_-methods, r=scottmcm
...
Add messages to `Option`'s and `Result`'s `must_use` annotation for `is_*`
r? @RalfJung
2019-07-12 22:46:41 +02:00
Josh Stone
74c8d984db
Add tracking issue 62633
2019-07-12 13:07:53 -07:00
Ralf Jung
608249703c
move mem::uninitialized deprecation back by 1 release, to 1.39
2019-07-11 22:24:01 +02:00
Josh Stone
955979ab28
Make cold unwraps take &dyn Debug
2019-07-11 12:40:38 -07:00