Skip to content

Rollup of 9 pull requests #143034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
644469e
Remove incorrect comments in `Weak`
theemathas Jun 19, 2025
e40515a
add method to retrieve body of coroutine
makai410 Jun 22, 2025
0c405ae
Update version placeholders
cuviper Jun 23, 2025
1e9c63f
Update stage0 to 1.89.0-beta.1
cuviper Jun 24, 2025
c388e68
Update `STAGE0_MISSING_TARGETS`
cuviper Jun 24, 2025
6cacbc7
Update `cfg(bootstrap)`
cuviper Jun 24, 2025
f908939
rename run_always to run_in_dry_run
Shourya742 Jun 25, 2025
4f80053
Update `browser-ui-test` version to `0.20.7`
GuillaumeGomez Jun 25, 2025
b75b14f
Add `sym::macro_pin` diagnostic item for `core::pin::pin!()`
samueltardieu Jun 25, 2025
44254c8
Remove some glob imports from the type system
compiler-errors Jun 17, 2025
c995070
rename RegionVariableOrigin::MiscVariable to RegionVariableOrigin::Misc
compiler-errors Jun 18, 2025
76d4b27
Simplify IfCause
compiler-errors Jun 25, 2025
9d11fd0
codegen_fn_attrs: make comment more precise
RalfJung Jun 25, 2025
d207c3b
Rollup merge of #139594 - compiler-errors:if-cause, r=oli-obk
samueltardieu Jun 26, 2025
29f4ea3
Rollup merge of #142637 - compiler-errors:less-globs, r=lcnr
samueltardieu Jun 26, 2025
57ce895
Rollup merge of #142700 - theemathas:remove-weak-comment, r=ibraheemdev
samueltardieu Jun 26, 2025
585f960
Rollup merge of #142884 - makai410:coroutine-body, r=celinval
samueltardieu Jun 26, 2025
d0ef5e3
Rollup merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum
samueltardieu Jun 26, 2025
22b52f9
Rollup merge of #143001 - Shourya742:2025-06-25-rename-run-always, r=…
samueltardieu Jun 26, 2025
e51fe6a
Rollup merge of #143010 - GuillaumeGomez:update-browser-ui-test, r=Ko…
samueltardieu Jun 26, 2025
e0f9483
Rollup merge of #143015 - samueltardieu:pin-macro-diag-item, r=Urgau
samueltardieu Jun 26, 2025
38f0a16
Rollup merge of #143020 - RalfJung:codegen_fn_attrs, r=oli-obk
samueltardieu Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rustc_hir::def::Res::Def;
use rustc_hir::def_id::DefId;
use rustc_hir::intravisit::VisitorExt;
use rustc_hir::{PolyTraitRef, TyKind, WhereBoundPredicate};
use rustc_infer::infer::{NllRegionVariableOrigin, RelateParamBound};
use rustc_infer::infer::{NllRegionVariableOrigin, SubregionOrigin};
use rustc_middle::bug;
use rustc_middle::hir::place::PlaceBase;
use rustc_middle::mir::{AnnotationSource, ConstraintCategory, ReturnConstraint};
Expand Down Expand Up @@ -329,7 +329,8 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
self.infcx.tcx,
type_test.generic_kind.to_ty(self.infcx.tcx),
);
let origin = RelateParamBound(type_test_span, generic_ty, None);
let origin =
SubregionOrigin::RelateParamBound(type_test_span, generic_ty, None);
self.buffer_error(self.infcx.err_ctxt().construct_generic_bound_failure(
self.body.source.def_id().expect_local(),
type_test_span,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use rustc_infer::infer::canonical::QueryRegionConstraints;
use rustc_infer::infer::outlives::env::RegionBoundPairs;
use rustc_infer::infer::outlives::obligations::{TypeOutlives, TypeOutlivesDelegate};
use rustc_infer::infer::region_constraints::{GenericKind, VerifyBound};
use rustc_infer::infer::{self, InferCtxt, SubregionOrigin};
use rustc_infer::infer::{InferCtxt, SubregionOrigin};
use rustc_infer::traits::query::type_op::DeeplyNormalize;
use rustc_middle::bug;
use rustc_middle::ty::{
Expand Down Expand Up @@ -172,7 +172,7 @@ impl<'a, 'tcx> ConstraintConversion<'a, 'tcx> {
ty::Region::new_var(tcx, universal_regions.implicit_region_bound());
// we don't actually use this for anything, but
// the `TypeOutlives` code needs an origin.
let origin = infer::RelateParamBound(self.span, t1, None);
let origin = SubregionOrigin::RelateParamBound(self.span, t1, None);
TypeOutlives::new(
&mut *self,
tcx,
Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_borrowck/src/type_check/input_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
Ty::new_tup(self.tcx(), user_provided_sig.inputs()),
args.tupled_upvars_ty(),
args.coroutine_captures_by_ref_ty(),
self.infcx
.next_region_var(RegionVariableOrigin::MiscVariable(self.body.span), || {
RegionCtxt::Unknown
}),
self.infcx.next_region_var(RegionVariableOrigin::Misc(self.body.span), || {
RegionCtxt::Unknown
}),
);

let next_ty_var = || self.infcx.next_ty_var(self.body.span);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use rustc_infer::infer::canonical::QueryRegionConstraints;
use rustc_infer::infer::outlives::env::RegionBoundPairs;
use rustc_infer::infer::region_constraints::RegionConstraintData;
use rustc_infer::infer::{
BoundRegion, BoundRegionConversionTime, InferCtxt, NllRegionVariableOrigin,
BoundRegionConversionTime, InferCtxt, NllRegionVariableOrigin, RegionVariableOrigin,
};
use rustc_infer::traits::PredicateObligations;
use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor};
Expand Down Expand Up @@ -794,7 +794,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
};

self.infcx.next_region_var(
BoundRegion(
RegionVariableOrigin::BoundRegion(
term.source_info.span,
br.kind,
BoundRegionConversionTime::FnCall,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(not(bootstrap), feature(autodiff))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![feature(autodiff)]
#![feature(box_patterns)]
#![feature(decl_macro)]
#![feature(if_let_guard)]
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_codegen_ssa/src/codegen_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {

mixed_export_name_no_mangle_lint_state.lint_if_mixed(tcx);

// Apply the minimum function alignment here, so that individual backends don't have to.
// Apply the minimum function alignment here. This ensures that a function's alignment is
// determined by the `-C` flags of the crate it is defined in, not the `-C` flags of the crate
// it happens to be codegen'd (or const-eval'd) in.
codegen_fn_attrs.alignment =
Ord::max(codegen_fn_attrs.alignment, tcx.sess.opts.unstable_opts.min_function_alignment);

Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_data_structures/src/aligned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::marker::PointeeSized;
use std::ptr::Alignment;

use rustc_serialize::PointeeSized;

/// Returns the ABI-required minimum alignment of a type in bytes.
///
/// This is equivalent to [`align_of`], but also works for some unsized
Expand Down
13 changes: 1 addition & 12 deletions compiler/rustc_data_structures/src/flock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@
//! green/native threading. This is just a bare-bones enough solution for
//! librustdoc, it is not production quality at all.

// cfg(bootstrap)
macro_rules! cfg_select_dispatch {
($($tokens:tt)*) => {
#[cfg(bootstrap)]
cfg_match! { $($tokens)* }

#[cfg(not(bootstrap))]
cfg_select! { $($tokens)* }
};
}

cfg_select_dispatch! {
cfg_select! {
target_os = "linux" => {
mod linux;
use linux as imp;
Expand Down
8 changes: 2 additions & 6 deletions compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#![allow(internal_features)]
#![allow(rustc::default_hash_types)]
#![allow(rustc::potential_query_instability)]
#![cfg_attr(bootstrap, feature(cfg_match))]
#![cfg_attr(not(bootstrap), feature(cfg_select))]
#![cfg_attr(not(bootstrap), feature(sized_hierarchy))]
#![deny(unsafe_op_in_unsafe_fn)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
Expand All @@ -22,6 +19,7 @@
#![feature(ascii_char_variants)]
#![feature(assert_matches)]
#![feature(auto_traits)]
#![feature(cfg_select)]
#![feature(core_intrinsics)]
#![feature(dropck_eyepatch)]
#![feature(extend_one)]
Expand All @@ -33,6 +31,7 @@
#![feature(ptr_alignment_type)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![feature(sized_hierarchy)]
#![feature(test)]
#![feature(thread_id_value)]
#![feature(type_alias_impl_trait)]
Expand All @@ -44,9 +43,6 @@ use std::fmt;
pub use atomic_ref::AtomicRef;
pub use ena::{snapshot_vec, undo_log, unify};
pub use rustc_index::static_assert_size;
// re-exported for `rustc_smir`
// FIXME(sized_hierarchy): remove with `cfg(bootstrap)`, see `rustc_serialize/src/lib.rs`
pub use rustc_serialize::PointeeSized;

pub mod aligned;
pub mod base_n;
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_data_structures/src/marker.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::alloc::Allocator;

use rustc_serialize::PointeeSized;
use std::marker::PointeeSized;

#[diagnostic::on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \
Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")]
Expand Down
13 changes: 1 addition & 12 deletions compiler/rustc_data_structures/src/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,19 +859,8 @@ fn get_thread_id() -> u32 {
std::thread::current().id().as_u64().get() as u32
}

// cfg(bootstrap)
macro_rules! cfg_select_dispatch {
($($tokens:tt)*) => {
#[cfg(bootstrap)]
cfg_match! { $($tokens)* }

#[cfg(not(bootstrap))]
cfg_select! { $($tokens)* }
};
}

// Memory reporting
cfg_select_dispatch! {
cfg_select! {
windows => {
pub fn get_resident_set_size() -> Option<usize> {
use windows::{
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#![allow(incomplete_features)]
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::direct_use_of_rustc_type_ir)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(not(bootstrap), allow(rustc::direct_use_of_rustc_type_ir))]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![doc(rust_logo)]
#![feature(array_windows)]
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ declare_features! (
/// Allows overloading augmented assignment operations like `a += b`.
(accepted, augmented_assignments, "1.8.0", Some(28235)),
/// Allows using `avx512*` target features.
(accepted, avx512_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
(accepted, avx512_target_feature, "1.89.0", Some(44839)),
/// Allows mixing bind-by-move in patterns and references to those identifiers in guards.
(accepted, bind_by_move_pattern_guards, "1.39.0", Some(15287)),
/// Allows bindings in the subpattern of a binding pattern.
Expand Down Expand Up @@ -221,7 +221,7 @@ declare_features! (
/// Allows capturing variables in scope using format_args!
(accepted, format_args_capture, "1.58.0", Some(67984)),
/// Infer generic args for both consts and types.
(accepted, generic_arg_infer, "CURRENT_RUSTC_VERSION", Some(85077)),
(accepted, generic_arg_infer, "1.89.0", Some(85077)),
/// Allows associated types to be generic, e.g., `type Foo<T>;` (RFC 1598).
(accepted, generic_associated_types, "1.65.0", Some(44265)),
/// Allows attributes on lifetime/type formal parameters in generics (RFC 1327).
Expand Down Expand Up @@ -262,7 +262,7 @@ declare_features! (
/// especially around globs and shadowing (RFC 1560).
(accepted, item_like_imports, "1.15.0", Some(35120)),
// Allows using the `kl` and `widekl` target features and the associated intrinsics
(accepted, keylocker_x86, "CURRENT_RUSTC_VERSION", Some(134813)),
(accepted, keylocker_x86, "1.89.0", Some(134813)),
/// Allows `'a: { break 'a; }`.
(accepted, label_break_value, "1.65.0", Some(48594)),
/// Allows `let...else` statements.
Expand Down Expand Up @@ -365,7 +365,7 @@ declare_features! (
/// Lessens the requirements for structs to implement `Unsize`.
(accepted, relaxed_struct_unsize, "1.58.0", Some(81793)),
/// Allows the `#[repr(i128)]` attribute for enums.
(accepted, repr128, "CURRENT_RUSTC_VERSION", Some(56071)),
(accepted, repr128, "1.89.0", Some(56071)),
/// Allows `repr(align(16))` struct attribute (RFC 1358).
(accepted, repr_align, "1.25.0", Some(33626)),
/// Allows using `#[repr(align(X))]` on enums with equivalent semantics
Expand All @@ -387,7 +387,7 @@ declare_features! (
/// Allows `Self` struct constructor (RFC 2302).
(accepted, self_struct_ctor, "1.32.0", Some(51994)),
/// Allows use of x86 SHA512, SM3 and SM4 target-features and intrinsics
(accepted, sha512_sm_x86, "CURRENT_RUSTC_VERSION", Some(126624)),
(accepted, sha512_sm_x86, "1.89.0", Some(126624)),
/// Shortern the tail expression lifetime
(accepted, shorter_tail_lifetimes, "1.84.0", Some(123739)),
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ declare_features! (
/// Allows exhaustive integer pattern matching with `usize::MAX`/`isize::MIN`/`isize::MAX`.
(removed, precise_pointer_size_matching, "1.76.0", Some(56354),
Some("removed in favor of half-open ranges"), 118598),
(removed, pref_align_of, "CURRENT_RUSTC_VERSION", Some(91971),
(removed, pref_align_of, "1.89.0", Some(91971),
Some("removed due to marginal use and inducing compiler complications")),
(removed, proc_macro_expr, "1.27.0", Some(54727),
Some("subsumed by `#![feature(proc_macro_hygiene)]`"), 52121),
Expand Down Expand Up @@ -264,7 +264,7 @@ declare_features! (
(removed, unnamed_fields, "1.83.0", Some(49804), Some("feature needs redesign"), 131045),
(removed, unsafe_no_drop_flag, "1.0.0", None, None),
/// Allows unsized rvalues at arguments and parameters.
(removed, unsized_locals, "CURRENT_RUSTC_VERSION", Some(48055), Some("removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942")),
(removed, unsized_locals, "1.89.0", Some(48055), Some("removed due to implementation concerns; see https://github.com/rust-lang/rust/issues/111942")),
(removed, unsized_tuple_coercion, "1.87.0", Some(42877),
Some("The feature restricts possible layouts for tuples, and this restriction is not worth it."), 137728),
/// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue.
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ declare_features! (
/// Allows using `rustc_*` attributes (RFC 572).
(internal, rustc_attrs, "1.0.0", None),
/// Introduces a hierarchy of `Sized` traits (RFC 3729).
(unstable, sized_hierarchy, "CURRENT_RUSTC_VERSION", None),
(unstable, sized_hierarchy, "1.89.0", None),
/// Allows using the `#[stable]` and `#[unstable]` attributes.
(internal, staged_api, "1.0.0", None),
/// Added for testing unstable lints; perma-unstable.
Expand Down Expand Up @@ -356,7 +356,7 @@ declare_features! (
/// Allows `extern "C-cmse-nonsecure-call" fn()`.
(unstable, abi_c_cmse_nonsecure_call, "1.51.0", Some(81391)),
/// Allows `extern "custom" fn()`.
(unstable, abi_custom, "CURRENT_RUSTC_VERSION", Some(140829)),
(unstable, abi_custom, "1.89.0", Some(140829)),
/// Allows `extern "gpu-kernel" fn()`.
(unstable, abi_gpu_kernel, "1.86.0", Some(135467)),
/// Allows `extern "msp430-interrupt" fn()`.
Expand All @@ -376,7 +376,7 @@ declare_features! (
/// Allows inherent and trait methods with arbitrary self types that are raw pointers.
(unstable, arbitrary_self_types_pointers, "1.83.0", Some(44874)),
/// Allows #[cfg(...)] on inline assembly templates and operands.
(unstable, asm_cfg, "CURRENT_RUSTC_VERSION", Some(140364)),
(unstable, asm_cfg, "1.89.0", Some(140364)),
/// Enables experimental inline assembly support for additional architectures.
(unstable, asm_experimental_arch, "1.58.0", Some(93335)),
/// Enables experimental register support in inline assembly.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ fn check_opaque_meets_bounds<'tcx>(
// here rather than using ReErased.
let hidden_ty = tcx.type_of(def_id.to_def_id()).instantiate(tcx, args);
let hidden_ty = fold_regions(tcx, hidden_ty, |re, _dbi| match re.kind() {
ty::ReErased => infcx.next_region_var(RegionVariableOrigin::MiscVariable(span)),
ty::ReErased => infcx.next_region_var(RegionVariableOrigin::Misc(span)),
_ => re,
});

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan, pluralize, struct_
use rustc_hir::def::{DefKind, Res};
use rustc_hir::intravisit::VisitorExt;
use rustc_hir::{self as hir, AmbigArg, GenericParamKind, ImplItemKind, intravisit};
use rustc_infer::infer::{self, InferCtxt, TyCtxtInferExt};
use rustc_infer::infer::{self, BoundRegionConversionTime, InferCtxt, TyCtxtInferExt};
use rustc_infer::traits::util;
use rustc_middle::ty::error::{ExpectedFound, TypeError};
use rustc_middle::ty::{
Expand Down Expand Up @@ -311,7 +311,7 @@ fn compare_method_predicate_entailment<'tcx>(

let unnormalized_impl_sig = infcx.instantiate_binder_with_fresh_vars(
impl_m_span,
infer::HigherRankedType,
BoundRegionConversionTime::HigherRankedType,
tcx.fn_sig(impl_m.def_id).instantiate_identity(),
);

Expand Down Expand Up @@ -518,7 +518,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
param_env,
infcx.instantiate_binder_with_fresh_vars(
return_span,
infer::HigherRankedType,
BoundRegionConversionTime::HigherRankedType,
tcx.fn_sig(impl_m.def_id).instantiate_identity(),
),
);
Expand Down
10 changes: 7 additions & 3 deletions compiler/rustc_hir_analysis/src/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::lang_items::LangItem;
use rustc_hir::{AmbigArg, ItemKind};
use rustc_infer::infer::outlives::env::OutlivesEnvironment;
use rustc_infer::infer::{self, InferCtxt, TyCtxtInferExt};
use rustc_infer::infer::{self, InferCtxt, SubregionOrigin, TyCtxtInferExt};
use rustc_lint_defs::builtin::SUPERTRAIT_ITEM_SHADOWING_DEFINITION;
use rustc_macros::LintDiagnostic;
use rustc_middle::mir::interpret::ErrorHandled;
Expand Down Expand Up @@ -739,7 +739,7 @@ fn ty_known_to_outlive<'tcx>(
infcx.register_type_outlives_constraint_inner(infer::TypeOutlivesConstraint {
sub_region: region,
sup_type: ty,
origin: infer::RelateParamBound(DUMMY_SP, ty, None),
origin: SubregionOrigin::RelateParamBound(DUMMY_SP, ty, None),
});
})
}
Expand All @@ -755,7 +755,11 @@ fn region_known_to_outlive<'tcx>(
region_b: ty::Region<'tcx>,
) -> bool {
test_region_obligations(tcx, id, param_env, wf_tys, |infcx| {
infcx.sub_regions(infer::RelateRegionParamBound(DUMMY_SP, None), region_b, region_a);
infcx.sub_regions(
SubregionOrigin::RelateRegionParamBound(DUMMY_SP, None),
region_b,
region_a,
);
})
}

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir_analysis/src/coherence/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use rustc_hir as hir;
use rustc_hir::ItemKind;
use rustc_hir::def_id::{DefId, LocalDefId};
use rustc_hir::lang_items::LangItem;
use rustc_infer::infer::{self, RegionResolutionError, TyCtxtInferExt};
use rustc_infer::infer::{self, RegionResolutionError, SubregionOrigin, TyCtxtInferExt};
use rustc_infer::traits::Obligation;
use rustc_middle::ty::adjustment::CoerceUnsizedInfo;
use rustc_middle::ty::print::PrintTraitRefExt as _;
Expand Down Expand Up @@ -415,7 +415,7 @@ pub(crate) fn coerce_unsized_info<'tcx>(
};
let (source, target, trait_def_id, kind, field_span) = match (source.kind(), target.kind()) {
(&ty::Ref(r_a, ty_a, mutbl_a), &ty::Ref(r_b, ty_b, mutbl_b)) => {
infcx.sub_regions(infer::RelateObjectBound(span), r_b, r_a);
infcx.sub_regions(SubregionOrigin::RelateObjectBound(span), r_b, r_a);
let mt_a = ty::TypeAndMut { ty: ty_a, mutbl: mutbl_a };
let mt_b = ty::TypeAndMut { ty: ty_b, mutbl: mutbl_b };
check_mutbl(mt_a, mt_b, &|ty| Ty::new_imm_ref(tcx, r_b, ty))
Expand Down
Loading
Loading