Auto merge of #90661 - matthiaskrgr:rollup-1umbdlx, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #90487 (Add a chapter on reading Rustdoc output) - #90508 (Apply adjustments for field expression even if inaccessible) - #90627 (Suggest dereference of `Box` when inner type is expected) - #90642 (use matches!() macro in more places) - #90646 (type error go brrrrrrrr) - #90649 (Run reveal_all on MIR when inlining is activated.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
089a016919
36 changed files with 304 additions and 93 deletions
|
@ -538,12 +538,12 @@ impl InterpError<'_> {
|
|||
/// To avoid performance issues, there are places where we want to be sure to never raise these formatting errors,
|
||||
/// so this method lets us detect them and `bug!` on unexpected errors.
|
||||
pub fn formatted_string(&self) -> bool {
|
||||
match self {
|
||||
matches!(
|
||||
self,
|
||||
InterpError::Unsupported(UnsupportedOpInfo::Unsupported(_))
|
||||
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::ValidationFailure { .. })
|
||||
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_)) => true,
|
||||
_ => false,
|
||||
}
|
||||
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::ValidationFailure { .. })
|
||||
| InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_))
|
||||
)
|
||||
}
|
||||
|
||||
/// Should this error be reported as a hard error, preventing compilation, or a soft error,
|
||||
|
|
|
@ -187,8 +187,12 @@ impl<'tcx> Relate<'tcx> for ty::FnSig<'tcx> {
|
|||
})
|
||||
.enumerate()
|
||||
.map(|(i, r)| match r {
|
||||
Err(TypeError::Sorts(exp_found)) => Err(TypeError::ArgumentSorts(exp_found, i)),
|
||||
Err(TypeError::Mutability) => Err(TypeError::ArgumentMutability(i)),
|
||||
Err(TypeError::Sorts(exp_found) | TypeError::ArgumentSorts(exp_found, _)) => {
|
||||
Err(TypeError::ArgumentSorts(exp_found, i))
|
||||
}
|
||||
Err(TypeError::Mutability | TypeError::ArgumentMutability(_)) => {
|
||||
Err(TypeError::ArgumentMutability(i))
|
||||
}
|
||||
r => r,
|
||||
});
|
||||
Ok(ty::FnSig {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue