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
12 changes: 0 additions & 12 deletions compiler/rustc_traits/src/normalize_projection_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ fn normalize_canonicalized_projection<'tcx>(
0,
&mut obligations,
);
obligations.extend(const_arg_has_type_obligation(
tcx,
param_env,
normalized_term,
goal,
));
ocx.register_obligations(obligations);
// #112047: With projections and opaques, we are able to create opaques that
// are recursive (given some generic parameters of the opaque's type variables).
Expand Down Expand Up @@ -147,12 +141,6 @@ fn normalize_canonicalized_inherent_projection<'tcx>(
0,
&mut obligations,
);
obligations.extend(const_arg_has_type_obligation(
tcx,
param_env,
normalized_term,
goal,
));
ocx.register_obligations(obligations);

Ok(NormalizationResult { normalized_term })
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//@ check-pass
#![feature(
min_generic_const_args,
generic_const_parameter_types,
inherent_associated_types,
min_adt_const_params,
const_param_ty_trait
)]

struct ThreeTypes<T1, T2, T3>(T1, T2, T3);

impl<T1, T2, T3: std::marker::ConstParamTy_> ThreeTypes<T1, T2, T3> {
type const INHERENT: [T3; 0] = [];
}

struct Struct<const O: [u32; 0]>;

fn f() -> Struct<{ core::direct_const_arg!(ThreeTypes::<u8, u16, u32>::INHERENT) }> {
Struct
}

fn main() {}
Loading