Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid self import was made #2501

Open
MahadMuhammad opened this issue Aug 1, 2023 · 0 comments
Open

Invalid self import was made #2501

MahadMuhammad opened this issue Aug 1, 2023 · 0 comments

Comments

@MahadMuhammad
Copy link
Contributor

Compiled Successfully when an invalid self import was made.

  • Fixing this issue will also help gccrs to emit error code E0431 similiar to rustc.

  • You can view the same on compiler-explorer


I tried this code from E0431:

#![allow(unused)]
fn main() {
use {self}; // error: `self` import can only appear in an import list with a
            //        non-empty prefix
}

I expected to see this happen:

  • Give error like rustc. i.e.,
error[E0431]: `self` import can only appear in an import list with a non-empty prefix

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants