Commit Graph

100867 Commits

Author SHA1 Message Date
Esteban Küber
2b76c8b95f review comments 2019-10-18 13:00:14 -07:00
Esteban Küber
bd813bf1ac review comment: span bug label 2019-10-18 08:38:08 -07:00
Esteban Küber
865c4bcff6 review comments: help wording 2019-10-18 08:36:46 -07:00
Santiago Pastorino
48349960e6
Use Cow to handle modifications of projection in preparation for interning 2019-10-18 10:06:13 -04:00
Wesley Wiser
4d89031e80 [const-prop] Handle MIR Rvalue::Discriminant 2019-10-18 06:29:57 -04:00
Wesley Wiser
a2e3ed5c05 [const-prop] Handle MIR Rvalue::Aggregates 2019-10-18 06:29:57 -04:00
Wesley Wiser
c8f7e18ceb [const-prop] Handle MIR Rvalue::Repeat 2019-10-18 06:29:56 -04:00
bors
518deda77f Auto merge of #64925 - ehuss:document-json, r=Mark-Simulacrum
Document JSON message output.

This documents the JSON messages in the rustc book.
2019-10-18 10:15:26 +00:00
Yuki Okushi
9617014aa6 Clarify diagnostics when using ~ as a unary op 2019-10-18 18:15:16 +09:00
Tobias Rapp
769e75b40c Fix left/right shift typo in wrapping rotate docs
This makes the note similar to the one found on rotate functions for
primitive types like i32/u32.
2019-10-18 08:46:30 +02:00
Nicholas Nethercote
d343ee839b Remove Hash impls for DefPath, DisambiguatedDefPathData, and DefKey.
They aren't used.
2019-10-18 16:36:17 +11:00
Nicholas Nethercote
0879f63074 Remove Copy and Clone impls for LocalInternedString.
They aren't used.
2019-10-18 16:05:14 +11:00
Esteban Küber
f65a492afc Point at enclosing function without self receiver 2019-10-17 20:26:21 -07:00
oxalica
2ee45c9da2
Fix cast of stx_btime.tv_nsec 2019-10-18 10:32:27 +08:00
oxalica
15cb3e08e3
Fix cfgs for current libc 2019-10-18 10:32:27 +08:00
oxalica
43f398be6d
Prefer statx on linux if available 2019-10-18 10:32:27 +08:00
Nicholas Nethercote
3532863a96 Change how Symbol::Debug works.
Currently, `Symbol::Debug` and `Symbol::Display` produce the same
output; neither wraps the symbol in double quotes.

This commit changes `Symbol::Debug` so it wraps the symbol in quotes.
This change brings `Symbol`'s behaviour in line with `String` and
`InternedString`. The change requires a couple of trivial test output
adjustments.
2019-10-18 13:26:03 +11:00
Nicholas Nethercote
d8fca9ee4e Use with in Symbol trait methods.
Instead of `as_str()`, which unnecessarily involves `LocalInternedString`.
2019-10-18 13:26:03 +11:00
Nicholas Nethercote
e4ec4a6da3 Change MetaItem::tokens() to MetaItem::token_trees_and_joints().
Likewise for `NestedMetaItem::tokens()`. Also, add
`MetaItemKind::token_trees_and_joints()`, which `MetaItemKind::tokens()`
now calls.

This avoids some unnecessary `TokenTree` to `TokenStream` conversions,
and removes the need for the clumsy
`TokenStream::append_to_tree_and_joint_vec()`.
2019-10-18 13:25:17 +11:00
Nicholas Nethercote
212ae58f36 Change Lit::tokens() to Lit::token_tree().
Because most of the call sites have an easier time working with a
`TokenTree` instead of a `TokenStream`.
2019-10-18 13:25:17 +11:00
Nicholas Nethercote
a6eef299d3 Make TokenStream::from_iter less general and more efficient.
The current code has this impl:
```
impl<T: Into<TokenStream>> iter::FromIterator<T> for TokenStream
```
If given an `IntoIterator<Item = TokenTree>`, it will convert each individual
`TokenTree` to a `TokenStream` (at the cost of two allocations: a `Vec`
and an `Lrc`). It will then merge those `TokenStream`s into a single
`TokenStream`. This is inefficient.

This commit changes the impl to this less general one:
```
impl iter::FromIterator<TokenTree> for TokenStream
```
It collects the `TokenTree`s into a single `Vec` first and then converts that
to a `TokenStream` by wrapping it in a single `Lrc`. The previous generality
was unnecessary; no other code needs changing.

This change speeds up several benchmarks by up to 4%.
2019-10-18 13:25:17 +11:00
Nicholas Nethercote
d0eaf60d5e Remove two no-op into() calls. 2019-10-18 13:25:17 +11:00
bors
da59656b3b Auto merge of #65533 - Manishearth:clippyup, r=Manishearth
Update clippy

