Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
75d8687
add span to struct pattern rest (..)
Erk- Aug 23, 2025
fc7de99
Ensure we emit an allocator shim when only some crate types need one
bjorn3 Aug 28, 2025
1d30900
Fix typo in comment
bjorn3 Aug 28, 2025
f4888c2
Correctly handle different crate types disagreeing if the allocator s…
bjorn3 Aug 28, 2025
8930d3a
resolve: Avoid a regression from splitting prelude into two scopes
petrochenkov Aug 28, 2025
0711bba
Ignore test when dylibs are not supported
bjorn3 Aug 31, 2025
2784327
alloc: make Cow From impls const
npmccallum Sep 1, 2025
ac89fcb
rustdoc-search: skip loading unneeded fnData
notriddle Sep 1, 2025
f6e7c81
Add compiler error when trying to use concat metavar expr in repetitions
jullanggit Aug 31, 2025
8dfd6b8
fix a constness ordering bug in rustfmt
npmccallum Sep 1, 2025
d8df631
Make `Parser::parse_for_head` public for rustfmt usage
mohe2015 Sep 1, 2025
6fc0cf4
Remove dead code stemming from an old effects desugaring
fmease Sep 1, 2025
ed295ff
Rollup merge of #145783 - Erk-:et-cetera-span, r=compiler-errors
jhpratt Sep 2, 2025
5168be1
Rollup merge of #145961 - petrochenkov:extprelregr, r=nnethercote
jhpratt Sep 2, 2025
c3301a9
Rollup merge of #145962 - bjorn3:linkage_fixes, r=WaffleLapkin
jhpratt Sep 2, 2025
c9e5f3d
Rollup merge of #146064 - jullanggit:patch-1, r=fmease
jhpratt Sep 2, 2025
a972fbc
Rollup merge of #146067 - npmccallum:cow, r=oli-obk
jhpratt Sep 2, 2025
efdb9bb
Rollup merge of #146070 - notriddle:skip-loading-function-data, r=Gui…
jhpratt Sep 2, 2025
50e38b5
Rollup merge of #146089 - npmccallum:rustfmt, r=fmease
jhpratt Sep 2, 2025
f4c5c34
Rollup merge of #146094 - mohe2015:patch-2, r=lcnr
jhpratt Sep 2, 2025
ef60f50
Rollup merge of #146102 - fmease:rm-dead-eff-code-iii, r=fee1-dead
jhpratt Sep 2, 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
Prev Previous commit
Next Next commit
Remove dead code stemming from an old effects desugaring
  • Loading branch information
