Auto merge of #100644 - TaKO8Ki:rollup-n0o6a1t, r=TaKO8Ki
Rollup of 4 pull requests Successful merges: - #100243 (Remove opt_remap_env_constness from rustc_query_impl) - #100625 (Add `IpDisplayBuffer` helper struct.) - #100629 (Use `merged_ty` method instead of rewriting it every time) - #100630 (rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
86c6ebee8f
7 changed files with 76 additions and 45 deletions
|
@ -1488,14 +1488,14 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
|
|||
// `break`, we want to call the `()` "expected"
|
||||
// since it is implied by the syntax.
|
||||
// (Note: not all force-units work this way.)"
|
||||
(expression_ty, self.final_ty.unwrap_or(self.expected_ty))
|
||||
(expression_ty, self.merged_ty())
|
||||
} else {
|
||||
// Otherwise, the "expected" type for error
|
||||
// reporting is the current unification type,
|
||||
// which is basically the LUB of the expressions
|
||||
// we've seen so far (combined with the expected
|
||||
// type)
|
||||
(self.final_ty.unwrap_or(self.expected_ty), expression_ty)
|
||||
(self.merged_ty(), expression_ty)
|
||||
};
|
||||
let (expected, found) = fcx.resolve_vars_if_possible((expected, found));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue