I tried this code:
#[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.