fmease committed Sep 1, 2025
commit 6fc0cf428885a4939fc3b6f60f638ce09e48339f
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {

(
hir::ParamName::Plain(self.lower_ident(param.ident)),
hir::GenericParamKind::Const { ty, default, synthetic: false },
hir::GenericParamKind::Const { ty, default },
)
}
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,6 @@ pub enum GenericParamKind<'hir> {
ty: &'hir Ty<'hir>,
/// Optional default value for the const generic param
default: Option<&'hir ConstArg<'hir>>,
synthetic: bool,
},
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/intravisit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ pub fn walk_generic_param<'v, V: Visitor<'v>>(
GenericParamKind::Type { ref default, .. } => {
visit_opt!(visitor, visit_ty_unambig, default)
}
GenericParamKind::Const { ref ty, ref default, synthetic: _ } => {
GenericParamKind::Const { ref ty, ref default } => {
try_visit!(visitor.visit_ty_unambig(ty));
if let Some(default) = default {
try_visit!(visitor.visit_const_param_default(*hir_id, default));
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_hir_analysis/src/collect/generics_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {

ty::GenericParamDefKind::Type { has_default: default.is_some(), synthetic }
}
GenericParamKind::Const { ty: _, default, synthetic } => {
GenericParamKind::Const { ty: _, default } => {
if default.is_some() {
match param_default_policy.expect("no policy for generic param default") {
ParamDefaultPolicy::Allowed => {}
Expand All @@ -316,7 +316,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
}
}

ty::GenericParamDefKind::Const { has_default: default.is_some(), synthetic }
ty::GenericParamDefKind::Const { has_default: default.is_some() }
}
};
Some(ty::GenericParamDef {
Expand Down Expand Up @@ -523,7 +523,7 @@ impl<'v> Visitor<'v> for AnonConstInParamTyDetector {
type Result = ControlFlow<()>;

fn visit_generic_param(&mut self, p: &'v hir::GenericParam<'v>) -> Self::Result {
if let GenericParamKind::Const { ty, default: _, synthetic: _ } = p.kind {
if let GenericParamKind::Const { ty, default: _ } = p.kind {
let prev = self.in_param_ty;
self.in_param_ty = true;
let res = self.visit_ty_unambig(ty);
Expand Down
9 changes: 1 addition & 8 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,7 @@ pub(crate) fn check_generic_arg_count(
.filter(|param| matches!(param.kind, ty::GenericParamDefKind::Type { synthetic: true, .. }))
.count();
let named_type_param_count = param_counts.types - has_self as usize - synth_type_param_count;
let synth_const_param_count = gen_params
.own_params
.iter()
.filter(|param| {
matches!(param.kind, ty::GenericParamDefKind::Const { synthetic: true, .. })
})
.count();
let named_const_param_count = param_counts.consts - synth_const_param_count;
let named_const_param_count = param_counts.consts;
let infer_lifetimes =
(gen_pos != GenericArgPosition::Type || seg.infer_args) && !gen_args.has_lifetime_params();

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,7 @@ impl<'a> State<'a> {
self.print_type(default);
}
}
GenericParamKind::Const { ty, ref default, synthetic: _ } => {
GenericParamKind::Const { ty, ref default } => {
self.word_space(":");
self.print_type(ty);
if let Some(default) = default {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::ty::{EarlyBinder, GenericArgsRef};
pub enum GenericParamDefKind {
Lifetime,
Type { has_default: bool, synthetic: bool },
Const { has_default: bool, synthetic: bool },
Const { has_default: bool },
}

impl GenericParamDefKind {
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_public/src/unstable/convert/stable/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,13 +656,13 @@ impl<'tcx> Stable<'tcx> for rustc_middle::ty::GenericParamDefKind {

fn stable(&self, _: &mut Tables<'_, BridgeTys>, _: &CompilerCtxt<'_, BridgeTys>) -> Self::T {
use crate::ty::GenericParamDefKind;
match self {
match *self {
ty::GenericParamDefKind::Lifetime => GenericParamDefKind::Lifetime,
ty::GenericParamDefKind::Type { has_default, synthetic } => {
GenericParamDefKind::Type { has_default: *has_default, synthetic: *synthetic }
GenericParamDefKind::Type { has_default, synthetic }
}
ty::GenericParamDefKind::Const { has_default, synthetic: _ } => {
GenericParamDefKind::Const { has_default: *has_default }
ty::GenericParamDefKind::Const { has_default } => {
GenericParamDefKind::Const { has_default }
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ fn clean_generic_param_def(
},
)
}
ty::GenericParamDefKind::Const { has_default, synthetic } => (
ty::GenericParamDefKind::Const { has_default } => (
def.name,
GenericParamDefKind::Const {
ty: Box::new(clean_middle_ty(
Expand All @@ -580,7 +580,6 @@ fn clean_generic_param_def(
} else {
None
},
synthetic,
},
),
};
Expand Down Expand Up @@ -636,14 +635,13 @@ fn clean_generic_param<'tcx>(
},
)
}
hir::GenericParamKind::Const { ty, default, synthetic } => (
hir::GenericParamKind::Const { ty, default } => (
param.name.ident().name,
GenericParamDefKind::Const {
ty: Box::new(clean_ty(ty, cx)),
default: default.map(|ct| {
Box::new(lower_const_arg_for_rustdoc(cx.tcx, ct, FeedConstTy::No).to_string())
}),
synthetic,
},
),
};
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ pub(crate) enum GenericParamDefKind {
Lifetime { outlives: ThinVec<Lifetime> },
Type { bounds: ThinVec<GenericBound>, default: Option<Box<Type>>, synthetic: bool },
// Option<Box<String>> makes this type smaller than `Option<String>` would.
Const { ty: Box<Type>, default: Option<Box<String>>, synthetic: bool },
Const { ty: Box<Type>, default: Option<Box<String>> },
}

impl GenericParamDefKind {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/json/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl FromClean<clean::GenericParamDefKind> for GenericParamDefKind {
default: default.into_json(renderer),
is_synthetic: *synthetic,
},
Const { ty, default, synthetic: _ } => GenericParamDefKind::Const {
Const { ty, default } => GenericParamDefKind::Const {
type_: ty.into_json(renderer),
default: default.as_ref().map(|x| x.as_ref().clone()),
},
Expand Down
Loading