//! Regression test for , where a `ref Self` ctor //! makes it possible to hit a `delayed_bug` that was converted into a `span_bug` in //! , and hitting this reveals that we did not have //! test coverage for this specific code pattern (heh) previously. //! //! # References //! //! - ICE bug report: . //! - Previous PR to change `delayed_bug` -> `span_bug`: //! #![crate_type = "lib"] struct Foo; impl Foo { fn fun() { let S { ref Self } = todo!(); //~^ ERROR expected identifier, found keyword `Self` //~| ERROR cannot find struct, variant or union type `S` in this scope } }