Clean up dropck code a bit

- Remove `Result` that couldn't be Err on valid compilation.
- Always compute errors on failure.
This commit is contained in:
Matthew Jasper 2025-02-11 15:36:24 +00:00
parent 87e5969572
commit 49cf00c7c0
4 changed files with 38 additions and 55 deletions

View file

@ -802,7 +802,7 @@ rustc_queries! {
query adt_dtorck_constraint(
key: DefId
) -> Result<&'tcx DropckConstraint<'tcx>, NoSolution> {
) -> &'tcx DropckConstraint<'tcx> {
desc { |tcx| "computing drop-check constraints for `{}`", tcx.def_path_str(key) }
}