Skip to content

Conversation

@Pasta-coder
Copy link
Contributor

Fixes #3526

This patch improves the diagnostic for E0044 (foreign items with generics).
Previously, the help message was missing, and the error location needed
verification.

Fixes Rust-GCC#3526

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_generic_params):
	Add rust_inform help message and ensure correct locus for E0044.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-3526.rs: New test.

Signed-off-by: Jayant Chauhan <[email protected]>
@Pasta-coder
Copy link
Contributor Author

while looking at the refactored code i came across that the primary reason the error was misleading was that the TypeCheck pass was explicitly reading the location of the ExternalFunctionItem (the fn keyword) instead of the GenericParam (the <T>).

the lexer issue still exists .

this doesn't not resolve issue #3526 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with column location

1 participant