2022-08-21 12:56:00 -05:00
infer_actual_impl_expl_but_actually_implemented_for_ty = ...but `{$trait_path}` is actually implemented for the type `{$ty}`{$has_lifetime ->
2022-08-23 05:48:14 -05:00
[true] , for some specific lifetime `'{$lifetime}`
2022-08-28 11:45:19 -05:00
*[false] {""}
2022-08-23 05:48:14 -05:00
}
infer_actual_impl_expl_but_actually_implements_trait = ...but it actually implements `{$trait_path}`{$has_lifetime ->
2022-08-28 11:45:19 -05:00
[true] , for some specific lifetime `'{$lifetime}`
*[false] {""}
}
infer_actual_impl_expl_but_actually_ty_implements = ...but `{$ty}` actually implements `{$trait_path}`{$has_lifetime ->
2023-01-21 10:45:45 -06:00
[true] , for some specific lifetime `'{$lifetime}`
2022-08-30 10:28:50 -05:00
*[false] {""}
}
2022-11-03 12:45:14 -05:00
infer_actual_impl_expl_expected_other_any = {$leading_ellipsis ->
2022-09-29 09:10:43 -05:00
[true] ...
*[false] {""}
}`{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`...
infer_actual_impl_expl_expected_other_nothing = {$leading_ellipsis ->
[true] ...
*[false] {""}
2023-01-19 17:13:01 -06:00
}`{$ty_or_sig}` must implement `{$trait_path}`
2023-05-22 20:51:25 -05:00
2022-09-29 09:10:43 -05:00
infer_actual_impl_expl_expected_other_some = {$leading_ellipsis ->
[true] ...
*[false] {""}
}`{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`...
infer_actual_impl_expl_expected_other_two = {$leading_ellipsis ->
[true] ...
*[false] {""}
}`{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...
infer_actual_impl_expl_expected_passive_any = {$leading_ellipsis ->
[true] ...
*[false] {""}
}`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any lifetime `'{$lifetime_1}`...
infer_actual_impl_expl_expected_passive_nothing = {$leading_ellipsis ->
2022-08-28 11:45:19 -05:00
[true] ...
2022-08-21 12:56:00 -05:00
*[false] {""}
2022-09-29 09:10:43 -05:00
}`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`
infer_actual_impl_expl_expected_passive_some = {$leading_ellipsis ->
[true] ...
*[false] {""}
2023-01-19 17:13:01 -06:00
}`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for some specific lifetime `'{$lifetime_1}`...
2022-09-29 09:10:43 -05:00
infer_actual_impl_expl_expected_passive_two = {$leading_ellipsis ->
[true] ...
*[false] {""}
}`{$trait_path}` would have to be implemented for the type `{$ty_or_sig}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...
infer_actual_impl_expl_expected_signature_any = {$leading_ellipsis ->
[true] ...
*[false] {""}
}closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any lifetime `'{$lifetime_1}`...
infer_actual_impl_expl_expected_signature_nothing = {$leading_ellipsis ->
[true] ...
*[false] {""}
}closure with signature `{$ty_or_sig}` must implement `{$trait_path}`
infer_actual_impl_expl_expected_signature_some = {$leading_ellipsis ->
[true] ...
*[false] {""}
2023-01-19 17:13:01 -06:00
}closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for some specific lifetime `'{$lifetime_1}`...
2022-09-29 09:10:43 -05:00
infer_actual_impl_expl_expected_signature_two = {$leading_ellipsis ->
[true] ...
*[false] {""}
}closure with signature `{$ty_or_sig}` must implement `{$trait_path}`, for any two lifetimes `'{$lifetime_1}` and `'{$lifetime_2}`...
2022-09-16 16:20:11 -05:00
infer_ascribe_user_type_prove_predicate = ...so that the where clause holds
2022-09-10 16:45:38 -05:00
2022-10-15 05:16:51 -05:00
infer_await_both_futures = consider `await`ing on both `Future`s
2022-09-13 12:11:42 -05:00
infer_await_future = consider `await`ing on the `Future`
infer_await_note = calling an async function returns a future
2022-09-16 18:54:59 -05:00
infer_but_calling_introduces = {$has_param_name ->
[true] `{$param_name}`
*[false] `fn` parameter
} has {$lifetime_kind ->
2023-01-18 03:23:50 -06:00
[true] lifetime `{$lifetime}`
*[false] an anonymous lifetime `'_`
} but calling `{$assoc_item}` introduces an implicit `'static` lifetime requirement
2022-09-16 18:54:59 -05:00
.label1 = {$has_lifetime ->
2023-01-18 03:23:50 -06:00
[true] lifetime `{$lifetime}`
*[false] an anonymous lifetime `'_`
2022-09-16 18:54:59 -05:00
}
.label2 = ...is used and required to live as long as `'static` here because of an implicit lifetime bound on the {$has_impl_path ->
2023-01-18 03:23:50 -06:00
[true] `impl` of `{$impl_path}`
*[false] inherent `impl`
2022-09-16 18:54:59 -05:00
}
infer_but_needs_to_satisfy = {$has_param_name ->
[true] `{$param_name}`
*[false] `fn` parameter
} has {$has_lifetime ->
2023-01-18 03:23:50 -06:00
[true] lifetime `{$lifetime}`
*[false] an anonymous lifetime `'_`
2022-09-16 18:54:59 -05:00
} but it needs to satisfy a `'static` lifetime requirement
.influencer = this data with {$has_lifetime ->
2023-01-18 03:23:50 -06:00
[true] lifetime `{$lifetime}`
*[false] an anonymous lifetime `'_`
2022-09-16 18:54:59 -05:00
}...
.require = {$spans_empty ->
*[true] ...is used and required to live as long as `'static` here
[false] ...and is required to live as long as `'static` here
}
.used_here = ...is used here...
2023-03-03 01:38:07 -06:00
.introduced_by_bound = `'static` lifetime requirement introduced by this bound
2022-09-16 18:54:59 -05:00
2022-08-23 05:48:14 -05:00
infer_compare_impl_item_obligation = ...so that the definition in impl matches the definition from the trait
2023-03-04 04:35:30 -06:00
infer_consider_specifying_length = consider specifying the actual array length
2022-08-28 11:45:19 -05:00
infer_data_flows = ...but data{$label_var1_exists ->
[true] {" "}from `{$label_var1}`
2024-05-17 07:43:59 -05:00
*[false] {""}
2022-08-28 11:45:19 -05:00
} flows{$label_var2_exists ->
2022-11-12 21:10:56 -06:00
[true] {" "}into `{$label_var2}`
2024-05-17 07:43:59 -05:00
*[false] {""}
2023-05-22 20:51:25 -05:00
} here
2022-08-28 11:45:19 -05:00
infer_data_lifetime_flow = ...but data with one lifetime flows into the other here
infer_data_returned = ...but data{$label_var1_exists ->
[true] {" "}from `{$label_var1}`
*[false] {""}
} is returned here
2023-05-22 20:51:25 -05:00
2022-08-28 11:45:19 -05:00
infer_declared_different = this parameter and the return type are declared with different lifetimes...
infer_declared_multiple = this type is declared with multiple lifetimes...
2022-10-14 07:25:59 -05:00
infer_does_not_outlive_static_from_impl = ...does not necessarily outlive the static lifetime introduced by the compatible `impl`
2022-09-16 18:54:59 -05:00
infer_dtcs_has_lifetime_req_label = this has an implicit `'static` lifetime requirement
infer_dtcs_has_req_note = the used `impl` has a `'static` requirement
2023-03-03 01:38:07 -06:00
infer_dtcs_introduces_requirement = calling this method introduces the `impl`'s `'static` requirement
2022-09-16 18:54:59 -05:00
infer_dtcs_suggestion = consider relaxing the implicit `'static` requirement
2023-05-22 20:51:25 -05:00
2022-11-03 12:45:14 -05:00
infer_explicit_lifetime_required_sugg_with_ident = add explicit lifetime `{$named}` to the type of `{$simple_ident}`
2023-05-22 20:51:25 -05:00
2022-11-03 12:45:14 -05:00
infer_explicit_lifetime_required_sugg_with_param_type = add explicit lifetime `{$named}` to type
2023-05-22 20:51:25 -05:00
2022-11-03 12:45:14 -05:00
infer_explicit_lifetime_required_with_ident = explicit lifetime required in the type of `{$simple_ident}`
2022-09-08 14:28:00 -05:00
.label = lifetime `{$named}` required
2023-05-22 20:51:25 -05:00
2022-11-03 12:45:14 -05:00
infer_explicit_lifetime_required_with_param_type = explicit lifetime required in parameter type
2022-09-08 14:28:00 -05:00
.label = lifetime `{$named}` required
2023-05-22 20:51:25 -05:00
2023-03-03 06:41:22 -06:00
infer_fn_consider_casting = consider casting the fn item to a fn pointer: `{$casting}`
2023-05-22 20:51:25 -05:00
2023-03-03 06:41:22 -06:00
infer_fn_uniq_types = different fn items have unique types, even if their signatures are the same
2023-02-23 07:38:12 -06:00
infer_fps_cast = consider casting to a fn pointer
2023-03-03 06:41:22 -06:00
infer_fps_cast_both = consider casting both fn items to fn pointers using `as {$expected_sig}`
2023-05-22 20:51:25 -05:00
2023-02-23 07:38:12 -06:00
infer_fps_items_are_distinct = fn items are distinct from fn pointers
infer_fps_remove_ref = consider removing the reference
infer_fps_use_ref = consider using a reference
2023-04-10 15:02:52 -05:00
infer_fulfill_req_lifetime = the type `{$ty}` does not fulfill the required lifetime
Use `fn` ptr signature instead of `{closure@..}` in infer error
When suggesting a type on inference error, do not use `{closure@..}`.
Instead, replace with an appropriate `fn` ptr.
On the error message, use `short_ty_string` and write long types to
disk.
```
error[E0284]: type annotations needed for `Select<{closure@lib.rs:2782:13}, _, Expression<'_>, _>`
--> crates/lang/src/parser.rs:41:13
|
41 | let lit = select! {
| ^^^
42 | Token::Int(i) = e => Expression::new(Expr::Lit(ast::Lit::Int(i.parse().unwrap())), e.span()),
| ---- type must be known at this point
|
= note: the full type name has been written to '/home/gh-estebank/iowo/target/debug/deps/lang-e2d6e25819442273.long-type-4587393693885174369.txt'
= note: cannot satisfy `<_ as chumsky::input::Input<'_>>::Span == SimpleSpan`
help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified
|
41 | let lit: Select<for<'a, 'b> fn(tokens::Token<'_>, &'a mut MapExtra<'_, 'b, _, _>) -> Option<Expression<'_>>, _, Expression<'_>, _> = select! {
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```
instead of
```
error[E0284]: type annotations needed for `Select<{closure@/home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chumsky-1.0.0-alpha.6/src/lib.rs:2782:13: 2782:28}, _, Expression<'_>, _>`
--> crates/lang/src/parser.rs:41:13
|
41 | let lit = select! {
| ^^^
42 | Token::Int(i) = e => Expression::new(Expr::Lit(ast::Lit::Int(i.parse().unwrap())), e.span()),
| ---- type must be known at this point
|
= note: cannot satisfy `<_ as chumsky::input::Input<'_>>::Span == SimpleSpan`
help: consider giving `lit` an explicit type, where the type for type parameter `I` is specified
|
41 | let lit: Select<{closure@/home/gh-estebank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/chumsky-1.0.0-alpha.6/src/lib.rs:2782:13: 2782:28}, _, Expression<'_>, _> = select! {
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```
Fix #123630.
2024-04-09 19:11:52 -05:00
infer_full_type_written = the full type name has been written to '{$path}'
2022-10-14 07:25:59 -05:00
infer_implicit_static_lifetime_note = this has an implicit `'static` lifetime requirement
infer_implicit_static_lifetime_suggestion = consider relaxing the implicit `'static` requirement
2022-08-21 12:56:00 -05:00
infer_label_bad = {$bad_kind ->
*[other] cannot infer type
[more_info] cannot infer {$prefix_kind ->
*[type] type for {$prefix}
[const_with_param] the value of const parameter
[const] the value of the constant
} `{$name}`{$has_parent ->
[true] {" "}declared on the {$parent_prefix} `{$parent_name}`
2022-08-28 11:45:19 -05:00
*[false] {""}
2023-05-22 20:51:25 -05:00
}
}
2023-01-18 07:34:08 -06:00
infer_lf_bound_not_satisfied = lifetime bound not satisfied
2022-08-28 11:45:19 -05:00
infer_lifetime_mismatch = lifetime mismatch
2023-05-22 20:51:25 -05:00
2024-05-17 16:23:47 -05:00
infer_lifetime_param_suggestion = consider {$is_reuse ->
[true] reusing
*[false] introducing
} a named lifetime parameter{$is_impl ->
2022-08-28 11:45:19 -05:00
[true] {" "}and update trait if needed
*[false] {""}
2023-05-22 20:51:25 -05:00
}
2022-08-28 11:45:19 -05:00
infer_lifetime_param_suggestion_elided = each elided lifetime in input position becomes a distinct lifetime
2023-05-22 20:51:25 -05:00
2023-03-04 04:35:30 -06:00
infer_meant_byte_literal = if you meant to write a byte literal, prefix with `b`
infer_meant_char_literal = if you meant to write a `char` literal, use single quotes
2024-03-13 18:52:04 -05:00
infer_meant_str_literal = if you meant to write a string literal, use double quotes
2022-08-30 10:28:50 -05:00
infer_mismatched_static_lifetime = incompatible lifetime on type
2022-09-16 18:54:59 -05:00
infer_more_targeted = {$has_param_name ->
[true] `{$param_name}`
*[false] `fn` parameter
} has {$has_lifetime ->
2023-01-18 03:23:50 -06:00
[true] lifetime `{$lifetime}`
*[false] an anonymous lifetime `'_`
2022-09-16 18:54:59 -05:00
} but calling `{$ident}` introduces an implicit `'static` lifetime requirement
infer_msl_introduces_static = introduces a `'static` lifetime requirement
infer_msl_unmet_req = because this has an unmet lifetime requirement
2023-01-28 10:41:14 -06:00
infer_nothing = {""}
2023-01-31 10:12:48 -06:00
2023-02-03 08:24:53 -06:00
infer_oc_cant_coerce = cannot coerce intrinsics to function pointers
2023-10-19 16:46:28 -05:00
infer_oc_closure_selfref = closure/coroutine type that references itself
2023-03-04 04:35:30 -06:00
infer_oc_const_compat = const not compatible with trait
2023-09-17 13:13:05 -05:00
infer_oc_fn_lang_correct_type = {$lang_item_name ->
[panic_impl] `#[panic_handler]`
*[lang_item_name] lang item `{$lang_item_name}`
} function has wrong type
2023-02-03 08:24:53 -06:00
infer_oc_fn_main_correct_type = `main` function has wrong type
2023-03-04 04:35:30 -06:00
infer_oc_fn_start_correct_type = `#[start]` function has wrong type
infer_oc_generic = mismatched types
2023-05-22 20:51:25 -05:00
2023-02-03 08:24:53 -06:00
infer_oc_if_else_different = `if` and `else` have incompatible types
infer_oc_intrinsic_correct_type = intrinsic has wrong type
2023-03-04 04:35:30 -06:00
infer_oc_match_compat = `match` arms have incompatible types
infer_oc_method_compat = method not compatible with trait
infer_oc_method_correct_type = mismatched `self` parameter type
infer_oc_no_diverge = `else` clause of `let...else` does not diverge
2023-02-03 08:24:53 -06:00
infer_oc_no_else = `if` may be missing an `else` clause
2023-03-04 04:35:30 -06:00
infer_oc_try_compat = `?` operator has incompatible types
infer_oc_type_compat = type not compatible with trait
2023-02-03 08:24:53 -06:00
infer_opaque_captures_lifetime = hidden type for `{$opaque_ty}` captures lifetime that does not appear in bounds
2023-02-20 22:14:06 -06:00
.label = opaque type defined here
2023-05-22 20:51:25 -05:00
2022-08-23 07:33:06 -05:00
infer_opaque_hidden_type =
2022-08-21 12:56:00 -05:00
opaque type's hidden type cannot be another opaque type from the same scope
2023-02-03 08:24:53 -06:00
.label = one of the two opaque types used here has to be outside its defining scope
2022-08-21 12:56:00 -05:00
.opaque_type = opaque type whose hidden type is being assigned
.hidden_type = opaque type being used as hidden type
2023-02-03 08:24:53 -06:00
2023-01-18 07:34:08 -06:00
infer_outlives_bound = lifetime of the source pointer does not outlive lifetime bound of the object type
infer_outlives_content = lifetime of reference outlives lifetime of borrowed content...
2023-02-03 08:24:53 -06:00
infer_prlf_defined_with_sub = the lifetime `{$sub_symbol}` defined here...
infer_prlf_defined_without_sub = the lifetime defined here...
infer_prlf_known_limitation = this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information)
2023-02-20 22:14:06 -06:00
infer_prlf_must_outlive_with_sup = ...must outlive the lifetime `{$sup_symbol}` defined here
infer_prlf_must_outlive_without_sup = ...must outlive the lifetime defined here
infer_reborrow = ...so that reference does not outlive borrowed content
infer_ref_longer_than_data = in type `{$ty}`, reference has a longer lifetime than the data it references
2023-02-23 07:38:12 -06:00
infer_reference_outlives_referent = ...so that the reference type `{$name}` does not outlive the data it points at
2023-03-03 06:41:22 -06:00
infer_region_explanation = {$pref_kind ->
*[should_not_happen] [{$pref_kind}]
[ref_valid_for] ...the reference is valid for
[content_valid_for] ...but the borrowed content is only valid for
[type_obj_valid_for] object type is valid for
[source_pointer_valid_for] source pointer is only valid for
[type_satisfy] type must satisfy
2023-01-18 07:34:08 -06:00
[type_outlive] type must outlive
2023-03-03 06:41:22 -06:00
[lf_param_instantiated_with] lifetime parameter instantiated with
2023-01-21 10:45:45 -06:00
[lf_param_must_outlive] but lifetime parameter must outlive
2023-03-03 06:41:22 -06:00
[lf_instantiated_with] lifetime instantiated with
2023-01-21 10:45:45 -06:00
[lf_must_outlive] but lifetime must outlive
2023-01-21 09:16:53 -06:00
[pointer_valid_for] the pointer is valid for
[data_valid_for] but the referenced data is only valid for
2023-03-03 06:41:22 -06:00
[empty] {""}
2022-08-30 10:28:50 -05:00
}{$pref_kind ->
[empty] {""}
2023-05-22 20:51:25 -05:00
*[other] {" "}
2022-08-30 10:28:50 -05:00
}{$desc_kind ->
2023-03-03 06:41:22 -06:00
*[should_not_happen] [{$desc_kind}]
2022-08-30 10:28:50 -05:00
[restatic] the static lifetime
[revar] lifetime {$desc_arg}
2023-03-03 06:41:22 -06:00
[as_defined] the lifetime `{$desc_arg}` as defined here
2022-08-30 10:28:50 -05:00
[as_defined_anon] the anonymous lifetime as defined here
[defined_here] the anonymous lifetime defined here
[defined_here_reg] the lifetime `{$desc_arg}` as defined here
}{$suff_kind ->
*[should_not_happen] [{$suff_kind}]
[empty]{""}
[continues] ...
2023-03-03 06:41:22 -06:00
[req_by_binding] {" "}as required by this binding
2023-05-22 20:51:25 -05:00
}
2023-03-03 06:41:22 -06:00
infer_relate_object_bound = ...so that it can be closed over into an object
infer_relate_param_bound = ...so that the type `{$name}` will meet its required lifetime bounds{$continues ->
2022-09-29 09:10:43 -05:00
[true] ...
2022-09-10 16:45:38 -05:00
*[false] {""}
2023-05-22 20:51:25 -05:00
}
2023-03-03 06:41:22 -06:00
infer_relate_param_bound_2 = ...that is required by this bound
infer_relate_region_param_bound = ...so that the declared lifetime parameter bounds are satisfied
infer_ril_because_of = because of this returned expression
2022-09-16 18:54:59 -05:00
infer_ril_introduced_by = requirement introduced by this return type
2023-03-03 06:41:22 -06:00
infer_ril_introduced_here = `'static` requirement introduced here
infer_ril_static_introduced_by = "`'static` lifetime requirement introduced by the return type
2023-03-03 09:56:45 -06:00
infer_source_kind_closure_return =
try giving this closure an explicit return type
2023-10-19 16:46:28 -05:00
# coroutine_kind may need to be translated
2022-08-23 07:33:06 -05:00
infer_source_kind_fully_qualified =
2023-03-03 09:56:45 -06:00
try using a fully qualified path to specify the expected types
2023-05-22 20:51:25 -05:00
2022-08-21 12:56:00 -05:00
infer_source_kind_subdiag_generic_label =
2022-08-23 07:33:06 -05:00
cannot infer {$is_type ->
2022-08-21 12:56:00 -05:00
[true] type
*[false] the value
2022-08-23 07:33:06 -05:00
} of the {$is_type ->
2022-08-21 12:56:00 -05:00
[true] type
*[false] const
} {$parent_exists ->
2023-03-03 09:56:45 -06:00
[true] parameter `{$param_name}` declared on the {$parent_prefix} `{$parent_name}`
2022-08-23 07:33:06 -05:00
*[false] parameter {$param_name}
2023-05-22 20:51:25 -05:00
}
2023-03-03 09:56:45 -06:00
infer_source_kind_subdiag_generic_suggestion =
2022-08-23 07:33:06 -05:00
consider specifying the generic {$arg_count ->
2022-08-21 12:56:00 -05:00
[one] argument
*[other] arguments
2023-05-22 20:51:25 -05:00
}
2022-08-21 12:56:00 -05:00
infer_source_kind_subdiag_let = {$kind ->
2023-03-03 09:56:45 -06:00
[with_pattern] consider giving `{$name}` an explicit type
2022-08-21 12:56:00 -05:00
[closure] consider giving this closure parameter an explicit type
*[other] consider giving this pattern a type
}{$x_kind ->
2023-03-03 09:56:45 -06:00
[has_name] , where the {$prefix_kind ->
2022-08-21 12:56:00 -05:00
*[type] type for {$prefix}
2023-03-03 09:56:45 -06:00
[const_with_param] value of const parameter
2023-04-07 02:42:17 -05:00
[const] value of the constant
2022-08-21 12:56:00 -05:00
} `{$arg_name}` is specified
[underscore] , where the placeholders `_` are specified
*[empty] {""}
2023-05-22 20:51:25 -05:00
}
2023-03-03 09:56:45 -06:00
infer_srs_add = consider returning the local binding `{$ident}`
infer_srs_add_one = consider returning one of these bindings
2023-05-22 20:51:25 -05:00
2023-01-28 10:41:14 -06:00
infer_srs_remove = consider removing this semicolon
infer_srs_remove_and_box = consider removing this semicolon and boxing the expressions
2023-03-03 09:56:45 -06:00
infer_stp_wrap_many = try wrapping the pattern in a variant of `{$path}`
2023-03-03 13:03:12 -06:00
infer_stp_wrap_one = try wrapping the pattern in `{$variant}`
infer_subtype = ...so that the {$requirement ->
[method_compat] method type is compatible with trait
[type_compat] associated type is compatible with trait
2022-08-23 05:48:14 -05:00
[const_compat] const is compatible with trait
2023-03-03 13:03:12 -06:00
[expr_assignable] expression is assignable
2022-08-23 05:48:14 -05:00
[if_else_different] `if` and `else` have incompatible types
2023-03-03 13:03:12 -06:00
[no_else] `if` missing an `else` returns `()`
[fn_main_correct_type] `main` function has the correct type
[fn_start_correct_type] `#[start]` function has the correct type
2023-09-17 13:13:05 -05:00
[fn_lang_correct_type] lang item function has the correct type
2023-04-09 16:35:02 -05:00
[intrinsic_correct_type] intrinsic has the correct type
2022-08-23 05:48:14 -05:00
[method_correct_type] method receiver has the correct type
*[other] types are compatible
2023-05-22 20:51:25 -05:00
}
2022-08-23 05:48:14 -05:00
infer_subtype_2 = ...so that {$requirement ->
[method_compat] method type is compatible with trait
[type_compat] associated type is compatible with trait
[const_compat] const is compatible with trait
[expr_assignable] expression is assignable
[if_else_different] `if` and `else` have incompatible types
2023-03-03 13:03:12 -06:00
[no_else] `if` missing an `else` returns `()`
2022-08-23 05:48:14 -05:00
[fn_main_correct_type] `main` function has the correct type
2023-03-03 01:38:07 -06:00
[fn_start_correct_type] `#[start]` function has the correct type
2023-09-17 13:13:05 -05:00
[fn_lang_correct_type] lang item function has the correct type
2023-04-09 16:35:02 -05:00
[intrinsic_correct_type] intrinsic has the correct type
2022-08-23 05:48:14 -05:00
[method_correct_type] method receiver has the correct type
*[other] types are compatible
2023-05-22 20:51:25 -05:00
}
2023-03-04 04:35:30 -06:00
infer_suggest_accessing_field = you might have meant to use field `{$name}` whose type is `{$ty}`
2023-05-22 20:51:25 -05:00
2023-03-04 04:35:30 -06:00
infer_suggest_add_let_for_letchains = consider adding `let`
2023-05-22 20:51:25 -05:00
2023-03-04 04:35:30 -06:00
infer_tid_consider_borrowing = consider borrowing this type parameter in the trait
infer_tid_param_help = the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
2023-05-22 20:51:25 -05:00
2023-03-04 04:35:30 -06:00
infer_tid_rel_help = verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output
infer_trait_impl_diff = `impl` item signature doesn't match `trait` item signature
2022-09-13 12:11:42 -05:00
.found = found `{$found}`
2022-12-24 17:17:25 -06:00
.expected = expected `{$expected}`
2023-03-04 04:35:30 -06:00
.expected_found = expected signature `{$expected}`
{" "}found signature `{$found}`
2023-05-22 20:51:25 -05:00
2023-03-04 04:35:30 -06:00
infer_trait_placeholder_mismatch = implementation of `{$trait_def_id}` is not general enough
.label_satisfy = doesn't satisfy where-clause
.label_where = due to a where-clause on `{$def_id}`...
.label_dup = implementation of `{$trait_def_id}` is not general enough
infer_try_cannot_convert = `?` operator cannot convert from `{$found}` to `{$expected}`
2023-05-22 20:51:25 -05:00
2023-02-03 08:24:53 -06:00
infer_tuple_trailing_comma = use a trailing comma to create a tuple with one element
2023-05-22 20:51:25 -05:00
2022-08-21 12:56:00 -05:00
infer_type_annotations_needed = {$source_kind ->
[closure] type annotations needed for the closure `{$source_name}`
[normal] type annotations needed for `{$source_name}`
*[other] type annotations needed
2023-05-22 20:51:25 -05:00
}
2022-08-21 12:56:00 -05:00
.label = type must be known at this point
2023-05-22 20:51:25 -05:00
2022-08-28 11:45:19 -05:00
infer_types_declared_different = these two types are declared with different lifetimes...
2023-01-22 09:16:47 -06:00
infer_where_copy_predicates = copy the `where` clause predicates from the trait
2023-05-22 20:51:25 -05:00
2023-01-22 09:16:47 -06:00
infer_where_remove = remove the `where` clause