Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2c31b0d
check if redundant args spans belong to the same context
TaKO8Ki Jan 2, 2026
31531b3
Add regression tests for keyword-in-identifier-position recovery ICE
jieyouxu Jan 2, 2026
79c4727
Don't try to recover keyword as non-keyword identifier
jieyouxu Jan 2, 2026
308c607
remove borrowck handling for inline const patterns
dianne Jan 8, 2026
98d3026
Resolve intra-doc links to variant fields behind type aliases
camelid Jan 2, 2026
a90e041
rustdoc: Refactor `def_id_to_res` as `ty_to_res`
camelid Jan 2, 2026
945f3f9
rustdoc: Use trait as root `Res` instead of assoc item
camelid Jan 2, 2026
f503b89
rustdoc: Extract helper function for resolving assoc items on ADTs
camelid Jan 2, 2026
2c98517
Refactor out many free functions from intra-doc link code
camelid Jan 2, 2026
2b618ed
rustdoc: Correctly resolve variant and struct fields on alias
camelid Jan 2, 2026
8a8b31a
compiler: Make Externally Implementable Item (eii) macros "semiopaque"
Enselic Jan 12, 2026
467a2d2
use self instead of super
jdonszelmann Jan 11, 2026
df55233
disallow in statement position
jdonszelmann Jan 11, 2026
8dd701c
add test for rejecting EIIs in statement position
jdonszelmann Jan 11, 2026
d0b7603
Remove all usage of FeedConstTy::No
mu001999 Jan 10, 2026
e27fcfd
Remove FeedConstTy
mu001999 Jan 11, 2026
37f20b7
Bless tests
mu001999 Jan 11, 2026
80bd069
Fix review comments
mu001999 Jan 12, 2026
12b4b72
Add test for issue 151048
mu001999 Jan 13, 2026
2b209a6
Avoid serde dependency in build_helper when not necessary
bjorn3 Jan 14, 2026
7d80e7d
rustc_target: Remove unused Arch::PowerPC64LE
taiki-e Jan 14, 2026
c1bcae0
Fix WASI threading regression with minimal invasive change
cdmurph32 Jan 12, 2026
00384df
Delete `MetaItemOrLitParser::Err`
mejrs Jan 14, 2026
8b52c73
resolve: Relax some asserts in glob overwriting and add tests
petrochenkov Jan 10, 2026
81ef42d
resolve: Consistently use old decls before new decls in interfaces
petrochenkov Jan 10, 2026
1c3841b
Add a test for issue 150977
petrochenkov Jan 11, 2026
83c5f2c
resolve: Relax one more assert in glob overwriting and add a test
petrochenkov Jan 11, 2026
9f1cf9e
Add temporary new bors e-mail address to the mailmap
Kobzol Jan 14, 2026
92db7b2
Recover parse gracefully from `<const N>`
estebank Jan 14, 2026
436fb87
Rename `rust.use-lld` to `rust.bootstrap-override-lld` in INSTALL.md
zzjas Jan 14, 2026
a496d1d
Rollup merge of #150585 - issue-149559, r=petrochenkov
JonathanBrouwer Jan 14, 2026
e04af73
Rollup merge of #150586 - intra-doc-assoc-alias, r=GuillaumeGomez
JonathanBrouwer Jan 14, 2026
9ef7679
Rollup merge of #150590 - ident-kw-ice, r=petrochenkov
JonathanBrouwer Jan 14, 2026
7cab643
Rollup merge of #150817 - cleanup-inline-const-pat-borrowck, r=lcnr
JonathanBrouwer Jan 14, 2026
6cdcef5
Rollup merge of #150939 - impasse, r=estebank
JonathanBrouwer Jan 14, 2026
27e6ef9
Rollup merge of #150962 - rm/feed_const_ty, r=BoxyUwU
JonathanBrouwer Jan 14, 2026
d23e780
Rollup merge of #150966 - arch-powerpc64le, r=petrochenkov
JonathanBrouwer Jan 14, 2026
46d4bbf
Rollup merge of #150971 - disallow-eii-in-statement-position, r=waffl…
JonathanBrouwer Jan 14, 2026
2c17e0e
Rollup merge of #151016 - fix_wasi_threading, r=alexcrichton
JonathanBrouwer Jan 14, 2026
daae660
Rollup merge of #151046 - semiopaque-eii-fix, r=jdonszelmann
JonathanBrouwer Jan 14, 2026
00501de
Rollup merge of #151099 - issue-84327-2, r=fmease
JonathanBrouwer Jan 14, 2026
92737ca
Rollup merge of #151117 - reduce_deps, r=Kobzol
JonathanBrouwer Jan 14, 2026
c7f7c3f
Rollup merge of #151127 - delete_variant, r=JonathanBrouwer
JonathanBrouwer Jan 14, 2026
1a1056f
Rollup merge of #151128 - new-bors-mailmap, r=lqd
JonathanBrouwer Jan 14, 2026
4523c2e
Rollup merge of #151138 - fix-install-lld, r=Kobzol
JonathanBrouwer Jan 14, 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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ boolean_coercion <[email protected]>
Boris Egorov <[email protected]> <[email protected]>
bors <[email protected]> bors[bot] <26634292+bors[bot]@users.noreply.github.com>
bors <[email protected]> bors[bot] <bors[bot]@users.noreply.github.com>
bors <[email protected]> <122020455+rust-bors[bot]@users.noreply.github.com>
BoxyUwU <[email protected]>
BoxyUwU <[email protected]> <[email protected]>
Braden Nelson <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ See [the rustc-dev-guide for more info][sysllvm].
--set llvm.ninja=false \
--set rust.debug-assertions=false \
--set rust.jemalloc \
--set rust.use-lld=true \
--set rust.bootstrap-override-lld=true \
--set rust.lto=thin \
--set rust.codegen-units=1
```
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ pub fn parse_cfg_entry<S: Stage>(
LitKind::Bool(b) => CfgEntry::Bool(b, lit.span),
_ => return Err(cx.expected_identifier(lit.span)),
},
MetaItemOrLitParser::Err(_, err) => return Err(*err),
})
}

Expand Down
6 changes: 0 additions & 6 deletions compiler/rustc_attr_parsing/src/attributes/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,6 @@ impl DocParser {
MetaItemOrLitParser::Lit(lit) => {
cx.unexpected_literal(lit.span);
}
MetaItemOrLitParser::Err(..) => {
// already had an error here, move on.
}
}
}
}
Expand Down Expand Up @@ -600,9 +597,6 @@ impl DocParser {
MetaItemOrLitParser::Lit(lit) => {
cx.expected_name_value(lit.span, None);
}
MetaItemOrLitParser::Err(..) => {
// already had an error here, move on.
}
}
}
}
Expand Down
8 changes: 3 additions & 5 deletions compiler/rustc_attr_parsing/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use rustc_parse::exp;
use rustc_parse::parser::{ForceCollect, Parser, PathStyle, token_descr};
use rustc_session::errors::{create_lit_error, report_lit_error};
use rustc_session::parse::ParseSess;
use rustc_span::{ErrorGuaranteed, Ident, Span, Symbol, sym};
use rustc_span::{Ident, Span, Symbol, sym};
use thin_vec::ThinVec;

use crate::ShouldEmit;
Expand Down Expand Up @@ -192,7 +192,6 @@ impl ArgParser {
pub enum MetaItemOrLitParser {
MetaItemParser(MetaItemParser),
Lit(MetaItemLit),
Err(Span, ErrorGuaranteed),
}

impl MetaItemOrLitParser {
Expand All @@ -210,21 +209,20 @@ impl MetaItemOrLitParser {
generic_meta_item_parser.span()
}
MetaItemOrLitParser::Lit(meta_item_lit) => meta_item_lit.span,
MetaItemOrLitParser::Err(span, _) => *span,
}
}

pub fn lit(&self) -> Option<&MetaItemLit> {
match self {
MetaItemOrLitParser::Lit(meta_item_lit) => Some(meta_item_lit),
_ => None,
MetaItemOrLitParser::MetaItemParser(_) => None,
}
}

pub fn meta_item(&self) -> Option<&MetaItemParser> {
match self {
MetaItemOrLitParser::MetaItemParser(parser) => Some(parser),
_ => None,
MetaItemOrLitParser::Lit(_) => None,
}
}
}
Expand Down
67 changes: 9 additions & 58 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use rustc_infer::infer::{
BoundRegionConversionTime, InferCtxt, NllRegionVariableOrigin, RegionVariableOrigin,
};
use rustc_infer::traits::PredicateObligations;
use rustc_middle::bug;
use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor};
use rustc_middle::mir::*;
use rustc_middle::traits::query::NoSolution;
Expand All @@ -28,7 +29,6 @@ use rustc_middle::ty::{
self, CanonicalUserTypeAnnotation, CanonicalUserTypeAnnotations, CoroutineArgsExt,
GenericArgsRef, Ty, TyCtxt, TypeVisitableExt, UserArgs, UserTypeAnnotationIndex, fold_regions,
};
use rustc_middle::{bug, span_bug};
use rustc_mir_dataflow::move_paths::MoveData;
use rustc_mir_dataflow::points::DenseLocationMap;
use rustc_span::def_id::CRATE_DEF_ID;
Expand Down Expand Up @@ -387,18 +387,10 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
#[instrument(skip(self), level = "debug")]
fn check_user_type_annotations(&mut self) {
debug!(?self.user_type_annotations);
let tcx = self.tcx();
for user_annotation in self.user_type_annotations {
let CanonicalUserTypeAnnotation { span, ref user_ty, inferred_ty } = *user_annotation;
let annotation = self.instantiate_canonical(span, user_ty);
if let ty::UserTypeKind::TypeOf(def, args) = annotation.kind
&& let DefKind::InlineConst = tcx.def_kind(def)
{
assert!(annotation.bounds.is_empty());
self.check_inline_const(inferred_ty, def.expect_local(), args, span);
} else {
self.ascribe_user_type(inferred_ty, annotation, span);
}
self.ascribe_user_type(inferred_ty, annotation, span);
}
}

Expand Down Expand Up @@ -560,36 +552,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
self.constraints.liveness_constraints.add_location(region, location);
}
}

fn check_inline_const(
&mut self,
inferred_ty: Ty<'tcx>,
def_id: LocalDefId,
args: UserArgs<'tcx>,
span: Span,
) {
assert!(args.user_self_ty.is_none());
let tcx = self.tcx();
let const_ty = tcx.type_of(def_id).instantiate(tcx, args.args);
if let Err(terr) =
self.eq_types(const_ty, inferred_ty, Locations::All(span), ConstraintCategory::Boring)
{
span_bug!(
span,
"bad inline const pattern: ({:?} = {:?}) {:?}",
const_ty,
inferred_ty,
terr
);
}
let args = self.infcx.resolve_vars_if_possible(args.args);
let predicates = self.prove_closure_bounds(tcx, def_id, args, Locations::All(span));
self.normalize_and_prove_instantiated_predicates(
def_id.to_def_id(),
predicates,
Locations::All(span),
);
}
}

impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
Expand Down Expand Up @@ -1731,12 +1693,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
let def_id = uv.def;
if tcx.def_kind(def_id) == DefKind::InlineConst {
let def_id = def_id.expect_local();
let predicates = self.prove_closure_bounds(
tcx,
def_id,
uv.args,
location.to_locations(),
);
let predicates = self.prove_closure_bounds(tcx, def_id, uv.args, location);
self.normalize_and_prove_instantiated_predicates(
def_id.to_def_id(),
predicates,
Expand Down Expand Up @@ -2519,15 +2476,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
// clauses on the struct.
AggregateKind::Closure(def_id, args)
| AggregateKind::CoroutineClosure(def_id, args)
| AggregateKind::Coroutine(def_id, args) => (
def_id,
self.prove_closure_bounds(
tcx,
def_id.expect_local(),
args,
location.to_locations(),
),
),
| AggregateKind::Coroutine(def_id, args) => {
(def_id, self.prove_closure_bounds(tcx, def_id.expect_local(), args, location))
}

AggregateKind::Array(_) | AggregateKind::Tuple | AggregateKind::RawPtr(..) => {
(CRATE_DEF_ID.to_def_id(), ty::InstantiatedPredicates::empty())
Expand All @@ -2546,12 +2497,12 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
tcx: TyCtxt<'tcx>,
def_id: LocalDefId,
args: GenericArgsRef<'tcx>,
locations: Locations,
location: Location,
) -> ty::InstantiatedPredicates<'tcx> {
let root_def_id = self.root_cx.root_def_id();
// We will have to handle propagated closure requirements for this closure,
// but need to defer this until the nested body has been fully borrow checked.
self.deferred_closure_requirements.push((def_id, args, locations));
self.deferred_closure_requirements.push((def_id, args, location.to_locations()));

// Equate closure args to regions inherited from `root_def_id`. Fixes #98589.
let typeck_root_args = ty::GenericArgs::identity_for_item(tcx, root_def_id);
Expand All @@ -2575,7 +2526,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
if let Err(_) = self.eq_args(
typeck_root_args,
parent_args,
locations,
location.to_locations(),
ConstraintCategory::BoringNoLocation,
) {
span_mirbug!(
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_builtin_macros/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ builtin_macros_eii_only_once = `#[{$name}]` can only be specified once
builtin_macros_eii_shared_macro_expected_function = `#[{$name}]` is only valid on functions
builtin_macros_eii_shared_macro_expected_max_one_argument = `#[{$name}]` expected no arguments or a single argument: `#[{$name}(default)]`
builtin_macros_eii_shared_macro_in_statement_position = `#[{$name}]` can only be used on functions inside a module
.label = `#[{$name}]` is used on this item, which is part of another item's local scope
builtin_macros_env_not_defined = environment variable `{$var}` not defined at compile time
.cargo = Cargo sets build script variables at run time. Use `std::env::var({$var_expr})` instead
Expand Down
Loading
Loading