bors
ca6a984261
Auto merge of #48842 - petrochenkov:under, r=nikomatsakis
...
syntax: Make `_` a reserved identifier
Why:
- Lexically `_` is an identifier.
- Internally it makes implementation of `use Trait as _;` (https://github.com/rust-lang/rust/issues/48216 ) and some other things cleaner.
- We prevent the externally observable effect of `_` being accepted by macros expecting `ident` by treating `_` specially in the `ident` matcher:
```rust
macro_rules! m {
($i: ident) => { let $i = 10; }
}
m!(_); // Still an error
```
2018-03-17 23:22:57 +00:00
Simon Sapin
73c053786d
Remove deprecated unstable ptr::Shared type alias.
...
It has been deprecated for about one release cycle.
2018-03-17 23:59:35 +01:00
Scott McMurray
b4981923a0
Add a -Z flag for LLVM align attributes on arguments
...
LLVM seems to still put the assume calls in when inlining, so this probably isn't in a place where it can be turned on by default, but it's interesting to experiment with.
For example, this makes `swap::<u64x8>` be 8x `vmovaps ymm` instead of 16x `vmovups xmm`, on my cpu.
2018-03-17 15:34:12 -07:00
Simon Sapin
7cf1f18cb9
Test NonZero in a const item in a pattern.
...
(This was buggy before https://github.com/rust-lang/rust/pull/46882 )
2018-03-17 23:07:40 +01:00
Simon Sapin
6d682c9adc
Stop using deprecated NonZero APIs
...
These will eventually be removed
(though the NonZero<T> lang item will likely stay).
2018-03-17 23:07:40 +01:00
Simon Sapin
22f7a02958
Deprecate core::nonzero in favor of ptr::NonNull and num::NonZero*
2018-03-17 23:07:40 +01:00
Simon Sapin
67f46ce112
Use num::NonZero* instead of NonZero<_> in rustc and tests
2018-03-17 23:07:40 +01:00
Simon Sapin
2d13ddb6e1
Use NonNull<_> instead of NonZero<*const _> in btree internals
2018-03-17 23:07:40 +01:00
Simon Sapin
f40877feeb
Add 12 num::NonZero* types for each primitive integer
...
RFC: https://github.com/rust-lang/rfcs/pull/2307
2018-03-17 23:07:38 +01:00
John Kåre Alsaker
e09c2ff3f8
Make interners thread-safe
2018-03-17 23:02:27 +01:00
John Kåre Alsaker
ec4a9c6b2f
Minor cleanup
2018-03-17 23:01:55 +01:00
John Kåre Alsaker
37f9c7ff82
Add OnDrop
2018-03-17 23:01:55 +01:00
John Kåre Alsaker
8e5eb025a2
Add an Default impl for Lock
2018-03-17 23:01:54 +01:00
John Kåre Alsaker
697d3bee96
Replace Rc with Lrc
2018-03-17 23:01:54 +01:00
John Kåre Alsaker
1551ef1812
Don't get the global lock in the fast case
2018-03-17 23:01:54 +01:00
John Kåre Alsaker
1dbc84d006
Remove rustc_global!
2018-03-17 23:01:53 +01:00
John Kåre Alsaker
3fa69c935d
Make Span and Symbol implement Send and Sync
2018-03-17 23:01:46 +01:00
varkor
b57ea56159
Stabilise FromUtf8Error::as_bytes
...
Closes #40895 .
2018-03-17 21:41:14 +00:00
Vadim Petrochenkov
a02b1d7e2b
Add some docs + Fix rebase
2018-03-17 22:29:15 +03:00
Vadim Petrochenkov
636357b09a
Cleanup import parsing
...
Fix spans of root segments
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
f88162654d
Rename Span::empty
to Span::shrink_to_lo
, add Span::shrink_to_hi
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
e5fb13897d
AST: Keep distinction between path
and ::path
in imports and visibilities
...
Add the root segment for name resolution purposes only
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
b057c554ab
AST: Make renames in imports closer to the source
...
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
c6c6cf9515
AST/HIR: Clarify what the optional name in extern crate items mean
2018-03-17 22:12:21 +03:00
Vadim Petrochenkov
ed5ea5c705
Reject _
in ident
matcher
2018-03-17 22:08:18 +03:00
Vadim Petrochenkov
5d06c890fe
syntax: Make _
an identifier
2018-03-17 22:08:07 +03:00
Yukio Siraichi
fab7020bd9
Add span_suggestion while removing TyRefs based on the snippet String.
2018-03-17 15:53:33 -03:00
Niv Kaminer
d5b55c1159
remove FIXME( #27889 ) since the issue is already fixed
2018-03-17 20:25:23 +02:00
Niv Kaminer
c8be5c3174
remove FIXME( #8372 ) since for-loops wont support borrowing iterators
2018-03-17 20:25:23 +02:00
Niv Kaminer
be73a1f963
remove FIXME( #33435 ) and remove the spurious failures counter measure
2018-03-17 20:25:07 +02:00
Niv Kaminer
0d8fa82eab
remove FIXME( #48116 ) and remove the logic to debug the issue
2018-03-17 20:24:49 +02:00
Niv Kaminer
2c6b7b9323
remove FIXME( #2543 ) and avoid bad copies
2018-03-17 20:24:49 +02:00
Niv Kaminer
fd007559db
remove FIXME( #11094 ) and allow make tests to run on targets besides host
2018-03-17 20:24:49 +02:00
Niv Kaminer
69d12a2b97
remove FIXME( #30046 ) and infer moves on pattern matching
2018-03-17 20:24:49 +02:00
Niv Kaminer
622c44510f
remove FIXME( #37712 ) and implement ItemLikeVisitor instead of Visitor
2018-03-17 20:24:49 +02:00
Niv Kaminer
4a06708d30
remove FIXME( #39119 ) and allow running test on emscripten
2018-03-17 20:24:49 +02:00
Niv Kaminer
3753e1a55a
update FIXME( #5244 ) to point to RFC 1109 (Non-Copy array creation ergonomics)
2018-03-17 20:24:49 +02:00
Niv Kaminer
e1b9bf0702
update FIXME( #23442 ) to point to issue 45742 (Blanket impl of AsRef for Deref)
2018-03-17 20:24:49 +02:00
Niv Kaminer
d1dacddfc7
update FIXME( #7622 ) to point to issue 44580 (tracking issue for const generics)
2018-03-17 20:24:49 +02:00
Niv Kaminer
ba836f4b5f
update FIXME( #15760 ) to point to issue 27336 (tracking issue for Default Type Parameter Fallback)
2018-03-17 20:24:49 +02:00
Niv Kaminer
7278e37d38
update FIXME( #6393 ) to point to issue 43234 (tracking issue for non-lexical lifetimes)
2018-03-17 20:24:27 +02:00
Alex Crichton
6fd4d67819
rustbuild: Tweak where timing information goes
...
This commit tweaks where timing and step information is printed out as part of
the build, ensuring that we do it as close to the location where work happens as
possible. In rustbuild various functions may perform long blocking work as
dependencies are assembled, so if we print out timing information early on we
may accidentally time more than just the step we were intending to time!
2018-03-17 10:59:41 -07:00
bors
adf2135adc
Auto merge of #48936 - Zoxc:cstore, r=michaelwoerister
...
Make CrateMetadata and CStore thread-safe
r? @michaelwoerister
2018-03-17 17:30:14 +00:00
csmoe
9f5a356c1d
improve attribute trailing semicolon error
2018-03-17 21:23:41 +08:00
Martin Hoffmann
d664b8954e
Rewrite the documentation for BorrowMut.
2018-03-17 14:09:45 +01:00
Martin Hoffmann
5bef034b19
Bring back the phrase 'borrowing as' for what Borrow does.
2018-03-17 14:05:24 +01:00
John Kåre Alsaker
f53d4af223
Remove unused imports
2018-03-17 14:03:37 +01:00
Simon Sapin
89ecb0d542
Mark deprecated unstable SipHasher13 as a doc-hidden impl detail of HashMap.
...
It stays in libcore rather than being private in HashMap’s module
because it shares code with the deprecated *stable* `SipHasher` type.
2018-03-17 13:04:13 +01:00
bors
61b6bf54fd
Auto merge of #49106 - kennytm:rollup, r=kennytm
...
Rollup of 8 pull requests
- Successful merges: #48943 , #48960 , #48983 , #49055 , #49057 , #49077 , #49082 , #49083
- Failed merges:
2018-03-17 11:39:38 +00:00
Simon Sapin
e09dbbc39e
Add an example of lossy decoding to str::Utf8Error docs
2018-03-17 11:17:11 +01:00