From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../issue-65035-static-with-parent-generics.rs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/test/ui/resolve/issue-65035-static-with-parent-generics.rs (limited to 'src/test/ui/resolve/issue-65035-static-with-parent-generics.rs') diff --git a/src/test/ui/resolve/issue-65035-static-with-parent-generics.rs b/src/test/ui/resolve/issue-65035-static-with-parent-generics.rs new file mode 100644 index 000000000..f96c04841 --- /dev/null +++ b/src/test/ui/resolve/issue-65035-static-with-parent-generics.rs @@ -0,0 +1,26 @@ +fn f() { + extern "C" { + static a: *const T; + //~^ ERROR can't use generic parameters from outer function + } +} + +fn g() { + static a: *const T = Default::default(); + //~^ ERROR can't use generic parameters from outer function +} + +fn h() { + extern "C" { + static a: [u8; N]; + //~^ ERROR can't use generic parameters from outer function + } +} + +fn i() { + static a: [u8; N] = [0; N]; + //~^ ERROR can't use generic parameters from outer function + //~| ERROR can't use generic parameters from outer function +} + +fn main() {} -- cgit v1.2.3