1213 Commits

Author SHA1 Message Date
David Tolnay
0472c262bc
Flatten a nested if-let 2020-11-01 21:30:30 -08:00
David Tolnay
169bb47773
Clean up control flow of write::gen 2020-11-01 21:07:17 -08:00
David Tolnay
eed76fa82a
Merge pull request #405 from dtolnay/sort
Emit data structures and functions in source order
2020-11-01 21:07:08 -08:00
David Tolnay
e1109d93a1
Emit data structures and functions each in source order 2020-11-01 21:01:20 -08:00
David Tolnay
1b0339c16b
Emit all data structures before all functions 2020-11-01 20:55:07 -08:00
David Tolnay
b8f3f5474c
Merge pull request #404 from dtolnay/namespace
Move set_namespace to individual items
2020-11-01 20:54:58 -08:00
David Tolnay
3ff4fe48a5
Remove namespace from NamespaceEntries 2020-11-01 20:46:49 -08:00
David Tolnay
b63ed5aa2c
Move set_namespace to individual items 2020-11-01 20:46:33 -08:00
David Tolnay
d7a3a18e57
Prefer namespace over ns 2020-11-01 20:45:38 -08:00
David Tolnay
0b9b9f84b6
Specify lifetimes which are connected to OutFile 2020-11-01 20:41:30 -08:00
David Tolnay
ca563ee335
Move Block::ExternC to the individual items 2020-11-01 20:29:35 -08:00
David Tolnay
1f010c6ef0
Move cxxbridge05$exception declaration to builtins 2020-11-01 20:27:57 -08:00
David Tolnay
11bd7ff8d6
Perform exhaustive match in pick_includes_and_builtins 2020-11-01 19:44:58 -08:00
David Tolnay
58711a9563
Move #pragma once to where header block is written 2020-11-01 19:11:37 -08:00
David Tolnay
e279735b79
Standardize on write_ prefix for functions that write to a &mut OutFile 2020-11-01 19:08:37 -08:00
David Tolnay
5a21a98386
Merge pull request #403 from dtolnay/setnamespace
Implement set_namespace helper for OutFile
2020-11-01 18:27:22 -08:00
David Tolnay
118a6a9038
Merge pull request #402 from dtolnay/closeopen
Recognize identical block being closed and opened
2020-11-01 18:23:04 -08:00
David Tolnay
6b5d4dde00
Merge pull request #401 from dtolnay/block
Validate that block begins and ends are correctly paired
2020-11-01 18:16:29 -08:00
David Tolnay
078c90fab6
Implement set_namespace helper for OutFile 2020-11-01 18:09:25 -08:00
David Tolnay
e3b39820d1
Recognize identical block being closed and opened 2020-11-01 18:09:25 -08:00
David Tolnay
2a160e4eff
Pass Block only by Copy 2020-11-01 18:09:25 -08:00
David Tolnay
f02146e4e2
Validate that block begins and ends are correctly paired 2020-11-01 18:09:25 -08:00
David Tolnay
53e593f309
Merge pull request #400 from dtolnay/blockcopy
Borrow syntax tree idents to make Block copyable
2020-11-01 18:09:16 -08:00
David Tolnay
8da98ca66b
Merge pull request #399 from dtolnay/block
Preserve meaning of block boundaries
2020-11-01 17:43:57 -08:00
David Tolnay
97c5b86913
Borrow syntax tree idents to make Block copyable 2020-11-01 17:31:56 -08:00
David Tolnay
92b7b6d575
Condense creation of GeneratedCode 2020-11-01 17:31:56 -08:00
David Tolnay
0c033e3917
Preserve meaning of block boundaries 2020-11-01 17:31:56 -08:00
David Tolnay
ac7188c871
Eliminate need for lifetimes in write::gen signature 2020-11-01 16:58:16 -08:00
David Tolnay
98565a2535
Keep apis usable later in sort_by_inner_namespace 2020-11-01 16:52:08 -08:00
David Tolnay
4ebde54fd3
Rename Namespace::none() to const Namespace::ROOT 2020-11-01 14:24:11 -08:00
David Tolnay
ce7b37ccb7
Remove unneeded cfg test stringified Namespace parser 2020-11-01 14:09:07 -08:00
David Tolnay
047707440c
Simplify gen_namespace_contents' extern block code 2020-11-01 13:52:18 -08:00
David Tolnay
e1476af761
Make Opt accessible via OutFile 2020-11-01 13:49:04 -08:00
David Tolnay
bd9608fd66
Move namespace sorter to alphasort module
To make room for an upcoming topological sorter in a toposort module.
2020-11-01 13:24:19 -08:00
David Tolnay
caab991cbc
Clean up namespace_organizer unit test 2020-11-01 13:22:40 -08:00
David Tolnay
73de7d0d52
Detach sort_by_inner_namespace from NamespaceEntries 2020-11-01 13:07:21 -08:00
David Tolnay
945c3cb903
Touch up sort_by_inner_namespace implementation 2020-11-01 13:05:01 -08:00
David Tolnay
ef796967e8
Remove 'kids' naming 2020-11-01 13:01:33 -08:00
David Tolnay
7943e504d9
Remove 'child' naming 2020-11-01 12:51:31 -08:00
David Tolnay
9e4e7504a0
Clarify the distinction of NamespaceEntries contents 2020-11-01 12:47:42 -08:00
David Tolnay
f8df1bed74
Condense an iter + collect into from_iter 2020-11-01 12:44:36 -08:00
David Tolnay
68a12180a8
Clean up get_ prefix from accessor method name 2020-11-01 12:42:03 -08:00
David Tolnay
6ec4111038
Condense get_namespace's match 2020-11-01 12:40:38 -08:00
David Tolnay
60e7aa67e2
Move non-boilerplate impls out of impls.rs 2020-11-01 12:37:28 -08:00
David Tolnay
fe40ff2b28
Tighten spacing in between forward declarations 2020-11-01 12:35:54 -08:00
David Tolnay
9de98d40ee
Clean up section spacing around namespace entries 2020-11-01 12:35:54 -08:00
David Tolnay
f9d34a11ed
Allow non-static string used as block header 2020-11-01 12:35:53 -08:00
David Tolnay
159e712a54
Format with rustfmt 1.4.22-beta 2020-11-01 12:35:44 -08:00
David Tolnay
7907966838
Switch to namespace = "quoted::path" in docs and tests
To preserve parity with item-level #[namespace = "..."] which is
currently restricted by rustc to a quoted string.
2020-11-01 09:12:05 -08:00
David Tolnay
f6fa7b1a22
Skip ui tests on macOS builder too 2020-11-01 00:29:46 -07:00