remove support for the #[start] attribute
This commit is contained in:
parent
341f60327f
commit
56c90dc31e
176 changed files with 454 additions and 1260 deletions
|
@ -261,7 +261,6 @@ trait_selection_oc_fn_lang_correct_type = {$lang_item_name ->
|
|||
*[lang_item_name] lang item `{$lang_item_name}`
|
||||
} function has wrong type
|
||||
trait_selection_oc_fn_main_correct_type = `main` function has wrong type
|
||||
trait_selection_oc_fn_start_correct_type = `#[start]` function has wrong type
|
||||
trait_selection_oc_generic = mismatched types
|
||||
|
||||
trait_selection_oc_if_else_different = `if` and `else` have incompatible types
|
||||
|
@ -396,7 +395,6 @@ trait_selection_subtype = ...so that the {$requirement ->
|
|||
[if_else_different] `if` and `else` have incompatible types
|
||||
[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
|
||||
[fn_lang_correct_type] lang item function has the correct type
|
||||
[intrinsic_correct_type] intrinsic has the correct type
|
||||
[method_correct_type] method receiver has the correct type
|
||||
|
@ -410,7 +408,6 @@ trait_selection_subtype_2 = ...so that {$requirement ->
|
|||
[if_else_different] `if` and `else` have incompatible types
|
||||
[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
|
||||
[fn_lang_correct_type] lang item function has the correct type
|
||||
[intrinsic_correct_type] intrinsic has the correct type
|
||||
[method_correct_type] method receiver has the correct type
|
||||
|
|
|
@ -2310,7 +2310,6 @@ impl<'tcx> ObligationCause<'tcx> {
|
|||
| ObligationCauseCode::MatchExpressionArm(_)
|
||||
| ObligationCauseCode::IfExpression { .. }
|
||||
| ObligationCauseCode::LetElse
|
||||
| ObligationCauseCode::StartFunctionType
|
||||
| ObligationCauseCode::LangFunctionType(_)
|
||||
| ObligationCauseCode::IntrinsicType
|
||||
| ObligationCauseCode::MethodReceiver => FailureCode::Error0308,
|
||||
|
@ -2368,9 +2367,6 @@ impl<'tcx> ObligationCause<'tcx> {
|
|||
ObligationCauseCode::MainFunctionType => {
|
||||
ObligationCauseFailureCode::FnMainCorrectType { span }
|
||||
}
|
||||
ObligationCauseCode::StartFunctionType => {
|
||||
ObligationCauseFailureCode::FnStartCorrectType { span, subdiags }
|
||||
}
|
||||
&ObligationCauseCode::LangFunctionType(lang_item_name) => {
|
||||
ObligationCauseFailureCode::FnLangCorrectType { span, subdiags, lang_item_name }
|
||||
}
|
||||
|
@ -2413,7 +2409,6 @@ impl<'tcx> ObligationCause<'tcx> {
|
|||
"const is compatible with trait"
|
||||
}
|
||||
ObligationCauseCode::MainFunctionType => "`main` function has the correct type",
|
||||
ObligationCauseCode::StartFunctionType => "`#[start]` function has the correct type",
|
||||
ObligationCauseCode::LangFunctionType(_) => "lang item function has the correct type",
|
||||
ObligationCauseCode::IntrinsicType => "intrinsic has the correct type",
|
||||
ObligationCauseCode::MethodReceiver => "method receiver has the correct type",
|
||||
|
@ -2434,7 +2429,6 @@ impl IntoDiagArg for ObligationCauseAsDiagArg<'_> {
|
|||
"const_compat"
|
||||
}
|
||||
ObligationCauseCode::MainFunctionType => "fn_main_correct_type",
|
||||
ObligationCauseCode::StartFunctionType => "fn_start_correct_type",
|
||||
ObligationCauseCode::LangFunctionType(_) => "fn_lang_correct_type",
|
||||
ObligationCauseCode::IntrinsicType => "intrinsic_correct_type",
|
||||
ObligationCauseCode::MethodReceiver => "method_correct_type",
|
||||
|
|
|
@ -2740,7 +2740,6 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
| ObligationCauseCode::IfExpression { .. }
|
||||
| ObligationCauseCode::IfExpressionWithNoElse
|
||||
| ObligationCauseCode::MainFunctionType
|
||||
| ObligationCauseCode::StartFunctionType
|
||||
| ObligationCauseCode::LangFunctionType(_)
|
||||
| ObligationCauseCode::IntrinsicType
|
||||
| ObligationCauseCode::MethodReceiver
|
||||
|
|
|
@ -1695,13 +1695,6 @@ pub enum ObligationCauseFailureCode {
|
|||
#[primary_span]
|
||||
span: Span,
|
||||
},
|
||||
#[diag(trait_selection_oc_fn_start_correct_type, code = E0308)]
|
||||
FnStartCorrectType {
|
||||
#[primary_span]
|
||||
span: Span,
|
||||
#[subdiagnostic]
|
||||
subdiags: Vec<TypeErrorAdditionalDiags>,
|
||||
},
|
||||
#[diag(trait_selection_oc_fn_lang_correct_type, code = E0308)]
|
||||
FnLangCorrectType {
|
||||
#[primary_span]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue