Skip to content

Commit 98a05db

Browse files
authored
Unrolled build for rust-lang#138394
Rollup merge of rust-lang#138394 - lcnr:yeet-variant, r=compiler-errors remove unnecessary variant
2 parents 0e76f8b + adbcb91 commit 98a05db

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

compiler/rustc_middle/src/traits/mod.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -980,12 +980,9 @@ pub enum CodegenObligationError {
980980
/// overflow bug, since I believe this is the only case
981981
/// where ambiguity can result.
982982
Ambiguity,
983-
/// This can trigger when we probe for the source of a `'static` lifetime requirement
984-
/// on a trait object: `impl Foo for dyn Trait {}` has an implicit `'static` bound.
985-
/// This can also trigger when we have a global bound that is not actually satisfied,
986-
/// but was included during typeck due to the trivial_bounds feature.
983+
/// This can trigger when we have a global bound that is not actually satisfied
984+
/// due to trivial bounds.
987985
Unimplemented,
988-
FulfillmentError,
989986
/// The selected impl has unconstrained generic parameters. This will emit an error
990987
/// during impl WF checking.
991988
UnconstrainedParam(ErrorGuaranteed),

compiler/rustc_traits/src/codegen.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub(crate) fn codegen_select_candidate<'tcx>(
7070
infcx.err_ctxt().report_overflow_obligation_cycle(&cycle);
7171
}
7272
}
73-
return Err(CodegenObligationError::FulfillmentError);
73+
return Err(CodegenObligationError::Unimplemented);
7474
}
7575

7676
let impl_source = infcx.resolve_vars_if_possible(impl_source);

compiler/rustc_ty_utils/src/instance.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,9 @@ fn resolve_associated_item<'tcx>(
107107
let input = typing_env.as_query_input(trait_ref);
108108
let vtbl = match tcx.codegen_select_candidate(input) {
109109
Ok(vtbl) => vtbl,
110-
Err(
111-
CodegenObligationError::Ambiguity
112-
| CodegenObligationError::Unimplemented
113-
| CodegenObligationError::FulfillmentError,
114-
) => return Ok(None),
110+
Err(CodegenObligationError::Ambiguity | CodegenObligationError::Unimplemented) => {
111+
return Ok(None);
112+
}
115113
Err(CodegenObligationError::UnconstrainedParam(guar)) => return Err(guar),
116114
};
117115

0 commit comments

Comments
 (0)