You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// inside the generic function, the associated type gets normalized to a placeholder `ApplL::Out<T>` [https://rust-lang.github.io/rustc-guide/traits/associated-types.html#placeholder-associated-types].
3206
+
// FIXME: fix type parameter names going missing when going through Chalk
3207
+
assert_eq!(t,"ApplyL::Out<[missing name]>");
3208
+
}
3209
+
3210
+
#[test]
3211
+
fnassociated_type_placeholder_2(){
3212
+
let t = type_at(
3213
+
r#"
3214
+
//- /main.rs
3215
+
pub trait ApplyL {
3216
+
type Out;
3217
+
}
3218
+
fn foo<T: ApplyL>(t: T) -> <T as ApplyL>::Out;
3219
+
3220
+
fn test<T: ApplyL>(t: T) {
3221
+
let y = foo(t);
3222
+
y<|>;
3223
+
}
3224
+
"#,
3225
+
);
3226
+
// FIXME here Chalk doesn't normalize the type to a placeholder. I think we
3227
+
// need to add a rule like Normalize(<T as ApplyL>::Out -> ApplyL::Out<T>)
3228
+
// to the trait env ourselves here; probably Chalk can't do this by itself.
0 commit comments