Closed
Description
I tried this code:
#![feature(rustc_attrs)]
struct S<T>(T, T);
#[rustc_layout(debug)]
type T = S<str>;
This should complain about using an unsized type in a way that doesn't work. Instead, it prints some layout.
Probably the rustc_layout logic needs to fire of some sort of query to ensure the type is well-formed, or something like that? I know type aliases only get WF-checked "on use", and it seems somehow this attribute doesn't count as a use. How can we make it count as a use?