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_trait_selection/src/traits/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ pub fn compute_inherent_assoc_ty_args<'a, 'b, 'tcx>(
);
}

match selcx.infcx.at(&cause, param_env).eq(DefineOpaqueTypes::No, impl_ty, self_ty) {
match selcx.infcx.at(&cause, param_env).eq(DefineOpaqueTypes::Yes, impl_ty, self_ty) {
Ok(mut ok) => obligations.append(&mut ok.obligations),
Err(_) => {
tcx.dcx().span_bug(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//@ check-pass

#![feature(inherent_associated_types, type_alias_impl_trait)]
#![allow(incomplete_features)]

struct Foo<T>(T);

impl Foo<i32> {
type Assoc = u32;
}

type Tait = impl Sized;

fn bar(_: Tait) {
let x: Foo<Tait>::Assoc = 42;
}

fn main() {}