mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 21:48:54 +00:00
16 lines
424 B
Rust
16 lines
424 B
Rust
//! Tests that multiple derefs in a projection does not cause an ICE
|
|
//! when checking const precise drops.
|
|
//!
|
|
//! Regression test for <https://github.com/rust-lang/rust/issues/147733>
|
|
|
|
#![feature(const_precise_live_drops)]
|
|
struct Foo(u32);
|
|
impl Foo {
|
|
const fn get(self: Box<&Self>, f: &u32) -> u32 {
|
|
//~^ ERROR destructor of `Box<&Foo>` cannot be evaluated at compile-time
|
|
self.0
|
|
}
|
|
}
|
|
|
|
fn main() {}
|