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

ErrorCode[E0433]: Use of Undeclared Crate, Module, or Type #2301

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

MahadMuhammad
Copy link
Contributor

Added rustc E0433 error code. Failed to resolve: Use of Undeclared Crate, Module, or Type

E0433.mp4

gcc/rust/ChangeLog:

* gcc/rust/resolve/rust-ast-resolve-path.cc : Added ErrorCode("E0433") to 'rust_error_at' function.
* gcc/rust/resolve/rust-ast-resolve-type.cc : Added ErrorCode("E0433") to 'rust_error_at' function.

Signed-off-by: Muhammad Mahad mahadtxt@gmail.com

Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! The video is a nice touch :D but I think it's time consuming, so don't worry about it for the next time :) thank you!

gcc/rust/resolve/rust-ast-resolve-type.cc Outdated Show resolved Hide resolved
gcc/rust/resolve/rust-ast-resolve-path.cc Outdated Show resolved Hide resolved
gcc/rust/resolve/rust-ast-resolve-path.cc Outdated Show resolved Hide resolved
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM nice work

@philberty
Copy link
Member

Can you confirm if we have test cases for this error in our test suite?

@MahadMuhammad
Copy link
Contributor Author

MahadMuhammad commented Jun 16, 2023

@philberty After running make check-rust. I have found these files in my rust.log:

mahad/gccrs/gcc/testsuite/rust/compile/cfg1.rs:29:5: error: Cannot find path 'test' in this scope [E0433]
compiler exited with status 1

mahad/gccrs/gcc/testsuite/rust/compile/lookup_err1.rs:6:5: error: Cannot find path 'nested' in this scope [E0433]
compiler exited with status 1

mahad/gccrs/gcc/testsuite/rust/compile/self-path2.rs:13:12: error: failed to resolve: 'self' in paths can only be used in start position [E0433]
mahad/gccrs/gcc/testsuite/rust/compile/self-path2.rs:20:17: error: failed to resolve: 'self' in paths can only be used in start position [E0433]
compiler exited with status 1

@philberty
Copy link
Member

@MahadMuhammad do you know how to fix your commit message format and code formatting?

@MahadMuhammad
Copy link
Contributor Author

MahadMuhammad commented Jun 20, 2023

@philberty said:

@MahadMuhammad do you know how to fix your commit message format and code formatting?

I am having some formatting issues :(

Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I had misunderstood part of your PR - please remove the TODO comments which are being fixed by this very PR haha. Then I'll merge the PR :)

gcc/rust/resolve/rust-ast-resolve-path.cc Outdated Show resolved Hide resolved
gcc/rust/resolve/rust-ast-resolve-path.cc Outdated Show resolved Hide resolved
gcc/rust/resolve/rust-ast-resolve-type.cc Outdated Show resolved Hide resolved
gcc/rust/ChangeLog:
	* resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): called rust_error_at
	* resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): called rust_error_at

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@CohenArthur CohenArthur added this pull request to the merge queue Jun 21, 2023
Merged via the queue into Rust-GCC:master with commit c93eb30 Jun 21, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants