about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-07-17 18:13:45 -0700
committerGitHub <noreply@github.com>2020-07-17 18:13:45 -0700
commit378f46d1f2908014aa908f5c9823a44fd0a57c80 (patch)
tree8cc38b8777639e12ce7147b0808cba81b81a9d2a
parent8d1bb0e7488855f40175d38c035bad1c546da97b (diff)
parentf7979d3c9360ae6a4a688729fa518601029a7c76 (diff)
downloadrust-378f46d1f2908014aa908f5c9823a44fd0a57c80.tar.gz
rust-378f46d1f2908014aa908f5c9823a44fd0a57c80.zip
Rollup merge of #74444 - Alexendoo:test-69414, r=nikomatsakis
Add regression test for #69414

Closes #69414 (no longer ICEs after #74159)
-rw-r--r--src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs3
-rw-r--r--src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs
index db15ececfa4..ea75a3d0403 100644
--- a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs
+++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.rs
@@ -1,3 +1,6 @@
+// compile-flags: -Zsave-analysis
+// Regression test for #69414 ^
+
 use std::marker::PhantomData;
 
 struct B<T, const N: T>(PhantomData<[T; N]>); //~ ERROR const generics are unstable
diff --git a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
index 35996e83361..616f0fa8f1a 100644
--- a/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
+++ b/src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
@@ -1,11 +1,11 @@
 error[E0770]: the type of const parameters must not depend on other generic parameters
-  --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:22
+  --> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:22
    |
 LL | struct B<T, const N: T>(PhantomData<[T; N]>);
    |                      ^ the type must not depend on the parameter `T`
 
 error[E0658]: const generics are unstable
-  --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:19
+  --> $DIR/const-param-type-depends-on-type-param-ungated.rs:6:19
    |
 LL | struct B<T, const N: T>(PhantomData<[T; N]>);
    |                   ^