None
2019-10-18 02:15:07 +00:00
Santiago Pastorino
d53fc9cae5
Add process_* place hooks to improve code reutilization 2019-10-17 22:06:56 -04:00
Santiago Pastorino
7fa3425ef6
Setup a different visit place set of methods for mutable and immutable visitors
In particular, use a blank visit_place for mutable visitor to be sure,
non modified visitors are not trying to mutating place.
2019-10-17 22:06:56 -04:00
Santiago Pastorino
4f2a11036d
Remove unneeded callback and just use the new_local value 2019-10-17 22:06:56 -04:00
Santiago Pastorino
2b2e35bfc3
Prepare def_use MutVisitor to have projections interned 2019-10-17 22:06:56 -04:00
Santiago Pastorino
39c9ed3ac1
Prepare erase_regions MutVisitor to have projections interned 2019-10-17 22:06:55 -04:00
Santiago Pastorino
0fc063f159
Prepare generator MutVisitor to have projections interned 2019-10-17 22:06:55 -04:00
Santiago Pastorino
e3e9951673
Prepare inline MutVisitor to have projections interned 2019-10-17 22:06:55 -04:00
Santiago Pastorino
bb7d6d1c70
Prepare renumber MutVisitor to have projections interned 2019-10-17 22:06:55 -04:00
Santiago Pastorino
591cc9aede
Prepare simplify MutVisitor to have projections interned 2019-10-17 22:06:55 -04:00
Santiago Pastorino
e069e9ccac
Prepare promote_consts MutVisitor to have projections interned 2019-10-17 22:06:55 -04:00
Santiago Pastorino
5de9cb0703
super_ty on MutVisitor is empty so avoid the call 2019-10-17 22:06:55 -04:00
Esteban Küber
11011013f2 Refer to "associated functions" instead of "static methods" 2019-10-17 19:03:36 -07:00
Eduard-Mihai Burtescu
cd9e4441eb rustc: arena-allocate the slice in ty::GenericsPredicate, not the whole struct. 2019-10-18 03:14:57 +03:00
Manish Goregaokar
ebf731c638 Update clippy 2019-10-17 16:59:10 -07:00
Dan Gohman
b25e3238c7 Don't add argc and argv arguments to main on WASI.
Add a target setting to allow targets to specify whether the generated
`main` function should be passed `argc` and `argv` arguments. Set it
to false on wasm32-wasi, since WASI's `args::args()` calls into the
WASI APIs itself. This will allow the WASI toolchain to avoid linking
and running command-line argument initialization code when the arguments
aren't actually needed.
2019-10-17 16:16:35 -07:00
Tshepang Lekhonkhobe
c9b27d1236 doc: make BitSet intro more short
Also, add a link to the growable type
2019-10-18 01:16:30 +02:00
Stein Somers
56974329d1 BTreeSet symmetric_difference & union optimized, cleaned 2019-10-18 00:11:32 +02:00
Ralf Jung
c0b7e769a0 example for padding any format 2019-10-17 23:02:09 +02:00
Niko Matsakis
54879949f1
Update triagebot.toml
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
2019-10-17 16:53:47 -04:00
Ralf Jung
4e6efe4811 reorder fmt docs for more clarity 2019-10-17 21:22:46 +02:00
bors
fa0f7d0080 Auto merge of #65495 - Centril:rollup-tguwjt5, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #65237 (Move debug_map assertions after check for err)
 - #65316 (make File::try_clone produce non-inheritable handles on Windows)
 - #65319 (InterpCx: make memory field public)
 - #65461 (Don't recommend ONCE_INIT in std::sync::Once)
 - #65465 (Move syntax::ext to a syntax_expand and refactor some attribute logic)
 - #65475 (add example for type_name)
 - #65478 (fmt::Write is about string slices, not byte slices)
 - #65486 (doc: fix typo in OsStrExt and OsStringExt)

Failed merges:

r? @ghost
2019-10-17 18:53:10 +00:00
Igor Matuszewski
ad6ce46986 save-analysis: Add a relevant test case 2019-10-17 20:49:06 +02:00
Igor Matuszewski
5fe88abed0 save-analysis: Nest tables when processing impl items 2019-10-17 20:48:00 +02:00
Niko Matsakis
a4d94925c7
add option to ping llvm ice-breakers to triagebot 2019-10-17 14:15:59 -04:00
Ralf Jung
868a77263a more consistency and clarification 2019-10-17 19:51:42 +02:00
Ralf Jung
470e9d2789 Rc: value -> allocation 2019-10-17 19:37:05 +02:00
bors
b04338087e Auto merge of #64595 - Mark-Simulacrum:trivial-query, r=pnkfelix
Optimize dropck

This does two things: caches the `trivial_dropck` check by making it a query, and shifts around the implementation of the primary dropck itself to avoid allocating many small vectors.
2019-10-17 14:42:24 +00:00