Commit Graph

412 Commits

Author SHA1 Message Date
Ivan Radanov Ivanov
7496539a00 Change span_help calls to fileline_help where appropriate 2015-03-03 15:18:33 +02:00
Florian Zeitz
f35f973cb7 Use consts instead of statics where appropriate
This changes the type of some public constants/statics in libunicode.
Notably some `&'static &'static [(char, char)]` have changed
to `&'static [(char, char)]`. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]
2015-03-02 17:11:51 +01:00
Manish Goregaokar
fb28214dcc Rollup merge of #22893 - Ms2ger:lints, r=huonw 2015-03-02 03:54:00 +05:30
Ivan Petkov
2fc6224411 Rename LintPass::check_trait_method to check_trait_item
Traits can have associated types and not just methods. This
clarification reflects the the type of the input the method accepts.

[breaking-change]
2015-02-28 13:56:37 -08:00
Ms2ger
fe2e0976de Use if-let for UnusedImportBraces. 2015-02-28 13:32:34 +01:00
Ms2ger
8a7b6b3ee6 Collapse nested matches in method_context. 2015-02-28 13:32:18 +01:00
Ms2ger
f38b83b360 Avoid unnecessary mutability for UnusedResults. 2015-02-28 13:31:55 +01:00
Ms2ger
2a37f7f07c Add a comment to code that confused me. 2015-02-28 13:31:27 +01:00
Ms2ger
57e0248d34 Various formatting cleanup. 2015-02-28 13:31:14 +01:00
Ms2ger
4dad9077cc Qualify uses of MethodContext variants. 2015-02-28 12:17:11 +01:00
Huon Wilson
39092530a4 Update docs for rustc_lint crateification. 2015-02-28 15:34:00 +11:00
Huon Wilson
532cd5f85a Separate most of rustc::lint::builtin into a separate crate.
This pulls out the implementations of most built-in lints into a
separate crate, to reduce edit-compile-test iteration times with
librustc_lint and increase parallelism. This should enable lints to be
refactored, added and deleted much more easily as it slashes the
edit-compile cycle to get a minimal working compiler to test with (`make
rustc-stage1`) from

    librustc -> librustc_typeck -> ... -> librustc_driver ->
        libcore -> ... -> libstd

to

    librustc_lint -> librustc_driver -> libcore -> ... libstd

which is significantly faster, mainly due to avoiding the librustc build
itself.

The intention would be to move as much as possible of the infrastructure
into the crate too, but the plumbing is deeply intertwined with librustc
itself at the moment. Also, there are lints for which diagnostics are
registered directly in the compiler code, not in their own crate
traversal, and their definitions have to remain in librustc.

This is a [breaking-change] for direct users of the compiler APIs:
callers of `rustc::session::build_session` or
`rustc::session::build_session_` need to manually call
`rustc_lint::register_builtins` on their return value.

This should make #22206 easier.
2015-02-28 15:33:59 +11:00