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

Global substitutions followed by short syntax without duplicates #29

Closed
Tracked by #31
Emoun opened this issue Jun 15, 2021 · 2 comments
Closed
Tracked by #31

Global substitutions followed by short syntax without duplicates #29

Emoun opened this issue Jun 15, 2021 · 2 comments
Labels
D-accepted A decision (D) has been made and the issue will be worked on I-bug This issue (I) regards a (potential) bug in the project T-accepted Triage (T): Initial review accepted issue/PR as valid

Comments

@Emoun
Copy link
Owner

Emoun commented Jun 15, 2021

Situation:

Following global substitutions with a substitutions variable list for short syntax, but not following that with any substitution groups, will successfully compile.

Even though current behavior is workable, this will probably either be a mistake or lead to confusion about what happens to the substitution variable that don't have substitutions.
Giving an error also make the behavior match the old behavior before global substitutions (i.e. an error was thrown).

Reproduction:

#[duplicate::duplicate(
	ty 		[i16];
	name;
)]
pub struct name(ty);

Expected Behavior:

Fail to compile with a message about having no substitutions groups in the short syntax.

Actual Behavior:

pub struct name(ty);

Affected Versions:

0.3.0

Local Environment:

Miscellaneous:

@Emoun Emoun added D-discussion A decision (D) has not been made yet and is open to discussion I-bug This issue (I) regards a (potential) bug in the project T-accepted Triage (T): Initial review accepted issue/PR as valid labels Jun 15, 2021
@Emoun Emoun added D-accepted A decision (D) has been made and the issue will be worked on and removed D-discussion A decision (D) has not been made yet and is open to discussion labels Jan 16, 2022
@Emoun Emoun mentioned this issue Oct 4, 2022
12 tasks
@Emoun
Copy link
Owner Author

Emoun commented Mar 3, 2023

This problem was also present without the global substitutions:

#[duplicate::duplicate_item(
	name;
)]
pub struct name(ty);

@Emoun
Copy link
Owner Author

Emoun commented Mar 3, 2023

Fixed awaiting next release.

@Emoun Emoun closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-accepted A decision (D) has been made and the issue will be worked on I-bug This issue (I) regards a (potential) bug in the project T-accepted Triage (T): Initial review accepted issue/PR as valid
Projects
None yet
Development

No branches or pull requests

1 participant