bors
fe8bc17801
auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwalton
...
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28 20:11:34 +00:00
Alex Crichton
0dfc90ab15
Rename all raw pointers as necessary
2014-06-28 11:53:58 -07:00
Huon Wilson
64019e764f
rustc: update the unnecessary parens lint for struct literals.
...
Things like `match X { x: 1 } { ... }` now need to be written with
parentheses, so the lint should avoid warning in cases like that.
2014-06-27 16:43:05 +10:00
Keegan McAllister
7e694e7115
More upstream lint changes
2014-06-24 11:36:28 -07:00
Keegan McAllister
2f274d11ba
Implement lint plugins
2014-06-24 11:36:28 -07:00
Keegan McAllister
51d438e568
Incorporate upstream changes to old lint code
2014-06-24 11:36:28 -07:00
Keegan McAllister
e67e6e678d
List builtin lints one per line for better diffs
2014-06-24 11:36:28 -07:00
Keegan McAllister
c747626ced
Reindent function call continuations, and other style fixes
2014-06-24 11:36:27 -07:00
Keegan McAllister
ba1c0c4232
Drop the ExportedItems argument from LintPass::check_crate
...
None of the builtin lints use this, and it's now available through the Context.
2014-06-24 11:36:27 -07:00
Keegan McAllister
6fede93475
Make the crate and its exported items available in the lint context
2014-06-24 11:36:27 -07:00
Keegan McAllister
a813a3779b
Rework lint attr parsing and use it in middle::dead
2014-06-24 11:36:27 -07:00
Keegan McAllister
b5542f7f5b
Convert builtin lints to uppercase names for style consistency
2014-06-24 11:36:27 -07:00
Keegan McAllister
21e7b936d3
Use names in Lint structs in an ASCII-case-insensitive way
...
In preparation for the next commit.
2014-06-24 11:36:27 -07:00
Keegan McAllister
609552e195
Run lint passes using the Option dance instead of RefCells
2014-06-24 11:36:27 -07:00
Keegan McAllister
c1898b9acb
Stop using Default for initializing builtin lints
...
It wasn't a very appropriate use of the trait. Instead, just enumerate
unit structs and those with a `fn new()` separately.
2014-06-24 11:36:27 -07:00
Keegan McAllister
c7af6060dd
Clean up and document the public lint API
...
Also change some code formatting.
lint::builtin becomes a sibling of lint::context in order to ensure that lints
implemented there use the same public API as lint plugins.
2014-06-24 11:36:27 -07:00
Keegan McAllister
819f76ca82
Store the registered lints in the Session
2014-06-24 11:36:27 -07:00
Keegan McAllister
442fbc473e
Replace enum LintId with an extensible alternative
2014-06-24 10:25:15 -07:00
Keegan McAllister
69b6bc5eee
Convert lints to a trait-based infrastructure
...
The immediate benefits are
* moving the state specific to a single lint out of Context, and
* replacing the soup of function calls in the Visitor impl with
more structured control flow
But this is also a step towards loadable lints.
2014-06-24 10:24:03 -07:00
Keegan McAllister
5d4c96a8f2
Rename lint::Lint to lint::LintId
2014-06-24 10:24:03 -07:00
Keegan McAllister
3144614f0b
Move lint infrastructure and individual lints into separate files
2014-06-24 10:24:03 -07:00
Keegan McAllister
75bfedaef5
Move lint.rs out of middle
...
We're going to have more modules under lint, and the paths get unwieldy. We
also plan to have lints run at multiple points in the compilation pipeline.
2014-06-24 10:22:49 -07:00