about summary refs log tree commit diff
path: root/src/test/ui/const-generics
diff options
context:
space:
mode:
authorben <benlewisj@gmail.com>2019-10-02 20:29:16 +1300
committerben <benlewisj@gmail.com>2019-10-09 05:10:00 +1300
commita59eb6d55483e68f790c048efcfc8cdec26db32c (patch)
tree3237289c439a632275c4130a258aff70168173a8 /src/test/ui/const-generics
parent2afd277bc3ad53ddb6064b7f2a739583e8b4820a (diff)
downloadrust-a59eb6d55483e68f790c048efcfc8cdec26db32c.tar.gz
rust-a59eb6d55483e68f790c048efcfc8cdec26db32c.zip
Pretty print function pointer const values.
Diffstat (limited to 'src/test/ui/const-generics')
-rw-r--r--src/test/ui/const-generics/fn-const-param-call.rs2
-rw-r--r--src/test/ui/const-generics/fn-const-param-infer.rs2
-rw-r--r--src/test/ui/const-generics/fn-const-param-infer.stderr4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/const-generics/fn-const-param-call.rs b/src/test/ui/const-generics/fn-const-param-call.rs
index 9f64d4bd086..1fb57897e28 100644
--- a/src/test/ui/const-generics/fn-const-param-call.rs
+++ b/src/test/ui/const-generics/fn-const-param-call.rs
@@ -17,4 +17,4 @@ impl<const F: fn() -> u32> Wrapper<{F}> {
 
 fn main() {
     assert_eq!(Wrapper::<{function}>::call(), 17);
-}
\ No newline at end of file
+}
diff --git a/src/test/ui/const-generics/fn-const-param-infer.rs b/src/test/ui/const-generics/fn-const-param-infer.rs
index ac48ccc26e1..65a1523a354 100644
--- a/src/test/ui/const-generics/fn-const-param-infer.rs
+++ b/src/test/ui/const-generics/fn-const-param-infer.rs
@@ -23,4 +23,4 @@ fn main() {
     let _ = Checked::<{generic::<u16>}>;
     let _: Checked<{generic::<u16>}> = Checked::<{generic::<u16>}>;
     let _: Checked<{generic::<u32>}> = Checked::<{generic::<u16>}>; //~ mismatched types
-}
\ No newline at end of file
+}
diff --git a/src/test/ui/const-generics/fn-const-param-infer.stderr b/src/test/ui/const-generics/fn-const-param-infer.stderr
index 4ef55fd22d4..8598cd95b81 100644
--- a/src/test/ui/const-generics/fn-const-param-infer.stderr
+++ b/src/test/ui/const-generics/fn-const-param-infer.stderr
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/fn-const-param-infer.rs:16:33
    |
 LL |     let _: Checked<{not_one}> = Checked::<{not_two}>;
-   |                                 ^^^^^^^^^^^^^^^^^^^^ expected `Scalar(AllocId(1).0x0) : fn(usize) -> bool`, found `Scalar(AllocId(10).0x0) : fn(usize) -> bool`
+   |                                 ^^^^^^^^^^^^^^^^^^^^ expected `not_one`, found `not_two`
    |
    = note: expected type `Checked<>`
               found type `Checked<>`
@@ -34,7 +34,7 @@ error[E0308]: mismatched types
   --> $DIR/fn-const-param-infer.rs:25:40
    |
 LL |     let _: Checked<{generic::<u32>}> = Checked::<{generic::<u16>}>;
-   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Scalar(AllocId(7).0x0) : fn(usize) -> bool`, found `Scalar(AllocId(20).0x0) : fn(usize) -> bool`
+   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `generic::<u32>`, found `generic::<u16>`
    |
    = note: expected type `Checked<>`
               found type `Checked<>`