We should be better at returning `Error` from `type_of` if errors occurred inside _Originally posted by @oli-obk in https://github.com/rust-lang/rust/issues/117449#issuecomment-1789570202_