//! R4(b) is refused by the macro, not by the borrow checker. //! //! Wiki `quasi-declare-form` section 11 reproduced the defect and measured its //! incidence at zero written-out pairs across the ratified 514 shapes. So this //! is a guard against reintroduction: nobody writes the split form today, and //! the trap is only sprung on re-authoring. //! //! It has to be a compile-fail harness rather than an ordinary test, because //! what is being asserted is *which* error comes out. Both a refused pair and //! an accepted one fail to compile; the difference is that one names `label` //! in the declaration and the other names a `let` in generated code that the //! author never wrote and cannot find. #[test] fn a_complementary_pair_sharing_an_owned_binding_is_refused() { let cases = trybuild::TestCases::new(); cases.compile_fail("tests/ui/complementary_pair.rs"); cases.pass("tests/ui/exclusive_dispatch.rs"); }