Auto merge of #106773 - Nilstrieb:rollup-sq73pyg, r=Nilstrieb

Rollup of 6 pull requests

Successful merges:

 - #105806 (Support eager subdiagnostics again)
 - #106322 (Handle inference variables in `CollectAllMismatches` correctly)
 - #106579 (Suggest making private tuple struct field public)
 - #106714 (remove unreachable error code `E0490`)
 - #106751 (Fix rendering 'const' in header for intrinsics)
 - #106761 (Add `WaffleLapkin` to compiler reviewers)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2023-01-12 17:11:03 +00:00
commit 1bc3683b32
32 changed files with 394 additions and 110 deletions

View file

@ -676,7 +676,8 @@ impl Item {
}
let header = match *self.kind {
ItemKind::ForeignFunctionItem(_) => {
let abi = tcx.fn_sig(self.item_id.as_def_id().unwrap()).abi();
let def_id = self.item_id.as_def_id().unwrap();
let abi = tcx.fn_sig(def_id).abi();
hir::FnHeader {
unsafety: if abi == Abi::RustIntrinsic {
intrinsic_operation_unsafety(tcx, self.item_id.as_def_id().unwrap())
@ -684,7 +685,14 @@ impl Item {
hir::Unsafety::Unsafe
},
abi,
constness: hir::Constness::NotConst,
constness: if abi == Abi::RustIntrinsic
&& tcx.is_const_fn(def_id)
&& is_unstable_const_fn(tcx, def_id).is_none()
{
hir::Constness::Const
} else {
hir::Constness::NotConst
},
asyncness: hir::IsAsync::NotAsync,
}
}