104157 Commits

Author SHA1 Message Date
Alex Crichton
641ccd58c1 Fix signature of __wasilibc_find_relpath
Looks like this function changed upstream, so it needs to be adjusted
for when used by libstd.
2019-12-12 14:48:47 -08:00
Nicholas Nethercote
cb212938d4 Avoid re-processing nodes in find_cycles_from_node. 2019-12-13 08:36:25 +11:00
Nicholas Nethercote
76916d7a4b Remove an unnecessary local variable. 2019-12-13 08:36:25 +11:00
Nicholas Nethercote
4ec87d5cd2 Remove some debug! statements.
Because I am tired of looking at them.
2019-12-13 08:36:25 +11:00
Nicholas Nethercote
7d550445e2 Move functions around.
In particular, it has bugged me for some time that `process_cycles` is
currently located before `mark_still_waiting_nodes` despite being called
afterwards.
2019-12-13 08:36:25 +11:00
Nicholas Nethercote
a8207b1958 Remove NodeState::{Waiting,Done}.
`NodeState` has two states, `Success` and `Done`, that are only used
within `ObligationForest` methods. This commit removes them, and renames
the existing `Waiting` state as `Success`.

We are left with three states: `Pending`, `Success`, and `Error`.
`Success` is augmented with a new `WaitingState`, which indicates when
(if ever) it was last waiting on one or more `Pending` nodes. This
notion of "when" requires adding a "process generation" to
`ObligationForest`; it is incremented on each call to
`process_obligtions`.

This commit is a performance win.

- Most of the benefit comes from `mark_as_waiting` (which the commit
  renames as `mark_still_waiting_nodes`). This function used to do two
  things: (a) change all `Waiting` nodes to `Success`, and (b) mark all
  nodes that depend on a pending node as `Waiting`. In practice, many
  nodes went from `Waiting` to `Success` and then immediately back to
  `Waiting`. The use of generations lets us skip step (a).

- A smaller benefit comes from not having to change nodes to the `Done`
  state in `process_cycles`.
2019-12-13 08:36:25 +11:00
Andy Russell
94630d4c8b
replace serialize with serde in rustdoc 2019-12-12 16:33:25 -05:00
Andrea Canciani
de7fefa04c Minor cleanup in Pattern::{is_prefix_of,is_suffix_of} for char 2019-12-12 21:09:17 +01:00
LeSeulArtichaut
e4abcfbd34 Added missing backticks 2019-12-12 20:56:14 +01:00
LeSeulArtichaut
eac6fac10b Update tests 2019-12-12 20:56:14 +01:00
LeSeulArtichaut
27810e246c Restore note for PartialOrd and PartialEq 2019-12-12 20:56:14 +01:00
LeSeulArtichaut
3bd46f1aec Update UI test expectations 2019-12-12 20:56:14 +01:00
LeSeulArtichaut
cf8c0d7a04 I have to revise left and right 2019-12-12 20:56:14 +01:00
LeSeulArtichaut
8fb729ccda Comply to tidy checks 2019-12-12 20:56:14 +01:00
LeSeulArtichaut
29e5f8e9bc E0369 messages mimics E0277 2019-12-12 20:56:14 +01:00
bors
3eeb8d4f2f Auto merge of #67172 - jethrogb:jb/bootstrap-linker, r=alexcrichton
Bootstrap: change logic for choosing linker and rpath

This is a follow-up from #66957 and #67023. Apparently there was one more location with a hard-coded list of targets to influence linking.

I've filed #67171 to track this madness.

