rust/compiler/rustc_middle/src/ty
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
..
consts interpret: ensure we check bool/char for validity when they are used in a cast 2024-06-11 12:16:09 +02:00
context Make span_bug panic site useful again 2024-03-19 09:19:12 +00:00
inhabitedness Remove #[macro_use] extern crate tracing from rustc_middle. 2024-05-23 18:02:40 +10:00
print Auto merge of #123781 - RalfJung:miri-fn-identity, r=oli-obk 2024-07-04 23:45:56 +00:00
abstract_const.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
adjustment.rs Rename Unsafe to Safety 2024-05-17 18:33:37 -03:00
adt.rs Uplift the new trait solver 2024-06-18 10:55:34 -04:00
assoc.rs implement new effects desugaring 2024-06-28 10:57:35 +00:00
cast.rs Remove extern crate rustc_macros from rustc_middle. 2024-04-29 11:19:16 +10:00
closure.rs chore: remove duplicate words 2024-07-02 11:25:31 +08:00
codec.rs Basic removal of Ty from places (boring) 2024-06-05 22:25:38 +01:00
consts.rs Uplift the new trait solver 2024-06-18 10:55:34 -04:00
context.rs Rollup merge of #127145 - compiler-errors:as_lang_item, r=lcnr 2024-07-03 17:26:54 +02:00
diagnostics.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
erase_regions.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
error.rs Uplift TypeError 2024-06-06 07:49:47 -04:00
fast_reject.rs Uplift fast rejection to new solver 2024-06-30 00:27:35 -04:00
flags.rs Add Ty to ConstKind::Value 2024-06-05 22:25:41 +01:00
fold.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
generic_args.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
generics.rs implement new effects desugaring 2024-06-28 10:57:35 +00:00
impls_ty.rs Uplift fast rejection to new solver 2024-06-30 00:27:35 -04:00
instance.rs cache type sizes in type-size limit visitor 2024-07-03 20:32:54 +00:00
intrinsic.rs Remove extern crate rustc_macros from rustc_middle. 2024-04-29 11:19:16 +10:00
layout.rs Auto merge of #125740 - RalfJung:transmute-size-check, r=oli-obk 2024-06-25 07:21:17 +00:00
list.rs Replace Deref bounds on Interner in favor of a SliceLike trait 2024-06-24 11:53:34 -04:00
mod.rs implement new effects desugaring 2024-06-28 10:57:35 +00:00
normalize_erasing_regions.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
opaque_types.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
parameterized.rs Give EarlyBinder a tcx parameter 2024-05-26 20:04:05 -04:00
pattern.rs Remove extern crate rustc_macros from rustc_middle. 2024-04-29 11:19:16 +10:00
predicate.rs Uplift the new trait solver 2024-06-18 10:55:34 -04:00
region.rs Rollup merge of #125597 - compiler-errors:early-binder, r=jackh726 2024-05-27 13:10:36 +02:00
relate.rs Uplift TypeRelation and Relate 2024-06-06 07:50:19 -04:00
rvalue_scopes.rs Remove #[macro_use] extern crate tracing from rustc_middle. 2024-05-23 18:02:40 +10:00
structural_impls.rs Rename a bunch of things 2024-06-21 12:32:05 -04:00
sty.rs Less magic number for corountine 2024-07-04 05:13:35 +08:00
trait_def.rs Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk" 2024-06-06 10:06:28 +00:00
typeck_results.rs Revert "Create const block DefIds in typeck instead of ast lowering" 2024-06-07 08:33:58 +00:00
util.rs Replace f16 and f128 pattern matching stubs with real implementations 2024-06-23 04:28:42 -05:00
visit.rs Uplift binder 2024-05-21 17:00:45 -04:00
vtable.rs supertrait_def_ids was already implemented in middle 2024-06-27 12:29:34 -04:00
walk.rs Add Ty to ConstKind::Value 2024-06-05 22:25:41 +01:00