about summary refs log tree commit diff
path: root/src/test/ui/const-generics
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2019-10-24 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2019-11-02 10:28:29 +0100
commitdae4c6e722bd4713e4da26acbf663b2015aaf3fc (patch)
tree6ce048670414297495641ba52378063ee4c99a86 /src/test/ui/const-generics
parentb10f75ca648abe70e97aeb81310fa8f136da5acc (diff)
downloadrust-dae4c6e722bd4713e4da26acbf663b2015aaf3fc.tar.gz
rust-dae4c6e722bd4713e4da26acbf663b2015aaf3fc.zip
Update error annotations in tests that successfully compile
Those annotation are silently ignored rather than begin validated
against compiler output. Update them before validation is enabled,
to avoid test failures.
Diffstat (limited to 'src/test/ui/const-generics')
-rw-r--r--src/test/ui/const-generics/cannot-infer-type-for-const-param.rs3
-rw-r--r--src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs
index cb40734c1d2..0fbd0bbcbae 100644
--- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs
+++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs
@@ -8,6 +8,5 @@
 struct Foo<const NUM_BYTES: usize>(pub [u8; NUM_BYTES]);
 
 fn main() {
-    let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed
-    //~^ ERROR mismatched types
+    let _ = Foo::<3>([1, 2, 3]);
 }
diff --git a/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs b/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs
index 4dc46eb0ef6..4e5e4d045c8 100644
--- a/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs
+++ b/src/test/ui/const-generics/issues/issue-62187-encountered-polymorphic-const.rs
@@ -12,5 +12,5 @@ impl<const L: usize> BitLen for [u8; L] {
 }
 
 fn main() {
-    let foo = <[u8; 2]>::BIT_LEN;
+    let foo = <[u8; 2]>::BIT_LEN; //~ WARN unused variable
 }