diff options
| author | bors <bors@rust-lang.org> | 2024-02-13 00:31:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-13 00:31:53 +0000 |
| commit | 0a5b998c57a8681acc13206b5917340b053b3a30 (patch) | |
| tree | d673efacffd4baf86b67a6d9e2e511a1d2db8888 /compiler/rustc_monomorphize | |
| parent | 74c3f5a146860c94ff4d179fc3bfa34f879adf41 (diff) | |
| parent | 8a87cdacb15d4856e60388d456449158e3f542b6 (diff) | |
| download | rust-0a5b998c57a8681acc13206b5917340b053b3a30.tar.gz rust-0a5b998c57a8681acc13206b5917340b053b3a30.zip | |
Auto merge of #120991 - matthiaskrgr:rollup-f8kw2st, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #118983 (Warn on references casting to bigger memory layout) - #119451 (Gate PR CI on clippy correctness lints) - #120273 (compiletest: few naive improvements) - #120950 (Fix async closures in CTFE) - #120958 (Dejargonize `subst`) - #120965 (Add lahfsahf and prfchw target feature) - #120970 (add another test for promoteds-in-static) - #120979 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_monomorphize')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_monomorphize/src/polymorphize.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 149e4c2cb08..8ae9457ff76 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -62,7 +62,7 @@ //! syntactic items in the source code. We find them by walking the HIR of the //! crate, and whenever we hit upon a public function, method, or static item, //! we create a mono item consisting of the items DefId and, since we only -//! consider non-generic items, an empty type-substitution set. (In eager +//! consider non-generic items, an empty type-parameters set. (In eager //! collection mode, during incremental compilation, all non-generic functions //! are considered as roots, as well as when the `-Clink-dead-code` option is //! specified. Functions marked `#[no_mangle]` and functions called by inlinable @@ -1162,7 +1162,7 @@ fn create_fn_mono_item<'tcx>( let def_id = instance.def_id(); if tcx.sess.opts.unstable_opts.profile_closures && def_id.is_local() - && tcx.is_closure_or_coroutine(def_id) + && tcx.is_closure_like(def_id) { crate::util::dump_closure_profile(tcx, instance); } @@ -1383,11 +1383,11 @@ fn create_mono_items_for_default_impls<'tcx>( // items, we never actually check that the predicates of this impl are satisfied // in a empty reveal-all param env (i.e. with no assumptions). // - // Even though this impl has no type or const substitutions, because we don't + // Even though this impl has no type or const generic parameters, because we don't // consider higher-ranked predicates such as `for<'a> &'a mut [u8]: Copy` to // be trivially false. We must now check that the impl has no impossible-to-satisfy // predicates. - if tcx.subst_and_check_impossible_predicates((item.owner_id.to_def_id(), impl_args)) { + if tcx.instantiate_and_check_impossible_predicates((item.owner_id.to_def_id(), impl_args)) { return; } @@ -1404,7 +1404,7 @@ fn create_mono_items_for_default_impls<'tcx>( } // As mentioned above, the method is legal to eagerly instantiate if it - // only has lifetime substitutions. This is validated by + // only has lifetime generic parameters. This is validated by let args = trait_ref.args.extend_to(tcx, method.def_id, only_region_params); let instance = ty::Instance::expect_resolve(tcx, param_env, method.def_id, args); diff --git a/compiler/rustc_monomorphize/src/polymorphize.rs b/compiler/rustc_monomorphize/src/polymorphize.rs index 009bd0b97b6..fb42532e247 100644 --- a/compiler/rustc_monomorphize/src/polymorphize.rs +++ b/compiler/rustc_monomorphize/src/polymorphize.rs @@ -90,7 +90,7 @@ fn should_polymorphize<'tcx>( def_id: DefId, instance: ty::InstanceDef<'tcx>, ) -> bool { - // If an instance's MIR body is not polymorphic then the modified substitutions that are + // If an instance's MIR body is not polymorphic then the modified generic parameters that are // derived from polymorphization's result won't make any difference. if !instance.has_polymorphic_mir_body() { return false; |
