mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Try out a perf optimization
This commit is contained in:
parent
20d962cfa5
commit
36cb01deb3
@ -373,6 +373,11 @@ where
|
||||
substs: SubstsRef<'tcx>,
|
||||
filter: impl Fn(Ty<'tcx>) -> (DefId, SubstsRef<'tcx>),
|
||||
) {
|
||||
// An optimization for a common case with opaque types.
|
||||
if substs.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
// This case is thorny for inference. The fundamental problem is
|
||||
// that there are many cases where we have choice, and inference
|
||||
// doesn't like choice (the current region inference in
|
||||
|
Loading…
Reference in New Issue
Block a user