Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
09f774d
Mark all arms as being from a desugaring when lowering `?` and for lo…
Jarcho Nov 23, 2025
2135bc1
Remove `rustc_lexer::cursor` module.
nnethercote Jan 21, 2026
506ea79
Move two `rustc_parse` error diagnostics.
nnethercote Jan 21, 2026
b33fdb2
Move `TokenDescription`.
nnethercote Jan 21, 2026
849725e
fix refining_impl_trait suggestion with return_type_notation
enthropy7 Jan 27, 2026
7b62d97
Mention implicit bounds from `#[derive(Clone)]` on moved value
estebank Jan 17, 2026
679f38c
On E0277 pointing at bound in derive, suggest manual impl
estebank Jan 18, 2026
54fe73f
Tweak span labels caused by trait bound coming from derive expansion
estebank Jan 18, 2026
b88fb8a
Mention that the trait could be manually impld in E0599
estebank Jan 18, 2026
085da0c
On E0308 caused by cloning a reference due to missing bounds, account…
estebank Jan 18, 2026
aebf1fd
Keep span of type in builtin derive macros expansions
estebank Jan 18, 2026
b9e5cf7
Fix incorrect suggestion caused by change in derive expansion Span
estebank Jan 18, 2026
dd81483
Tweak span labels
estebank Jan 18, 2026
20000ca
Point at destructor when denying deriving `Copy`
estebank Jan 18, 2026
23b766c
fix typo
estebank Jan 18, 2026
b534229
remove commented out code
estebank Jan 19, 2026
6c8eee8
reword span label
estebank Jan 19, 2026
879633f
Change note to help
estebank Jan 19, 2026
8543404
Tweak span in E0599
estebank Jan 19, 2026
dffec20
Tweak help to unify formatting and wording
estebank Jan 19, 2026
c95210f
Do not suggest manual `impl Copy`
estebank Feb 1, 2026
6756561
fix test after rebase
estebank Feb 1, 2026
b5d9b7f
escape symbol names in global asm
usamoi Feb 1, 2026
13141af
Consolidate type const checks on `tcx.is_type_const`
eggyal Feb 4, 2026
9112039
Port rustc_effective_visibility to the new attribute parser
jdonszelmann Feb 5, 2026
dd61998
Convert to inline diagnostics in `rustc_borrowck`
JonathanBrouwer Feb 4, 2026
6782a19
Register functions in translation
JonathanBrouwer Feb 4, 2026
55d1ba1
Convert to inline diagnostics in `rustc_trait_selection`
JonathanBrouwer Feb 4, 2026
b356b93
Rollup merge of #151278 - estebank:issue-108894, r=davidtwco
JonathanBrouwer Feb 5, 2026
976f17d
Rollup merge of #151955 - usamoi:escape, r=davidtwco
JonathanBrouwer Feb 5, 2026
ef202ae
Rollup merge of #149329 - Jarcho:for_question_ctxt, r=davidtwco
JonathanBrouwer Feb 5, 2026
905bb46
Rollup merge of #151474 - nnethercote:circ-deps, r=davidtwco
JonathanBrouwer Feb 5, 2026
f224871
Rollup merge of #151744 - enthropy7:fix-refining-impl-trait-rtn, r=da…
JonathanBrouwer Feb 5, 2026
220c5df
Rollup merge of #152107 - JonathanBrouwer:convert_borrowck, r=lqd
JonathanBrouwer Feb 5, 2026
b3dea77
Rollup merge of #152117 - JonathanBrouwer:convert_trait_selection2, r…
JonathanBrouwer Feb 5, 2026
e44f063
Rollup merge of #152136 - eggyal:consolidate-type-const-checks, r=Box…
JonathanBrouwer Feb 5, 2026
76be30a
Rollup merge of #152170 - jdonszelmann:port-rustc-effective-visibilit…
JonathanBrouwer Feb 5, 2026
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
4 changes: 0 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3571,7 +3571,6 @@ dependencies = [
"rustc_abi",
"rustc_data_structures",
"rustc_errors",
"rustc_fluent_macro",
"rustc_graphviz",
"rustc_hir",
"rustc_index",
Expand Down Expand Up @@ -3771,7 +3770,6 @@ dependencies = [
"rustc_abi",
"rustc_ast",
"rustc_ast_pretty",
"rustc_borrowck",
"rustc_codegen_ssa",
"rustc_const_eval",
"rustc_data_structures",
Expand All @@ -3797,7 +3795,6 @@ dependencies = [
"rustc_session",
"rustc_span",
"rustc_target",
"rustc_trait_selection",
"serde_json",
"shlex",
"tracing",
Expand Down Expand Up @@ -4724,7 +4721,6 @@ dependencies = [
"rustc_ast",
"rustc_data_structures",
"rustc_errors",
"rustc_fluent_macro",
"rustc_hir",
"rustc_infer",
"rustc_macros",
Expand Down
21 changes: 11 additions & 10 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -966,14 +966,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::ExprKind::Break(this.lower_loop_destination(None), Some(x_expr));
this.arena.alloc(this.expr(gen_future_span, expr_break))
});
self.arm(ready_pat, break_x)
self.arm(ready_pat, break_x, span)
};

// `::std::task::Poll::Pending => {}`
let pending_arm = {
let pending_pat = self.pat_lang_item_variant(span, hir::LangItem::PollPending, &[]);
let empty_block = self.expr_block_empty(span);
self.arm(pending_pat, empty_block)
self.arm(pending_pat, empty_block, span)
};

let inner_match_stmt = {
Expand Down Expand Up @@ -1027,7 +1027,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
});

