about summary refs log tree commit diff
path: root/tests/ui/statics/nested_struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/statics/nested_struct.rs')
-rw-r--r--tests/ui/statics/nested_struct.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/ui/statics/nested_struct.rs b/tests/ui/statics/nested_struct.rs
new file mode 100644
index 00000000000..f5819f50789
--- /dev/null
+++ b/tests/ui/statics/nested_struct.rs
@@ -0,0 +1,24 @@
+//@ check-pass
+/// oli-obk added this test after messing up the interner logic
+/// around mutability of nested allocations. This was not caught
+/// by the test suite, but by trying to build stage2 rustc.
+/// There is no real explanation for this test, as it was just
+/// a bug during a refactoring.
+
+pub struct Lint {
+    pub name: &'static str,
+    pub desc: &'static str,
+    pub report_in_external_macro: bool,
+    pub is_loaded: bool,
+    pub crate_level_only: bool,
+}
+
+static FOO: &Lint = &Lint {
+    name: &"foo",
+    desc: "desc",
+    report_in_external_macro: false,
+    is_loaded: true,
+    crate_level_only: false,
+};
+
+fn main() {}