<!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #[lang = "sized"] pub trait Sized {} impl <T: Sized> T {} fn main() {} ``` I expected to see this happen: Error because inherent impl can be defined only for struct, enum, union, and trait object. https://doc.rust-lang.org/error_codes/E0118.html Instead, this happened: compiled. ### Meta https://godbolt.org/z/aqbEqfTao - What version of Rust GCC were you using, git sha if possible.