about summary refs log tree commit diff
path: root/src/test/ui/const-generics/fn-const-param-infer.stderr
blob: 44eab8baa40a6571651cac2887f64ab8ab214ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
  --> $DIR/fn-const-param-infer.rs:1:12
   |
LL | #![feature(const_generics, const_compare_raw_pointers)]
   |            ^^^^^^^^^^^^^^
   |
   = note: `#[warn(incomplete_features)]` on by default

error[E0308]: mismatched types
  --> $DIR/fn-const-param-infer.rs:16:31
   |
LL |     let _: Checked<not_one> = Checked::<not_two>;
   |            ----------------   ^^^^^^^^^^^^^^^^^^ expected `not_one`, found `not_two`
   |            |
   |            expected due to this
   |
   = note: expected struct `Checked<not_one>`
              found struct `Checked<not_two>`

error[E0308]: mismatched types
  --> $DIR/fn-const-param-infer.rs:20:24
   |
LL |     let _ = Checked::<{generic_arg::<u32>}>;
   |                        ^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32`
   |
   = note: expected fn pointer `fn(usize) -> _`
                 found fn item `fn(u32) -> _ {generic_arg::<u32>}`

error[E0282]: type annotations needed
  --> $DIR/fn-const-param-infer.rs:22:23
   |
LL |     let _ = Checked::<generic>;
   |                       ^^^^^^^ cannot infer type for type parameter `T` declared on the function `generic`

error[E0308]: mismatched types
  --> $DIR/fn-const-param-infer.rs:25:40
   |
LL |     let _: Checked<{generic::<u32>}> = Checked::<{generic::<u16>}>;
   |            -------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `generic::<u32>`, found `generic::<u16>`
   |            |
   |            expected due to this
   |
   = note: expected struct `Checked<generic::<u32>>`
              found struct `Checked<generic::<u16>>`

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0282, E0308.
For more information about an error, try `rustc --explain E0282`.