Commit Graph

101200 Commits

Author SHA1 Message Date
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
Esteban Küber
0585475efd Avoid ICE when checking Destination of break inside a closure 2019-10-17 18:18:29 -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
Mark Rousskov
6be0a7081a Update API to be more compatible with plugin needs
Move to using Box<dyn Fn() -> ...> so that we can let plugins register
state.

This also adds a callback that'll get called from plugin registration so
that Clippy and other tools can register lints without using the plugin
API. The plugin API still works, but this new API is more compatible
with drivers other than rustc.
2019-10-17 19:41:21 -04:00
Mark Rousskov
b761367d52 Fix test fallout 2019-10-17 19:41:21 -04:00
Mark Rousskov
dab3bd6cda Create lint store during plugin registration
Remove lint store from Session
2019-10-17 19:41:21 -04:00
Mark Rousskov
da56d1d201 Remove all borrows of lint store from Session from librustc
Access through tcx is fine -- by that point, the lint store is frozen,
but direct access through Session will go away in future commits, as
lint store is still mutable in early stages of Session, and will be
removed completely.
2019-10-17 19:41:21 -04:00
Mark Rousskov
c4475c753b Access future incompatibility information directly
Avoid querying LintStore when not necessary
2019-10-17 19:41:21 -04:00
Mark Rousskov
7abb1fafce Remove side table of future incompatibility info
Moves this information to a direct field of Lint, which is where it
belongs.
2019-10-17 19:41:21 -04:00
Mark Rousskov
c1abc30660 Make declare_lint take any amount of boolean fields 2019-10-17 19:41:21 -04:00
Mark Rousskov
aa4ee2cc0f Move to storing constructor functions inside LintStore
This stops storing the pass objects and instead stores constructor
functions.

The primary effect is that LintStore no longer has any interior
mutability.
2019-10-17 19:16:41 -04:00
Mark Rousskov
24545128eb Take lint passes as constructor functions 2019-10-17 19:16:41 -04:00
Mark Rousskov
7fef39791a Make get_lints be a static function
This moves from calling get_lints on instantiated pass objects to the
raw object
2019-10-17 19:16:41 -04:00
Mark Rousskov
68c07db80a No longer implicitly register lints when registering passes
This is in preparation for on-demand constructing passes
2019-10-17 19:16:41 -04:00
Mark Rousskov
e1079c82be Split out just registration to separate function 2019-10-17 19:16:41 -04:00
Mark Rousskov
b060f3b84d Split module and crate late pass registration 2019-10-17 19:16:41 -04:00
Mark Rousskov
748eccd488 Lints being from a plugin is dependent on the lint, not the registration 2019-10-17 19:16:41 -04:00
Mark Rousskov
2121b04751 Handle lints, not passes in push_lints
This extracts the call to get_lints() to callers.
2019-10-17 19:16:41 -04:00
Mark Rousskov
577d442fe8 De-propagate optional session from lint registration
This is straight up removing dead code, but is a separate commit from
the previous to avoid conflating clean up and important changes.
2019-10-17 19:16:40 -04:00
Mark Rousskov
47a443c50d Duplicate lint specifications are always bug!
Replace early_error and sess.err with bug!, in all cases. If the
compiler we're running with, including plugins, is registering something
twice, that's a (compiler/plugin) programmer error -- we should not try
to be nice at the cost of developer ergononomics (hiding the stacktrace
of the second registration is bad).

This also is basically a static bug in ~all cases so it should not be a
detriment to users, including with plugins.
2019-10-17 19:16:40 -04: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
Lucas Henry
a1387e352f Replaced pretty-json error-format with only json 2019-10-17 19:52:29 +02:00
Lucas Henry
46a44668b2 Replaced pretty-json error-format with only json 2019-10-17 19:52:29 +02:00
Lucas Henry
43b5dcaabb Replaced warn attribute by deny 2019-10-17 19:52:06 +02: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
Lucas Henry
b9bca18002 Replaced warn attibute by deny 2019-10-17 19:15:42 +02:00
Igor Aleksanov
cb5733de86 Improve code style 2019-10-17 19:37:01 +03:00
Igor Aleksanov
85628e8063 Add more explaining comments to the code 2019-10-17 19:10:35 +03:00
Igor Aleksanov
ddc6a5fd0e Split options parsing into several functions 2019-10-17 19:10:17 +03:00
Igor Aleksanov
12397e9dd5 Make enum usage explicit and fix tests 2019-10-17 17:47:03 +03: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
Igor Aleksanov
c951882c73 Extract ConsoleTestState 2019-10-17 17:38:44 +03:00
Igor Aleksanov
4d5052203d Split libtest into several smaller modules 2019-10-17 17:38:44 +03:00