Make hir::PathSegment::res
non-optional.
This commit is contained in:
parent
ee244bf196
commit
6d850d936b
20 changed files with 65 additions and 76 deletions
|
@ -118,8 +118,7 @@ impl<'tcx> LateLintPass<'tcx> for TyTyKind {
|
|||
_: rustc_hir::HirId,
|
||||
) {
|
||||
if let Some(segment) = path.segments.iter().nth_back(1)
|
||||
&& let Some(res) = &segment.res
|
||||
&& lint_ty_kind_usage(cx, res)
|
||||
&& lint_ty_kind_usage(cx, &segment.res)
|
||||
{
|
||||
let span = path.span.with_hi(
|
||||
segment.args.map_or(segment.ident.span, |a| a.span_ext).hi()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue