about summary refs log tree commit diff
path: root/tests/ui/parser/impls-nested-within-fns-semantic-0.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/impls-nested-within-fns-semantic-0.rs')
-rw-r--r--tests/ui/parser/impls-nested-within-fns-semantic-0.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/parser/impls-nested-within-fns-semantic-0.rs b/tests/ui/parser/impls-nested-within-fns-semantic-0.rs
new file mode 100644
index 00000000000..107380d33c7
--- /dev/null
+++ b/tests/ui/parser/impls-nested-within-fns-semantic-0.rs
@@ -0,0 +1,15 @@
+// Regression test for #121607 and for part of issue #119924.
+//@ check-pass
+
+trait Trait {
+    fn provided() {
+        pub struct Type;
+
+        impl Type {
+            // This visibility qualifier used to get rejected.
+            pub fn perform() {}
+        }
+    }
+}
+
+fn main() {}