1
Fork 0
rust/compiler/rustc_monomorphize/src
bors 489233170a Auto merge of #123781 - RalfJung:miri-fn-identity, r=oli-obk
Miri function identity hack: account for possible inlining

Having a non-lifetime generic is not the only reason a function can be duplicated. Another possibility is that the function may be eligible for cross-crate inlining. So also take into account the inlining attribute in this Miri hack for function pointer identity.

That said, `cross_crate_inlinable` will still sometimes return true even for `inline(never)` functions:
- when they are `DefKind::Ctor(..) | DefKind::Closure` -- I assume those cannot be `InlineAttr::Never` anyway?
- when `cross_crate_inline_threshold == InliningThreshold::Always`

so maybe this is still not quite the right criterion to use for function pointer identity.
2024-07-04 23:45:56 +00:00
..
collector Remove #[macro_use] extern crate tracing from rustc_monomorphize. 2024-05-23 18:02:40 +10:00
collector.rs Auto merge of #123781 - RalfJung:miri-fn-identity, r=oli-obk 2024-07-04 23:45:56 +00:00
errors.rs Re-implement a type-size based limit 2024-07-02 15:48:48 -04:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
partitioning.rs Rename InstanceDef -> InstanceKind 2024-06-16 21:35:21 -04:00
polymorphize.rs Rename InstanceDef -> InstanceKind 2024-06-16 21:35:21 -04:00
util.rs subst -> instantiate 2023-09-26 09:37:55 +02:00