@@ -170,14 +170,14 @@ impl Qualif for NeedsNonConstDrop {
170
170
171
171
#[ instrument( level = "trace" , skip( cx) , ret) ]
172
172
fn in_any_value_of_ty < ' tcx > ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
173
- // If this doesn't need drop at all, then don't select `~ const Destruct`.
173
+ // If this doesn't need drop at all, then don't select `[ const] Destruct`.
174
174
if !ty. needs_drop ( cx. tcx , cx. typing_env ) {
175
175
return false ;
176
176
}
177
177
178
- // We check that the type is `~ const Destruct` since that will verify that
179
- // the type is both `~ const Drop` (if a drop impl exists for the adt), *and*
180
- // that the components of this type are also `~ const Destruct`. This
178
+ // We check that the type is `[ const] Destruct` since that will verify that
179
+ // the type is both `[ const] Drop` (if a drop impl exists for the adt), *and*
180
+ // that the components of this type are also `[ const] Destruct`. This
181
181
// amounts to verifying that there are no values in this ADT that may have
182
182
// a non-const drop.
183
183
let destruct_def_id = cx. tcx . require_lang_item ( LangItem :: Destruct , cx. body . span ) ;
@@ -203,9 +203,9 @@ impl Qualif for NeedsNonConstDrop {
203
203
fn is_structural_in_adt_value < ' tcx > ( cx : & ConstCx < ' _ , ' tcx > , adt : AdtDef < ' tcx > ) -> bool {
204
204
// As soon as an ADT has a destructor, then the drop becomes non-structural
205
205
// in its value since:
206
- // 1. The destructor may have `~ const` bounds which are not present on the type.
206
+ // 1. The destructor may have `[ const] ` bounds which are not present on the type.
207
207
// Someone needs to check that those are satisfied.
208
- // While this could be instead satisfied by checking that the `~ const Drop`
208
+ // While this could be instead satisfied by checking that the `[ const] Drop`
209
209
// impl holds (i.e. replicating part of the `in_any_value_of_ty` logic above),
210
210
// even in this case, we have another problem, which is,
211
211
// 2. The destructor may *modify* the operand being dropped, so even if we
0 commit comments