Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e0b4b62
optimize large elements for slice rotating
ywxt Sep 21, 2026
5885baa
Don't suggest replacing foreign format specifiers in `concat!` output
hina-kura49 Sep 26, 2026
e99838b
Fix the floating point clobbers of RISC-V `clobber_abi`
beetrees Oct 5, 2026
15b7f92
omit unconditionally invoking crate level limits query
mejrs Oct 8, 2026
d3a4f96
Point at prior token on `let` when expression is expected
estebank Oct 25, 2026
3b727ed
rustdoc: Fix performance regression for private documented items
GuillaumeGomez Oct 26, 2026
040d806
Add regression test to ensure private reexports are not inlined by de…
GuillaumeGomez Oct 26, 2026
ece16b3
Remove windows-targets dependency from the root workspace
bjorn3 Apr 17, 2026
79bcc9d
Remove GenericArgRef
jdonszelmann Oct 27, 2026
d2cbecf
fixup clippy and rustdoc
jdonszelmann Oct 28, 2026
68e8bdf
fixup gcc
jdonszelmann Oct 28, 2026
101dc61
fixup miri
jdonszelmann Oct 28, 2026
ff245b9
Improve code clarity
GuillaumeGomez Oct 28, 2026
23d352a
Use getrandom instead of /scheme/rand on Redox OS
bjorn3 Oct 28, 2026
e33a98d
Use a fixed-length encoding for hash disambiguators in v0 symbols
saethlin Oct 27, 2026
0d27b39
Don't codegen `asm!` if any input operand is `!`.
zachs18 Oct 28, 2026
119529b
Add behavior tests for `Arc` and `Rc`
EFanZh Oct 29, 2026
1ddda91
fix RegionEq direction in canonical query responses
amirHdev Oct 28, 2026
558c1ec
remove unnecessary fast path from borrowck
dianne Oct 29, 2026
5dbf24c
use native interpreter impl for funnel shifts intrinsics
RalfJung Oct 29, 2026
2b154bd
fix MaybeDangling validity logic for ZST at usize::MAX
RalfJung Oct 29, 2026
ae72ce3
use adt_async_drop_tys for nested ADTs in needs_async_drop
Web4everyone32 Oct 29, 2026
b1b7ce4
Fix ICE in prelude edition lint
oli-obk Oct 29, 2026
5b53f26
Implement `advance_back_by` for `Fuse`
maxdexh Oct 29, 2026
a833369
Move `doc(keyword)` and `doc(attribute)` attributes checks from `rust…
GuillaumeGomez Oct 29, 2026
b380e2f
Add fuse tests
maxdexh Oct 29, 2026
15f4fa6
remove the unused generic Graphviz writer
TaKO8Ki Oct 29, 2026
a1d73b4
Rollup merge of #164851 - EFanZh:add-rc-behavior-tests, r=tgross35
JonathanBrouwer Oct 30, 2026
e4ef291
Rollup merge of #164989 - GuillaumeGomez:rustdoc-doc-private-perf, r=…
JonathanBrouwer Oct 30, 2026
9284cec
Rollup merge of #165079 - jdonszelmann:remove-generic-arg-ref, r=khyp…
JonathanBrouwer Oct 30, 2026
fe3ce2f
Rollup merge of #161781 - zachs18:inline-asm-diverging-inputs, r=Amanieu
JonathanBrouwer Oct 30, 2026
4aa85fd
Rollup merge of #162754 - ywxt:slice-rotate, r=Amanieu
JonathanBrouwer Oct 30, 2026
ad7415c
Rollup merge of #163252 - bjorn3:reduce_windows_targets_deps, r=Mark-…
JonathanBrouwer Oct 30, 2026
85d3895
Rollup merge of #163839 - beetrees:fix-riscv-clobber-abi-fd, r=Amanieu
JonathanBrouwer Oct 30, 2026
4db7cb6
Rollup merge of #165104 - bjorn3:redox_getrandom, r=workingjubilee
JonathanBrouwer Oct 30, 2026
2c9a353
Rollup merge of #165132 - maxdexh:iter-fuse-advance-back, r=programme…
JonathanBrouwer Oct 30, 2026
33bd0f3
Rollup merge of #165142 - TaKO8Ki:remove-unused-generic-graphviz, r=lqd
JonathanBrouwer Oct 30, 2026
875bd81
Rollup merge of #163371 - h-kurashina:fix-format-foreign-concat, r=we…
JonathanBrouwer Oct 30, 2026
56faa3d
Rollup merge of #163802 - amirHdev:solver-fixpoint-region-order, r=ad…
JonathanBrouwer Oct 30, 2026
2fe9b46
Rollup merge of #163986 - mejrs:limit_query, r=wesleywiser
JonathanBrouwer Oct 30, 2026
3812ace
Rollup merge of #164920 - estebank:issue-87291, r=wesleywiser
JonathanBrouwer Oct 30, 2026
ce8e585
Rollup merge of #164987 - Web4everyone32:async-drop-nested-sync-drop,…
JonathanBrouwer Oct 30, 2026
a0c04b0
Rollup merge of #165061 - saethlin:v0-mangling-fixed-len-disabiguator…
JonathanBrouwer Oct 30, 2026
677732e
Rollup merge of #165114 - RalfJung:funnel-shift-intrinsics, r=oli-obk
JonathanBrouwer Oct 30, 2026
1ebb4b4
Rollup merge of #165119 - dianne:remove-borrowck-fast-path, r=oli-obk
JonathanBrouwer Oct 30, 2026
b51c908
Rollup merge of #165122 - RalfJung:maybe-dangling-zst, r=oli-obk
JonathanBrouwer Oct 30, 2026
6054fea
Rollup merge of #165128 - GuillaumeGomez:move-doc-attr-checks, r=Jona…
JonathanBrouwer Oct 30, 2026
f8b65ae
Rollup merge of #165129 - oli-obk:prelude-edition-ice-use-tree, r=jie…
JonathanBrouwer Oct 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
198 changes: 60 additions & 138 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ fn parse_cfg_attr_internal<'a>(
pred_span,
lint_node_id,
Target::Crate,
rustc_attr_ir::target::AstTarget::None,
features,
ShouldEmit::ErrorsAndLints { recovery: Recovery::Allowed },
&meta,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/attributes/cfg_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ pub fn parse_cfg_select(
lint_node_id,
// Doesn't matter what the target actually is here.
Target::Crate,
rustc_attr_ir::target::AstTarget::None,
features,
ShouldEmit::ErrorsAndLints { recovery: Recovery::Allowed },
&meta,
Expand Down
20 changes: 15 additions & 5 deletions compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_ast::ast::{AttrStyle, LitKind, MetaItemLit};
use rustc_attr_ir::target::Target;
use rustc_attr_ir::target::{AstTarget, ConstTypeAstTarget, Target};
use rustc_attr_ir::{
AttributeKind, CfgEntry, CfgHideShow, DocAttribute, DocCfgHideShow, DocCfgHideShowValue,
DocInline, HideOrShow,
Expand All @@ -8,7 +8,7 @@ use rustc_data_structures::fx::{FxHashSet, FxIndexMap, IndexEntry};
use rustc_errors::{Applicability, MultiSpan, msg};
use rustc_feature::AttributeStability;
use rustc_lint_defs::builtin::{INVALID_DOC_ATTRIBUTES, UNUSED_ATTRIBUTES};
use rustc_span::{Span, Symbol, edition, sym};
use rustc_span::{Span, Symbol, edition, kw, sym};

use super::prelude::{ALL_TARGETS, AllowedTargets};
use super::{AcceptMapping, AttributeParser, template};
Expand All @@ -19,9 +19,10 @@ use crate::diagnostics::{
DocAutoCfgHideShowExpectsList, DocAutoCfgHideShowNoIdentBeforeValues,
DocAutoCfgHideShowUnexpectedItem, DocAutoCfgHideShowUnexpectedItemAfterValues,
DocAutoCfgHideShowValuesMix, DocAutoCfgWrongLiteral, DocInlineConflict, DocInlineOnlyUse,
DocKeywordNotKeyword, DocTestLiteral, DocTestTakesList, DocTestUnknown, DocUnknownAny,
DocUnknownInclude, DocUnknownPasses, DocUnknownPlugins, DocUnknownSpotlight, ExpectedNameValue,
ExpectedNoArgs, IllFormedAttributeInput, MalformedDoc, UnusedDuplicate,
DocKeywordAttributeNotAnonConst, DocKeywordNotKeyword, DocTestLiteral, DocTestTakesList,
DocTestUnknown, DocUnknownAny, DocUnknownInclude, DocUnknownPasses, DocUnknownPlugins,
DocUnknownSpotlight, ExpectedNameValue, ExpectedNoArgs, IllFormedAttributeInput, MalformedDoc,
UnusedDuplicate,
};
use crate::parser::{
ArgParser, MetaItemListParser, MetaItemOrLitParser, MetaItemParser, OwnedPathParser,
Expand Down Expand Up @@ -120,6 +121,15 @@ fn parse_keyword_and_attribute(
return;
}

if !matches!(
cx.ast_target,
AstTarget::Const(ConstTypeAstTarget::ConstItem(item))
if item.ident.name == kw::Underscore)
{
cx.emit_err(DocKeywordAttributeNotAnonConst { span, attr_name });
return;
}

*attr_value = Some((value, span));
}

Expand Down
7 changes: 3 additions & 4 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::sync::LazyLock;
use std::sync::atomic::{AtomicBool, Ordering};

use rustc_ast::{AttrStyle, MetaItemLit, Safety};
use rustc_attr_ir::target::Target;
use rustc_attr_ir::target::{AstTarget, Target};
use rustc_attr_ir::{AttrPath, Attribute, AttributeKind, HashIgnoredAttrId};
use rustc_data_structures::sync::{DynSend, DynSync};
use rustc_errors::{Diag, DiagCtxtHandle, DiagLocation, Diagnostic, Level, MultiSpan};
Expand Down Expand Up @@ -804,6 +804,8 @@ pub struct SharedContext<'p, 'sess> {
/// The span of the syntactical component this attribute was applied to
pub(crate) target_span: Span,
pub(crate) target: Target,
/// The AST item these attributes were applied to.
pub(crate) ast_target: AstTarget<'p>,

pub(crate) emit_lint: &'p mut dyn FnMut(LintId, MultiSpan, EmitAttribute),

Expand Down Expand Up @@ -863,9 +865,6 @@ pub(crate) struct FinalizeCheckContext<'p, 'sess> {
///
/// Unlike [`all_attrs`](Self::all_attrs), this contains the fully parsed attributes.
pub(crate) parsed_attrs: &'p [Attribute],

/// The AST item these attributes were applied to.
pub(crate) ast_target: rustc_attr_ir::target::AstTarget<'p>,
}

impl<'p, 'sess: 'p> Deref for FinalizeCheckContext<'p, 'sess> {
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2199,3 +2199,11 @@ pub(crate) struct Unused {
#[derive(Diagnostic)]
#[diag("use of deprecated `no_link` attribute")]
pub(crate) struct NoLinkAttrUsed;

#[derive(Diagnostic)]
#[diag("`#[doc({$attr_name} = \"...\")]` should be used on anonymous constants")]
pub(crate) struct DocKeywordAttributeNotAnonConst {
#[primary_span]
pub span: Span,
pub attr_name: Symbol,
}
8 changes: 7 additions & 1 deletion compiler/rustc_attr_parsing/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ impl<'sess> AttributeParser<'sess> {
target_span: Span,
target_node_id: NodeId,
target: Target,
ast_target: AstTarget<'_>,
features: Option<&'sess Features>,
emit_errors: ShouldEmit,
parse_fn: fn(cx: &mut AcceptContext<'_, '_>, item: &ArgParser) -> Option<T>,
Expand Down Expand Up @@ -208,6 +209,7 @@ impl<'sess> AttributeParser<'sess> {
target_span,
target_node_id,
target,
ast_target,
features,
emit_errors,
&args,
Expand All @@ -230,6 +232,7 @@ impl<'sess> AttributeParser<'sess> {
target_span: Span,
target_node_id: NodeId,
target: Target,
ast_target: AstTarget<'_>,
features: Option<&'sess Features>,
should_emit: ShouldEmit,
args: &I,
Expand Down Expand Up @@ -257,6 +260,7 @@ impl<'sess> AttributeParser<'sess> {
emit_lint: &mut emit_lint,
#[cfg(debug_assertions)]
has_lint_been_emitted: AtomicBool::new(false),
ast_target,
},
attr_span,
inner_span,
Expand Down Expand Up @@ -423,6 +427,7 @@ impl<'sess> AttributeParser<'sess> {
emit_lint: &mut emit_lint,
#[cfg(debug_assertions)]
has_lint_been_emitted: AtomicBool::new(false),
ast_target,
},
attr_span,
inner_span,
Expand Down Expand Up @@ -494,6 +499,7 @@ impl<'sess> AttributeParser<'sess> {
cx: self,
target_span,
target,
ast_target,
emit_lint: &mut emit_lint,
#[cfg(debug_assertions)]
has_lint_been_emitted: AtomicBool::new(false),
Expand All @@ -518,13 +524,13 @@ impl<'sess> AttributeParser<'sess> {
cx: self,
target_span,
target,
ast_target,
emit_lint: &mut emit_lint,
#[cfg(debug_assertions)]
has_lint_been_emitted: AtomicBool::new(false),
},
all_attrs: &attr_paths,
parsed_attrs: &attributes,
ast_target,
},
attr_span,
);
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_borrowck/src/borrow_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ impl<'a, 'tcx> GatherBorrows<'a, 'tcx> {
kind: mir::BorrowKind,
location: Location,
target_adt: ty::AdtDef<'tcx>,
target_args: &'tcx ty::List<ty::GenericArg<'tcx>>,
target_args: ty::GenericArgs<'tcx>,
target_place: mir::Place<'tcx>,
source_adt: ty::AdtDef<'tcx>,
source_args: &'tcx ty::List<ty::GenericArg<'tcx>>,
source_args: ty::GenericArgs<'tcx>,
source_place: mir::Place<'tcx>,
) {
let mut did_reborrow = false;
Expand Down Expand Up @@ -384,10 +384,10 @@ impl<'a, 'tcx> GatherBorrows<'a, 'tcx> {
kind,
location,
*target_field_adt,
target_field_args,
*target_field_args,
target_field_place,
*source_field_adt,
source_field_args,
*source_field_args,
source_field_place,
);
}
Expand Down
10 changes: 0 additions & 10 deletions compiler/rustc_borrowck/src/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,6 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
.map(|bs| bs.iter().copied())
.into_flat_iter();

// If the borrowed place is a local with no projections, all other borrows of this
// local must conflict. This is purely an optimization so we don't have to call
// `places_conflict::borrow_conflicts_with_place` for every borrow.
if place.projection.is_empty() {
if !self.body.local_decls[place.local].is_ref_to_static() {
state.kill_all(other_borrows_of_local);
}
return;
}

// By passing `PlaceConflictBias::NoOverlap`, we conservatively assume that any given
// pair of array indices are not equal, so that when `places_conflict` returns true, we
// will be assured that two places being compared definitely denotes the same sets of
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {
// In practice unless there are more than one field with the same type, we'll be
// suggesting a single field at a type, because we don't aggregate multiple borrow
// checker errors involving the functional record update syntax into a single one.
let field_ty = field.ty(self.infcx.tcx, args).skip_norm_wip();
let field_ty = field.ty(self.infcx.tcx, *args).skip_norm_wip();
let ident = field.ident(self.infcx.tcx);
if field_ty == ty && fields.iter().all(|field| field.ident.name != ident.name) {
// Suggest adding field and cloning it.
Expand Down Expand Up @@ -1371,7 +1371,7 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {
&& let Some(local_did) = def.did().as_local()
&& def.variants().iter().all(|variant| {
variant.fields.iter().all(|field| {
self.implements_clone(field.ty(self.infcx.tcx, args).skip_norm_wip())
self.implements_clone(field.ty(self.infcx.tcx, *args).skip_norm_wip())
})
})
{
Expand Down
59 changes: 29 additions & 30 deletions compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {

err.span_label(closure_span, "in this closure");
let closure_arg_has_fn_trait_bound =
|callee_def_id, input_index, generic_args: ty::GenericArgsRef<'tcx>| {
|callee_def_id, input_index, generic_args: ty::GenericArgs<'tcx>| {
let sig = tcx.fn_sig(callee_def_id).instantiate(tcx, generic_args).skip_binder();
let Some(input_ty): Option<Ty<'tcx>> = sig.inputs().get(input_index).copied()
else {
Expand All @@ -1247,40 +1247,39 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {

// If the HIR node is a function or method call, get the DefId
// of the callee function or method, the span, and argument info for the call expr.
let get_call_details =
|| -> Option<(DefId, Span, usize, usize, ty::GenericArgsRef<'tcx>)> {
let hir::Node::Expr(hir::Expr { hir_id, kind, .. }) = node else {
return None;
};
let get_call_details = || -> Option<(DefId, Span, usize, usize, ty::GenericArgs<'tcx>)> {
let hir::Node::Expr(hir::Expr { hir_id, kind, .. }) = node else {
return None;
};

let typeck_results = tcx.typeck(def_id);
let typeck_results = tcx.typeck(def_id);

match kind {
hir::ExprKind::Call(expr, args) => {
if let Some(ty::FnDef(def_id, generic_args)) =
typeck_results.node_type_opt(expr.hir_id).as_ref().map(|ty| ty.kind())
{
let arg_pos = args.iter().position(|arg| arg.hir_id == closure_id)?;
Some((
*def_id,
expr.span,
arg_pos,
arg_pos,
generic_args.no_bound_vars().unwrap(),
))
} else {
None
}
}
hir::ExprKind::MethodCall(_, _, args, span) => {
match kind {
hir::ExprKind::Call(expr, args) => {
if let Some(ty::FnDef(def_id, generic_args)) =
typeck_results.node_type_opt(expr.hir_id).as_ref().map(|ty| ty.kind())
{
let arg_pos = args.iter().position(|arg| arg.hir_id == closure_id)?;
let def_id = typeck_results.type_dependent_def_id(*hir_id)?;
let generic_args = typeck_results.node_args_opt(*hir_id)?;
Some((def_id, *span, arg_pos, arg_pos + 1, generic_args))
Some((
*def_id,
expr.span,
arg_pos,
arg_pos,
generic_args.no_bound_vars().unwrap(),
))
} else {
None
}
_ => None,
}
};
hir::ExprKind::MethodCall(_, _, args, span) => {
let arg_pos = args.iter().position(|arg| arg.hir_id == closure_id)?;
let def_id = typeck_results.type_dependent_def_id(*hir_id)?;
let generic_args = typeck_results.node_args_opt(*hir_id)?;
Some((def_id, *span, arg_pos, arg_pos + 1, generic_args))
}
_ => None,
}
};

// If we can detect the expression to be a function or method call where the closure was
// an argument, we point at the function or method definition argument...
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc_errors::Diag;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_middle::ty::print::RegionHighlightMode;
use rustc_middle::ty::{self, GenericArgKind, GenericArgsRef, RegionVid, Ty, Unnormalized};
use rustc_middle::ty::{self, GenericArgKind, GenericArgs, RegionVid, Ty, Unnormalized};
use rustc_span::{DUMMY_SP, Span, Symbol, bug, kw, span_bug, sym};
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use tracing::{debug, instrument};
Expand Down Expand Up @@ -669,7 +669,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
_ => {
if let Some(last_segment) = path.segments.last()
&& let Some(highlight) = self.match_adt_and_segment(
args,
*args,
needle_fr,
last_segment,
search_stack,
Expand Down Expand Up @@ -713,7 +713,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
/// types+hir to search through).
fn match_adt_and_segment<'hir>(
&self,
args: GenericArgsRef<'tcx>,
args: GenericArgs<'tcx>,
needle_fr: RegionVid,
last_segment: &'hir hir::PathSegment<'hir>,
search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty<'hir>)>,
Expand All @@ -736,7 +736,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
/// `search_stack` the types+hir to search through.
fn try_match_adt_and_generic_args<'hir>(
&self,
args: GenericArgsRef<'tcx>,
args: GenericArgs<'tcx>,
needle_fr: RegionVid,
hir_args: &'hir hir::GenericArgs<'hir>,
search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty<'hir>)>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ struct PropagatedBorrowCheckResults<'tcx> {
used_mut_upvars: SmallVec<[FieldIdx; 8]>,
}

type DeferredClosureRequirements<'tcx> = Vec<(LocalDefId, ty::GenericArgsRef<'tcx>, Locations)>;
type DeferredClosureRequirements<'tcx> = Vec<(LocalDefId, ty::GenericArgs<'tcx>, Locations)>;

/// After we borrow check a closure, we are left with various
/// requirements that we have inferred between the free regions that
Expand Down
8 changes: 6 additions & 2 deletions compiler/rustc_borrowck/src/places_conflict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,12 @@ fn place_components_conflict<'tcx>(
debug!("borrow_conflicts_with_place: shallow access behind ptr");
return false;
}
(ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Not), _) => {
// Shouldn't be tracked
(ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Not), _)
if !(base.projection.is_empty()
&& body.local_decls[borrow_local].is_ref_to_thread_local()) =>
{
// The only shared borrows we track are from temporaries created as references
// to thread-local statics. See `crate::place_ext::PlaceExt::ignore_borrow`.
bug!("Tracking borrow behind shared reference.");
}
(ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Mut), AccessDepth::Drop) => {
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_borrowck/src/polonius/liveness_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for VarianceExtractor<'_, 'tcx> {
a_ty: Ty<'tcx>,
_: Ty<'tcx>,
def_id: DefId,
a_args: ty::GenericArgsRef<'tcx>,
b_args: ty::GenericArgsRef<'tcx>,
_: impl FnOnce(ty::GenericArgsRef<'tcx>) -> Ty<'tcx>,
a_args: ty::GenericArgs<'tcx>,
b_args: ty::GenericArgs<'tcx>,
_: impl FnOnce(ty::GenericArgs<'tcx>) -> Ty<'tcx>,
) -> RelateResult<'tcx, Ty<'tcx>> {
let variances = self.cx().variances_of(def_id);
relate_args_with_variances(self, variances, a_args, b_args)?;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rustc_data_structures::fx::FxHashMap;
use rustc_hir::def_id::DefId;
use rustc_middle::ty::{
self, Flags, GenericArgsRef, Region, RegionVid, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable,
self, Flags, GenericArgs, Region, RegionVid, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable,
TypeVisitor,
};
use rustc_span::bug;
Expand Down Expand Up @@ -147,7 +147,7 @@ impl<'tcx> CollectMemberConstraintsVisitor<'_, '_, 'tcx> {
fn cx(&self) -> TyCtxt<'tcx> {
self.rcx.infcx.tcx
}
fn visit_closure_args(&mut self, def_id: DefId, args: GenericArgsRef<'tcx>) {
fn visit_closure_args(&mut self, def_id: DefId, args: GenericArgs<'tcx>) {
let generics = self.cx().generics_of(def_id);
for arg in args.iter().skip(generics.parent_count) {
arg.visit_with(self);
Expand Down
Loading
Loading