Skip to content

Conversation

@lucasly-ba
Copy link

Fixes #4219

gcc/rust/ChangeLog:

* ast/rust-ast.cc (Attribute::is_derive): Change is_derive method with its valid path.
* util/rust-attribute-values.h: Delete redudant derive attribute.
* util/rust-attributes.cc (AttributeChecker::check_inner_attribute): Give can_be_inner a value for each atribute. (AttributeChecker::check_inner_attributes): Implement method for errors check.
* util/rust-attributes.h (struct BuiltinAttrDefinition): Add can_be_inner object in struct.

gcc/testsuite/ChangeLog:

* rust/compile/issue-4212.rs:

gcc/rust/ChangeLog:

	* ast/rust-ast.cc (Attribute::is_derive):
	Change is_derive method with its valid path.
	* util/rust-attribute-values.h:
	Delete redudant derive attribute.
	* util/rust-attributes.cc (AttributeChecker::check_inner_attribute):
	Give can_be_inner a value for each atribute.
	(AttributeChecker::check_inner_attributes):
	Implement method for errors check.
	* util/rust-attributes.h (struct BuiltinAttrDefinition):
	Add can_be_inner object in struct.

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4212.rs:

gcc/rust/ChangeLog:

	* ast/rust-ast.cc (Attribute::is_derive):
	* util/rust-attribute-values.h:
	* util/rust-attributes.cc (AttributeChecker::check_inner_attribute):
	(AttributeChecker::check_inner_attributes):
	* util/rust-attributes.h (struct BuiltinAttrDefinition):

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4212.rs: Fixed error description.
	* rust/compile/issue-4219.rs: New test.

Signed-off-by: Lucas Ly Ba <[email protected]>
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.

Every bad inner attributes should show an error

1 participant