From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../incremental/static_refering_to_other_static3/issue.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/incremental/static_refering_to_other_static3/issue.rs (limited to 'tests/incremental/static_refering_to_other_static3') diff --git a/tests/incremental/static_refering_to_other_static3/issue.rs b/tests/incremental/static_refering_to_other_static3/issue.rs new file mode 100644 index 000000000..80999813d --- /dev/null +++ b/tests/incremental/static_refering_to_other_static3/issue.rs @@ -0,0 +1,15 @@ +// revisions:rpass1 rpass2 + +#[cfg(rpass1)] +pub static A: u8 = 42; +#[cfg(rpass2)] +pub static A: u8 = 43; + +static B: &u8 = &C.1; +static C: (&&u8, u8) = (&B, A); + +fn main() { + assert_eq!(*B, A); + assert_eq!(**C.0, A); + assert_eq!(C.1, A); +} -- cgit v1.2.3