Skip to content

Commit ee96b8b

Browse files
committed
review comment: use or patterns
1 parent 31b3566 commit ee96b8b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustc_middle/ty/error.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,8 @@ impl<'tcx> TyCtxt<'tcx> {
404404
(ty::Param(_), ty::Projection(_)) | (ty::Projection(_), ty::Param(_)) => {
405405
db.note("you might be missing a type parameter or trait bound");
406406
}
407-
(ty::Param(p), ty::Dynamic(..))
408-
| (ty::Dynamic(..), ty::Param(p))
409-
| (ty::Param(p), ty::Opaque(..))
410-
| (ty::Opaque(..), ty::Param(p)) => {
407+
(ty::Param(p), ty::Dynamic(..) | ty::Opaque(..))
408+
| (ty::Dynamic(..) | ty::Opaque(..), ty::Param(p)) => {
411409
let generics = self.generics_of(body_owner_def_id);
412410
let p_span = self.def_span(generics.type_param(p, self).def_id);
413411
if !sp.contains(p_span) {

0 commit comments

Comments
 (0)