Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl LintPass for TopLevelRefPass {

impl LateLintPass for TopLevelRefPass {
fn check_fn(&mut self, cx: &LateContext, k: FnKind, decl: &FnDecl, _: &Block, _: Span, _: NodeId) {
if let FnKind::Closure = k {
if let FnKind::Closure(_) = k {
// Does not apply to closures
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/new_without_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl LateLintPass for NewWithoutDefault {
return;
}

if let FnKind::Method(name, _, _) = kind {
if let FnKind::Method(name, _, _, _) = kind {
if decl.inputs.is_empty() && name.as_str() == "new" {
let self_ty = cx.tcx.lookup_item_type(cx.tcx.map.local_def_id(cx.tcx.map.get_parent(id))).ty;

Expand Down