]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/invalid-const-arg-for-type-param.stderr
Rollup merge of #94577 - RalfJung:simd-miri, r=scottmcm
[rust.git] / src / test / ui / const-generics / invalid-const-arg-for-type-param.stderr
1 error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
2   --> $DIR/invalid-const-arg-for-type-param.rs:6:23
3    |
4 LL |     let _: u32 = 5i32.try_into::<32>().unwrap();
5    |                       ^^^^^^^^------ help: remove these generics
6    |                       |
7    |                       expected 0 generic arguments
8    |
9 note: associated function defined here, with 0 generic parameters
10   --> $SRC_DIR/core/src/convert/mod.rs:LL:COL
11    |
12 LL |     fn try_into(self) -> Result<T, Self::Error>;
13    |        ^^^^^^^^
14
15 error[E0599]: no method named `f` found for struct `S` in the current scope
16   --> $DIR/invalid-const-arg-for-type-param.rs:9:7
17    |
18 LL | struct S;
19    | --------- method `f` not found for this
20 ...
21 LL |     S.f::<0>();
22    |       ^ method not found in `S`
23
24 error[E0107]: this struct takes 0 generic arguments but 1 generic argument was supplied
25   --> $DIR/invalid-const-arg-for-type-param.rs:12:5
26    |
27 LL |     S::<0>;
28    |     ^----- help: remove these generics
29    |     |
30    |     expected 0 generic arguments
31    |
32 note: struct defined here, with 0 generic parameters
33   --> $DIR/invalid-const-arg-for-type-param.rs:3:8
34    |
35 LL | struct S;
36    |        ^
37
38 error: aborting due to 3 previous errors
39
40 Some errors have detailed explanations: E0107, E0599.
41 For more information about an error, try `rustc --explain E0107`.