rollup merge of #18527 : bkoropoff/issue-18490
This commit is contained in:
commit
bb7805f58f
2 changed files with 32 additions and 1 deletions
|
|
@ -187,7 +187,11 @@ pub fn check_object_safety(tcx: &ty::ctxt, object_trait: &ty::TyTrait, span: Spa
|
|||
receiver through a trait object", method_name))
|
||||
}
|
||||
|
||||
ty::StaticExplicitSelfCategory |
|
||||
ty::StaticExplicitSelfCategory => {
|
||||
// Static methods are always object-safe since they
|
||||
// can't be called through a trait object
|
||||
return msgs
|
||||
}
|
||||
ty::ByReferenceExplicitSelfCategory(..) |
|
||||
ty::ByBoxExplicitSelfCategory => {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue