Skip to content

Rollup of 5 pull requests #68134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7a46a0b
Inline catching panics into std::catch_unwind
Mark-Simulacrum Dec 26, 2019
e177b91
Avoid over-aligning the return value in the -Cpanic=abort case
Mark-Simulacrum Dec 26, 2019
85ec3ec
Test catch_unwind vanishing
Amanieu Dec 26, 2019
3109036
Ignore PAL lint for std::panicking
Mark-Simulacrum Dec 26, 2019
f3da0ea
Mark cleanup cold
Mark-Simulacrum Dec 26, 2019
5e320df
fixup! Inline catching panics into std::catch_unwind
Mark-Simulacrum Dec 26, 2019
4ad9a3c
Fix some minor issues
Amanieu Dec 26, 2019
5be658a
Ignore broken no-landing-pads test
Amanieu Dec 29, 2019
da5b1a4
Apply review feedback
Amanieu Jan 7, 2020
8212bd2
Update some of Cargo's dependencies
alexcrichton Jan 8, 2020
088a180
Add suggestions when encountering chained comparisons
varkor Jan 11, 2020
3a2af32
canonicalize some lint imports
Centril Jan 5, 2020
b93addb
move in_derive_expansion as Span method
Centril Jan 9, 2020
c151782
reduce diversity in linting methods
Centril Jan 9, 2020
6f1a79c
GlobalCtxt: Erase `LintStore` type.
Centril Jan 9, 2020
03bdfe9
move logic to LintLevelsBuilder
Centril Jan 9, 2020
f577b44
move LintSource to levels
Centril Jan 9, 2020
eee84fe
move struct_lint_level to levels.rs
Centril Jan 9, 2020
16bf278
inline maybe_lint_level_root
Centril Jan 9, 2020
03dfa64
lints: promote levels.rs to lint.rs & extract passes.rs
Centril Jan 9, 2020
8c12c42
{rustc::lint -> rustc_lint}::internal
Centril Jan 9, 2020
f58db20
move rustc::lint::{context, passes} to rustc_lint.
Centril Jan 9, 2020
b592359
lints: move a comment
Centril Jan 9, 2020
8be2a04
pacify the parallel compiler
Centril Jan 9, 2020
51078ce
fix ui-fulldeps & tests fallout
Centril Jan 10, 2020
74823fc
Diagnostics should start lowercase
varkor Jan 10, 2020
84c8849
Diagnostics should not end with a full stop
varkor Jan 10, 2020
7876fa6
Add backticks in appropriate places
varkor Jan 10, 2020
7d2c75d
Fix formatting ellipses at the end of some diagnostics
varkor Jan 10, 2020
a6924c7
Appease tidy
varkor Jan 10, 2020
6ea4dba
Update `output-default.json` and rustdoc test
varkor Jan 10, 2020
b14b8db
Rollup merge of #67502 - Mark-Simulacrum:opt-catch, r=alexcrichton
Centril Jan 11, 2020
2211f22
Rollup merge of #68012 - alexcrichton:update-some-deps, r=Mark-Simula…
Centril Jan 11, 2020
7f81ad9
Rollup merge of #68045 - Centril:liberate-lints, r=Mark-Simulacrum
Centril Jan 11, 2020
235b5be
Rollup merge of #68096 - varkor:diagnostic-cleanup, r=Centril
Centril Jan 11, 2020
950c1cf
Rollup merge of #68108 - varkor:chained-comparison-suggestions, r=Cen…
Centril Jan 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lints: move a comment
  • Loading branch information
Centril committed Jan 11, 2020
commit b59235975e43ef5f3ea9436a62f4f07ee5b9a63e
26 changes: 21 additions & 5 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
//! # Lints in the Rust compiler
//! Lints, aka compiler warnings.
//!
//! This currently only contains the definitions and implementations
//! of most of the lints that `rustc` supports directly, it does not
//! contain the infrastructure for defining/registering lints. That is
//! available in `rustc::lint` and `rustc_driver::plugin` respectively.
//! A 'lint' check is a kind of miscellaneous constraint that a user _might_
//! want to enforce, but might reasonably want to permit as well, on a
//! module-by-module basis. They contrast with static constraints enforced by
//! other phases of the compiler, which are generally required to hold in order
//! to compile the program at all.
//!
//! Most lints can be written as `LintPass` instances. These run after
//! all other analyses. The `LintPass`es built into rustc are defined
//! within `rustc_session::lint::builtin`,
//! which has further comments on how to add such a lint.
//! rustc can also load user-defined lint plugins via the plugin mechanism.
//!
//! Some of rustc's lints are defined elsewhere in the compiler and work by
//! calling `add_lint()` on the overall `Session` object. This works when
//! it happens before the main lint pass, which emits the lints stored by
//! `add_lint()`. To emit lints after the main lint pass (from codegen, for
//! example) requires more effort. See `emit_lint` and `GatherNodeLevels`
//! in `context.rs`.
//!
//! Some code also exists in `rustc_session::lint`, `rustc::lint`.
//!
//! ## Note
//!
Expand Down
20 changes: 0 additions & 20 deletions src/librustc_lint/passes.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
//! Lints, aka compiler warnings.
//!
//! A 'lint' check is a kind of miscellaneous constraint that a user _might_
//! want to enforce, but might reasonably want to permit as well, on a
//! module-by-module basis. They contrast with static constraints enforced by
//! other phases of the compiler, which are generally required to hold in order
//! to compile the program at all.
//!
//! Most lints can be written as `LintPass` instances. These run after
//! all other analyses. The `LintPass`es built into rustc are defined
//! within `builtin.rs`, which has further comments on how to add such a lint.
//! rustc can also load user-defined lint plugins via the plugin mechanism.
//!
//! Some of rustc's lints are defined elsewhere in the compiler and work by
//! calling `add_lint()` on the overall `Session` object. This works when
//! it happens before the main lint pass, which emits the lints stored by
//! `add_lint()`. To emit lints after the main lint pass (from codegen, for
//! example) requires more effort. See `emit_lint` and `GatherNodeLevels`
//! in `context.rs`.

use crate::context::{EarlyContext, LateContext};

use rustc_data_structures::sync;
Expand Down