Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ impl<'hir, Unambig> ConstArg<'hir, Unambig> {
#[derive(Clone, Copy, Debug, StableHash)]
#[repr(u8, C)]
pub enum ConstArgKind<'hir, Unambig = ()> {
Tup(&'hir [&'hir ConstArg<'hir, Unambig>]),
Tup(&'hir [&'hir ConstArg<'hir>]),
/// **Note:** Currently this is only used for bare const params
/// (`N` where `fn foo<const N: usize>(...)`),
/// not paths to any const (`N` where `const N: usize = ...`).
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 @@ -1088,7 +1088,7 @@ pub fn walk_const_arg<'v, V: Visitor<'v>>(
try_visit!(visitor.visit_id(*hir_id));
match kind {
ConstArgKind::Tup(exprs) => {
walk_list!(visitor, visit_const_arg, *exprs);
walk_list!(visitor, visit_const_arg_unambig, *exprs);
V::Result::output()
}
ConstArgKind::Struct(qpath, field_exprs) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//@ check-pass

#![feature(min_adt_const_params)]
#![feature(min_generic_const_args)]

struct S<const X: (u32, u32)>;

fn main() {
let _: S<{ (1, _) }> = S::<{ (1, 2) }>;
}
Loading