]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/rfc-2632-const-trait-impl/issue-92111.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / src / test / ui / rfc-2632-const-trait-impl / issue-92111.rs
index 9bf0886084f912e577c0fe980560a5f1ed213ed9..96a3e386e6e91e25810fe45501074125a0766fbf 100644 (file)
@@ -1,16 +1,10 @@
 // Regression test for #92111.
 //
-// The issue was that we normalize trait bounds before caching
-// results of selection. Checking that `impl Tr for S` requires
-// checking `S: !Drop` because it cannot overlap with the blanket
-// impl. Then we save the (unsatisfied) result from checking `S: Drop`.
-// Then the call to `a` checks whether `S: ~const Drop` but we normalize
-// it to `S: Drop` which the cache claims to be unsatisfied.
-//
 // check-pass
 
 #![feature(const_trait_impl)]
-#![feature(const_fn_trait_bound)]
+
+use std::marker::Destruct;
 
 pub trait Tr {}
 
@@ -22,7 +16,7 @@ pub struct S(i32);
 
 impl Tr for S {}
 
-const fn a<T: ~const Drop>(t: T) {}
+const fn a<T: ~const Destruct>(t: T) {}
 
 fn main() {
     a(S(0));