Skip to content

Commit bb1e984

Browse files
authored
Rollup merge of #108103 - matthiaskrgr:lice, r=compiler-errors
be nice and don't slice These are already slices, no need to slice them again
2 parents 7bde7b7 + e17cd0c commit bb1e984

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_hir_analysis/src/astconv

1 file changed

+2
-2
lines changed

compiler/rustc_hir_analysis/src/astconv/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
19701970
) = &qself.kind {
19711971
// If the path segment already has type params, we want to overwrite
19721972
// them.
1973-
match &path.segments[..] {
1973+
match &path.segments {
19741974
// `segment` is the previous to last element on the path,
19751975
// which would normally be the `enum` itself, while the last
19761976
// `_` `PathSegment` corresponds to the variant.
@@ -2670,7 +2670,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
26702670
// `Self` in trait or type alias.
26712671
assert_eq!(opt_self_ty, None);
26722672
self.prohibit_generics(path.segments.iter(), |err| {
2673-
if let [hir::PathSegment { args: Some(args), ident, .. }] = &path.segments[..] {
2673+
if let [hir::PathSegment { args: Some(args), ident, .. }] = &path.segments {
26742674
err.span_suggestion_verbose(
26752675
ident.span.shrink_to_hi().to(args.span_ext),
26762676
"the `Self` type doesn't accept type parameters",

0 commit comments

Comments
 (0)