Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
03f2cf2
Make `--force-warns` a normal lint level option
inquisitivecrystal Jul 8, 2021
07f1e61
Add natvis for NonZero and Wrapping types
wesleywiser Jun 28, 2021
9740dcc
Add natvis for Atomic types
wesleywiser Jun 29, 2021
cad42e0
Add natvis for cell types
wesleywiser Jun 29, 2021
8f1eec3
Fixup natvis for NonNull and Unique types
wesleywiser Jun 29, 2021
f2aba34
Add natvis for Range types
wesleywiser Jun 29, 2021
691ee05
Add natvis for Duration, ManuallyDrop and Pin types
wesleywiser Jun 30, 2021
a6a82c6
Add/improve visualizations for liballoc types
wesleywiser Jun 30, 2021
8500274
Add visualizer for OsString and fixup other string visualizers
wesleywiser Jul 1, 2021
eb3a527
Address review comments
inquisitivecrystal Jul 9, 2021
dbdce6e
Add tests for command line lint control
inquisitivecrystal Jul 9, 2021
d1852e1
Respond to review feedback
wesleywiser Jul 9, 2021
10b536f
ExprUseVisitor: treat ByValue use of Copy types as ImmBorrow
arora-aman Jul 11, 2021
14fdf8a
Add test for `Unique<T>`, weak ref counts and ref counts for `Weak<T>`
wesleywiser Jul 12, 2021
36f51c9
Add test for copy type in move closure
arora-aman Jul 14, 2021
6c3774e
ExprUseVisitor::Delegate consume only when moving
arora-aman Jul 14, 2021
6e357bc
Fix tests for i686
wesleywiser Jul 14, 2021
4b10218
Remove refs from pat slices
camsteffen Jul 14, 2021
c4ac836
PR feedback
arora-aman Jul 15, 2021
75291ee
Update compiler/rustc_typeck/src/expr_use_visitor.rs
nikomatsakis Jul 15, 2021
d49f977
Layout error instead of an ICE for packed and aligned types
tmiasko Mar 20, 2021
59103d1
Fix layout overflow in type declaration
GuillaumeGomez Jul 15, 2021
25e7403
Add regression test for type declaration layout overflow
GuillaumeGomez Jul 15, 2021
5287058
Rollup merge of #83319 - tmiasko:packed-aligned, r=jackh726
GuillaumeGomez Jul 15, 2021
2886cc8
Rollup merge of #86970 - inquisitivecrystal:force-warn, r=davidtwco
GuillaumeGomez Jul 15, 2021
be2eeb1
Rollup merge of #86983 - wesleywiser:natvis_std_types, r=michaelwoeri…
GuillaumeGomez Jul 15, 2021
5dd7ca3
Rollup merge of #87069 - sexxi-goose:copy_ref_always, r=nikomatsakis
GuillaumeGomez Jul 15, 2021
afbb612
Rollup merge of #87140 - camsteffen:pat-slice-refs, r=oli-obk
GuillaumeGomez Jul 15, 2021
86101d8
Rollup merge of #87162 - GuillaumeGomez:type-decl-overflow, r=notriddle
GuillaumeGomez Jul 15, 2021
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
Address review comments
  • Loading branch information
inquisitivecrystal committed Jul 9, 2021
commit eb3a52778d2848afbc3701481b9c83fe5c153ade
13 changes: 2 additions & 11 deletions compiler/rustc_lint/src/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ use rustc_span::symbol::{sym, Symbol};
use rustc_span::{source_map::MultiSpan, Span, DUMMY_SP};
use tracing::debug;

use std::cmp;

fn lint_levels(tcx: TyCtxt<'_>, (): ()) -> LintLevelMap {
let store = unerased_lint_store(tcx);
let crate_attrs = tcx.hir().attrs(CRATE_HIR_ID);
Expand Down Expand Up @@ -91,12 +89,6 @@ impl<'s> LintLevelsBuilder<'s> {
for &(ref lint_name, level) in &sess.opts.lint_opts {
store.check_lint_name_cmdline(sess, &lint_name, level, self.crate_attrs);
let orig_level = level;

// If the cap is less than this specified level, e.g., if we've got
// `--cap-lints allow` but we've also got `-D foo` then we ignore
// this specification as the lint cap will set it to allow anyway.
let level = cmp::min(level, self.sets.lint_cap);

let lint_flag_val = Symbol::intern(lint_name);

let ids = match store.find_lints(&lint_name) {
Expand All @@ -105,9 +97,8 @@ impl<'s> LintLevelsBuilder<'s> {
};
for id in ids {
// ForceWarn and Forbid cannot be overriden
match specs.get(&id) {
Some((Level::ForceWarn | Level::Forbid, _)) => continue,
_ => (),
if let Some((Level::ForceWarn | Level::Forbid, _)) = specs.get(&id) {
continue;
}

self.check_gated_lint(id, DUMMY_SP);
Expand Down