diff --git a/src/test/ui/issues/issue-29821.rs b/src/test/ui/issues/issue-29821.rs new file mode 100644 index 00000000000..54be3afb59d --- /dev/null +++ b/src/test/ui/issues/issue-29821.rs @@ -0,0 +1,19 @@ +// build-pass + +pub trait Foo { + type FooAssoc; +} + +pub struct Bar { + id: F::FooAssoc +} + +pub struct Baz; + +impl Foo for Baz { + type FooAssoc = usize; +} + +static mut MY_FOO: Bar = Bar { id: 0 }; + +fn main() {}