// mut __awaitee => loop { ... }
let awaitee_arm = self.arm(awaitee_pat, loop_expr);
let awaitee_arm = self.arm(awaitee_pat, loop_expr, span);

// `match ::std::future::IntoFuture::into_future(<expr>) { ... }`
let into_future_expr = match await_kind {
Expand Down Expand Up @@ -1817,7 +1817,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let break_expr =
self.with_loop_scope(loop_hir_id, |this| this.expr_break_alloc(for_span));
let pat = self.pat_none(for_span);
self.arm(pat, break_expr)
self.arm(pat, break_expr, for_span)
};

// Some(<pat>) => <body>,
Expand All @@ -1826,7 +1826,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let body_block =
self.with_loop_scope(loop_hir_id, |this| this.lower_block(body, false));
let body_expr = self.arena.alloc(self.expr_block(body_block));
self.arm(some_pat, body_expr)
self.arm(some_pat, body_expr, for_span)
};

// `mut iter`
Expand Down Expand Up @@ -1885,7 +1885,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let loop_expr = self.arena.alloc(hir::Expr { hir_id: loop_hir_id, kind, span: for_span });

// `mut iter => { ... }`
let iter_arm = self.arm(iter_pat, loop_expr);
let iter_arm = self.arm(iter_pat, loop_expr, for_span);

let match_expr = match loop_kind {
ForLoopKind::For => {
Expand Down Expand Up @@ -1930,7 +1930,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::LangItem::IntoAsyncIterIntoIter,
arena_vec![self; head],
);
let iter_arm = self.arm(async_iter_pat, inner_match_expr);
let iter_arm = self.arm(async_iter_pat, inner_match_expr, for_span);
self.arena.alloc(self.expr_match(
for_span,
iter,
Expand Down Expand Up @@ -1997,7 +1997,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let val_expr = self.expr_ident(span, val_ident, val_pat_nid);
self.lower_attrs(val_expr.hir_id, &attrs, span, Target::Expression);
let continue_pat = self.pat_cf_continue(unstable_span, val_pat);
self.arm(continue_pat, val_expr)
self.arm(continue_pat, val_expr, try_span)
};

// `ControlFlow::Break(residual) =>
Expand Down Expand Up @@ -2040,7 +2040,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.lower_attrs(ret_expr.hir_id, &attrs, span, Target::Expression);

let break_pat = self.pat_cf_break(try_span, residual_local);
self.arm(break_pat, ret_expr)
self.arm(break_pat, ret_expr, try_span)
};

hir::ExprKind::Match(
Expand Down Expand Up @@ -2368,12 +2368,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
&mut self,
pat: &'hir hir::Pat<'hir>,
expr: &'hir hir::Expr<'hir>,
span: Span,
) -> hir::Arm<'hir> {
hir::Arm {
hir_id: self.next_id(),
pat,
guard: None,
span: self.lower_span(expr.span),
span: self.lower_span(span),
body: expr,
}
}
Expand Down
39 changes: 39 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/rustc_internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,3 +721,42 @@ impl<S: Stage> CombineAttributeParser<S> for RustcThenThisWouldNeedParser {
Some(ident)
}
}

pub(crate) struct RustcEffectiveVisibilityParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcEffectiveVisibilityParser {
const PATH: &'static [Symbol] = &[sym::rustc_effective_visibility];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Use),
Allow(Target::Static),
Allow(Target::Const),
Allow(Target::Fn),
Allow(Target::Closure),
Allow(Target::Mod),
Allow(Target::ForeignMod),
Allow(Target::TyAlias),
Allow(Target::Enum),
Allow(Target::Variant),
Allow(Target::Struct),
Allow(Target::Field),
Allow(Target::Union),
Allow(Target::Trait),
Allow(Target::TraitAlias),
Allow(Target::Impl { of_trait: false }),
Allow(Target::Impl { of_trait: true }),
Allow(Target::AssocConst),
Allow(Target::Method(MethodKind::Inherent)),
Allow(Target::Method(MethodKind::Trait { body: false })),
Allow(Target::Method(MethodKind::Trait { body: true })),
Allow(Target::Method(MethodKind::TraitImpl)),
Allow(Target::AssocTy),
Allow(Target::ForeignFn),
Allow(Target::ForeignStatic),
Allow(Target::ForeignTy),
Allow(Target::MacroDef),
Allow(Target::PatField),
Allow(Target::Crate),
]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcEffectiveVisibility;
}
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcDumpPredicatesParser>>,
Single<WithoutArgs<RustcDumpUserArgsParser>>,
Single<WithoutArgs<RustcDumpVtableParser>>,
Single<WithoutArgs<RustcEffectiveVisibilityParser>>,
Single<WithoutArgs<RustcHasIncoherentInherentImplsParser>>,
Single<WithoutArgs<RustcHiddenTypeOfOpaquesParser>>,
Single<WithoutArgs<RustcLintOptTyParser>>,
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ polonius-engine = "0.13.0"
rustc_abi = { path = "../rustc_abi" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
rustc_graphviz = { path = "../rustc_graphviz" }
rustc_hir = { path = "../rustc_hir" }
rustc_index = { path = "../rustc_index" }
Expand Down
Loading
Loading