about summary refs log tree commit diff
path: root/src/test/ui/const-generics/array-size-in-generic-struct-param.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-01-23 00:04:33 +0000
committerbors <bors@rust-lang.org>2020-01-23 00:04:33 +0000
commite23dd6687f7677a715765bff1fe5e63b906cb96b (patch)
tree7bbb599260f76a958a7365f8e535bd418020253c /src/test/ui/const-generics/array-size-in-generic-struct-param.rs
parentd1e594f4029c6ac8feb7c2acf9f9e04c1b9c493c (diff)
parentbfac73c0a6786644d0a58a12347839d442be26ac (diff)
Auto merge of #68474 - tmandry:rollup-6gmbet6, r=tmandry
Rollup of 10 pull requests

Successful merges:

 - #67195 ([experiment] Add `-Z no-link` flag)
 - #68253 (add bare metal ARM Cortex-A targets to rustc)
 - #68361 (Unbreak linking with lld 9 on FreeBSD 13.0-CURRENT i386)
 - #68388 (Make `TooGeneric` error in WF checking a proper error)
 - #68409 (Micro-optimize OutputFilenames)
 - #68410 (Export weak symbols used by MemorySanitizer)
 - #68425 (Fix try-op diagnostic in E0277 for methods)
 - #68440 (bootstrap: update clippy subcmd decription)
 - #68441 (pprust: use as_deref)
 - #68462 (librustc_mir: don't allocate vectors where slices will do.)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test/ui/const-generics/array-size-in-generic-struct-param.rs')
-rw-r--r--src/test/ui/const-generics/array-size-in-generic-struct-param.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/ui/const-generics/array-size-in-generic-struct-param.rs b/src/test/ui/const-generics/array-size-in-generic-struct-param.rs
index f3be7b56db5..d996bf56fcc 100644
--- a/src/test/ui/const-generics/array-size-in-generic-struct-param.rs
+++ b/src/test/ui/const-generics/array-size-in-generic-struct-param.rs
@@ -1,10 +1,9 @@
-// run-pass
-
 #![feature(const_generics)]
 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
 
 #[allow(dead_code)]
-struct ArithArrayLen<const N: usize>([u32; 0 + N]); // ok
+struct ArithArrayLen<const N: usize>([u32; 0 + N]);
+//~^ ERROR constant expression depends on a generic parameter
 
 #[derive(PartialEq, Eq)]
 struct Config {
@@ -12,7 +11,7 @@ struct Config {
 }
 
 struct B<const CFG: Config> {
-    arr: [u8; CFG.arr_size], // ok
+    arr: [u8; CFG.arr_size], //~ ERROR constant expression depends on a generic parameter
 }
 
 const C: Config = Config { arr_size: 5 };