Skip to content

Commit

Permalink
filter out trailing effect param in own_args_no_defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Dec 10, 2023
1 parent e03c18b commit 2f457d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_middle/src/ty/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ impl<'tcx> Generics {
param.default_value(tcx).is_some_and(|default| {
default.instantiate(tcx, args) == args[param.index as usize]
})
// filter out trailing effect params
|| matches!(param.kind, GenericParamDefKind::Const { is_host_effect: true, .. })
})
.count();
own_params.end -= num_default_params;
Expand Down

0 comments on commit 2f457d9

Please sign in to comment.