drive-by: use is_const and is_const_if_const
This commit is contained in:
parent
1ab97dbc52
commit
c6de4d55aa
7 changed files with 16 additions and 15 deletions
|
@ -1173,9 +1173,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
ImplCandidate(def_id)
|
||||
if tcx.impl_constness(def_id) == hir::Constness::Const => {}
|
||||
// const param
|
||||
ParamCandidate(trait_pred)
|
||||
if trait_pred.skip_binder().constness
|
||||
== ty::BoundConstness::ConstIfConst => {}
|
||||
ParamCandidate(trait_pred) if trait_pred.is_const_if_const() => {}
|
||||
// auto trait impl
|
||||
AutoImplCandidate(..) => {}
|
||||
// generator, this will raise error in other places
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue