]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lang-items/lang-item-generic-requirements.stderr
Auto merge of #103218 - CastilloDel:infer, r=jackh726
[rust.git] / src / test / ui / lang-items / lang-item-generic-requirements.stderr
1 error[E0718]: `add` language item must be applied to a trait with 1 generic argument
2   --> $DIR/lang-item-generic-requirements.rs:10:1
3    |
4 LL | #[lang = "add"]
5    | ^^^^^^^^^^^^^^^
6 LL | trait MyAdd<'a, T> {}
7    |            ------- this trait has 2 generic arguments
8
9 error[E0718]: `drop_in_place` language item must be applied to a function with at least 1 generic argument
10   --> $DIR/lang-item-generic-requirements.rs:14:1
11    |
12 LL | #[lang = "drop_in_place"]
13    | ^^^^^^^^^^^^^^^^^^^^^^^^^
14 LL |
15 LL | fn my_ptr_drop() {}
16    |               - this function has 0 generic arguments
17
18 error[E0718]: `index` language item must be applied to a trait with 1 generic argument
19   --> $DIR/lang-item-generic-requirements.rs:18:1
20    |
21 LL | #[lang = "index"]
22    | ^^^^^^^^^^^^^^^^^
23 LL | trait MyIndex<'a, T> {}
24    |              ------- this trait has 2 generic arguments
25
26 error[E0718]: `phantom_data` language item must be applied to a struct with 1 generic argument
27   --> $DIR/lang-item-generic-requirements.rs:22:1
28    |
29 LL | #[lang = "phantom_data"]
30    | ^^^^^^^^^^^^^^^^^^^^^^^^
31 LL |
32 LL | struct MyPhantomData<T, U>;
33    |                     ------ this struct has 2 generic arguments
34
35 error[E0718]: `owned_box` language item must be applied to a struct with at least 1 generic argument
36   --> $DIR/lang-item-generic-requirements.rs:28:1
37    |
38 LL | #[lang = "owned_box"]
39    | ^^^^^^^^^^^^^^^^^^^^^
40 LL |
41 LL | struct Foo;
42    |           - this struct has 0 generic arguments
43
44 error[E0718]: `start` language item must be applied to a function with 1 generic argument
45   --> $DIR/lang-item-generic-requirements.rs:34:1
46    |
47 LL | #[lang = "start"]
48    | ^^^^^^^^^^^^^^^^^
49 LL |
50 LL | fn start(_: *const u8, _: isize, _: *const *const u8) -> isize {
51    |         - this function has 0 generic arguments
52
53 error[E0392]: parameter `T` is never used
54   --> $DIR/lang-item-generic-requirements.rs:24:22
55    |
56 LL | struct MyPhantomData<T, U>;
57    |                      ^ unused parameter
58    |
59    = help: consider removing `T` or referring to it in a field
60    = help: if you intended `T` to be a const parameter, use `const T: usize` instead
61
62 error[E0392]: parameter `U` is never used
63   --> $DIR/lang-item-generic-requirements.rs:24:25
64    |
65 LL | struct MyPhantomData<T, U>;
66    |                         ^ unused parameter
67    |
68    = help: consider removing `U` or referring to it in a field
69    = help: if you intended `U` to be a const parameter, use `const U: usize` instead
70
71 error: aborting due to 8 previous errors
72
73 Some errors have detailed explanations: E0392, E0718.
74 For more information about an error, try `rustc --explain E0392`.