Skip to content

Commit 02bdbc2

Browse files
committed
review comment: use or patterns
1 parent 9580059 commit 02bdbc2

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
@@ -395,10 +395,8 @@ impl<'tcx> TyCtxt<'tcx> {
395395
(ty::Param(_), ty::Projection(_)) | (ty::Projection(_), ty::Param(_)) => {
396396
db.note("you might be missing a type parameter or trait bound");
397397
}
398-
(ty::Param(p), ty::Dynamic(..))
399-
| (ty::Dynamic(..), ty::Param(p))
400-
| (ty::Param(p), ty::Opaque(..))
401-
| (ty::Opaque(..), ty::Param(p)) => {
398+
(ty::Param(p), ty::Dynamic(..) | ty::Opaque(..))
399+
| (ty::Dynamic(..) | ty::Opaque(..), ty::Param(p)) => {
402400
let generics = self.generics_of(body_owner_def_id);
403401
let p_span = self.def_span(generics.type_param(p, self).def_id);
404402
if !sp.contains(p_span) {

0 commit comments

Comments
 (0)