Auto merge of #91555 - matthiaskrgr:rollup-pq0iaq7, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #90529 (Skip reborrows in AbstractConstBuilder) - #91437 (Pretty print empty blocks as {}) - #91450 (Don't suggest types whose inner type is erroneous) - #91535 (Stabilize `-Z emit-future-incompat` as `--json future-incompat`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
772d51f887
76 changed files with 270 additions and 179 deletions
|
@ -41,7 +41,7 @@ use rustc_middle::ty::subst::InternalSubsts;
|
|||
use rustc_middle::ty::util::Discr;
|
||||
use rustc_middle::ty::util::IntTypeExt;
|
||||
use rustc_middle::ty::{self, AdtKind, Const, DefIdTree, Ty, TyCtxt};
|
||||
use rustc_middle::ty::{ReprOptions, ToPredicate, WithConstness};
|
||||
use rustc_middle::ty::{ReprOptions, ToPredicate, TypeFoldable, WithConstness};
|
||||
use rustc_session::lint;
|
||||
use rustc_session::parse::feature_err;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
|
@ -1777,7 +1777,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> {
|
|||
visitor.visit_ty(ty);
|
||||
let mut diag = bad_placeholder_type(tcx, visitor.0, "return type");
|
||||
let ret_ty = fn_sig.skip_binder().output();
|
||||
if ret_ty != tcx.ty_error() {
|
||||
if !ret_ty.references_error() {
|
||||
if !ret_ty.is_closure() {
|
||||
let ret_ty_str = match ret_ty.kind() {
|
||||
// Suggest a function pointer return type instead of a unique function definition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue