Rollup merge of #132168 - fee1-dead-contrib:fxclean, r=compiler-errors

Effects cleanup

- removed extra bits from predicates queries that are no longer needed in the new system
- removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers

r? compiler-errors
This commit is contained in:
Matthias Krüger 2024-10-26 06:29:48 +02:00 committed by GitHub
commit 56463df1be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 40 additions and 97 deletions

View file

@ -439,12 +439,7 @@ impl<'tcx> Inliner<'tcx> {
// Reachability pass defines which functions are eligible for inlining. Generally inlining
// other functions is incorrect because they could reference symbols that aren't exported.
let is_generic = callsite
.callee
.args
.non_erasable_generics(self.tcx, callsite.callee.def_id())
.next()
.is_some();
let is_generic = callsite.callee.args.non_erasable_generics().next().is_some();
if !is_generic && !cross_crate_inlinable {
return Err("not exported");
}