summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/type_not_in_scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/type_not_in_scope.rs')
-rw-r--r--src/test/ui/const-generics/type_not_in_scope.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/type_not_in_scope.rs b/src/test/ui/const-generics/type_not_in_scope.rs
new file mode 100644
index 000000000..593370180
--- /dev/null
+++ b/src/test/ui/const-generics/type_not_in_scope.rs
@@ -0,0 +1,11 @@
+impl X {
+ //~^ ERROR cannot find type
+ fn getn<const N: usize>() -> [u8; N] {
+ getn::<N>()
+ }
+}
+fn getn<const N: cfg_attr>() -> [u8; N] {}
+//~^ ERROR expected type, found built-in attribute `cfg_attr`
+//~| ERROR mismatched types
+
+fn main() {}