r? @alexcrichton
2019-12-12 19:52:27 +00:00
Mazdak Farrokhzad
054458b48d make visitor uses more robust 2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
74d4fbc5f5 De-fatalize ... parsing.
Also fix error the code description.
2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
e52f902a8a AssocImplKind::{Method -> Fn}. 2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
abf2e7aa95 Remove ast::{Impl,Trait}{Item,ItemKind}. 2019-12-12 18:05:05 +01:00
Mazdak Farrokhzad
35e9e097e7 More c-variadic errors as semantic restrictions. 2019-12-12 18:01:33 +01:00
Mazdak Farrokhzad
3a57a2cca4 ast_validation: move trait item logic to proper place. 2019-12-12 18:01:33 +01:00
Mazdak Farrokhzad
0d41d0fe14 Move allow_c_varadic logic to ast_validation. 2019-12-12 18:01:33 +01:00
Mazdak Farrokhzad
b499a88dfc Unify assoc item visitors more. 2019-12-12 18:01:33 +01:00
Mazdak Farrokhzad
51ccdebe0b Unify associated item parsing more. 2019-12-12 18:00:00 +01:00
Mazdak Farrokhzad
0d8a9d74e3 Unify associated item visitor. 2019-12-12 18:00:00 +01:00
Mazdak Farrokhzad
c6c17e3e00 Simplify nt_to_tokenstream. 2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
76576d401c Unify associated item mut visitors. 2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
9193d7a07e Unify associated item pretty printing. 2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
34d91709b6 parse: refactor fun ret ty & param ty 2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
404013e015 Leave a FIXME re. allow_plus. 2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
fa828d7a05 Relocate is_const_item. 2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
63a9030e7b Unify associated item parsing.
An exception is `fn` params.
2019-12-12 17:54:49 +01:00
Mazdak Farrokhzad
7672bff378 Unify associated function parsing. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
10270bcd30 Fuse associated type parsing. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
2d92aa5535 Fuse associated constant parsing. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
92a372b020 Unify {Impl,Trait}Item as AssocItem. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
39073767a4 Unify {Trait,Impl}ItemKind::TyAlias structures. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
c02fd31302 TraitItemKind::Type -> TraitItemKind::TyAlias. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
f6403c6c76 Use Option in ImplItemKind::Method. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
73557faed2 Use Option in ImplItemKind::Const. 2019-12-12 17:54:48 +01:00
Mazdak Farrokhzad
c4bbe9cbbe Alias TraitItem & ImplItem.
Allow defaultness on trait items syntactically.
2019-12-12 17:54:48 +01:00
Antonio Huete Jimenez
0f47327a69
Remove i686-unknown-dragonfly target 2019-12-12 17:26:11 +01:00
Aaron Hill
47e932b96e
Fix weird implicit dependency between rustllvm and rustc_codegen_llvm
rustllvm relies on the `LLVMRustStringWriteImpl` symbol existing, but
this symbol was previously defined in a *downstream* crate
(rustc_codegen_llvm, which depends on rustc_llvm.

While this somehow worked under the old 'separate bootstrap step for
codegen' scheme, it meant that rustc_llvm could not actually be built by
itself, since it relied linking to the downstream rustc_codegen_llvm
crate.

Now that librustc_codegen_llvm is just a normal crate, we actually try
to build a standalone rustc_llvm when we run tests. This commit moves
`LLVMRustStringWriteImpl` into rustc_llvm (technically the rustllvm
directory, which has its contents built by rustc_llvm). This ensures
that we can build each crate in the graph by itself, without requiring
that any downstream crates be linked in as well.
2019-12-12 10:51:19 -05:00
Ralf Jung
14b2436993 avoid more intermediate allocations in validation errors 2019-12-12 16:48:46 +01:00
Ralf Jung
3ddc0278d3 validation: avoid some intermediate allocations 2019-12-12 16:21:57 +01:00
bors
e9469a6aec Auto merge of #66886 - mark-i-m:simplify-borrow_check-2, r=matthewjasper
Remove the borrow check::nll submodule

NLL is the only borrow checker now, so no need to have a separate submodule.

@rustbot modify labels: +S-blocked

Waiting on #66815
2019-12-12 15:04:36 +00:00
Ralf Jung
b2392aa2fc dont ICE in case of invalid drop fn 2019-12-12 15:23:27 +01:00
Elichai Turkel
0cc8fe5d43
Change fmt docs for more delegations 2019-12-12 16:03:23 +02:00
bors
3eebe058e5 Auto merge of #67079 - nnethercote:optimize-shallow_resolve_changed, r=nikomatsakis
Optimize `shallow_resolve_changed`

r? @nikomatsakis
2019-12-12 11:51:26 +00:00