rust/compiler/rustc_const_eval/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
..
check_consts Instance::resolve -> Instance::try_resolve, and other nits 2024-07-02 17:28:03 -04:00
const_eval Fix spans 2024-07-02 15:48:48 -04:00
interpret Auto merge of #123781 - RalfJung:miri-fn-identity, r=oli-obk 2024-07-04 23:45:56 +00:00
util rename CompileTimeInterpreter -> CompileTimeMachine, CompileTimeEvalContext -> CompileTimeInterpCx 2024-06-13 20:30:11 +02:00
errors.rs don't ICE when encountering an extern type field during validation 2024-06-22 17:39:01 +02:00
lib.rs use is_none_or in some places in the compiler 2024-06-12 16:20:07 +02:00