-
Notifications
You must be signed in to change notification settings - Fork 182
Open
Labels
Description
Compilation Successful when method
/ constant
was impl
on primitive type E0390
- Fixing this issue, will also help gccrs to emit error codes similiar to rustc.
- You can view the same on
compiler-explorer
I tried this code from E0390
:
#![allow(unused)]
fn main() {
struct Foo {
x: i32
}
impl *mut Foo {}
// error: cannot define inherent `impl` for primitive types
}
I expected to see this happen:
- Give error like rustc, i.e.,
error[E0390]: only a single inherent implementation marked with `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive
Instead, this happened:
- Compiled Successfully.
Compiler returned: 0
Meta
- What version of Rust GCC were you using, git sha dba8bc5.
- gccrs (Compiler-Explorer-Build-gcc-22f4c74767bddcb9813dca06fc6a354a67d05343-binutils-2.40) 13.0.1 20230417 (experimental)