duplicate icon indicating copy to clipboard operation
duplicate copied to clipboard

Global substitutions followed by short syntax without duplicates

Open Emoun opened this issue 3 years ago • 0 comments

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 avatar Jun 15 '21 14:06 Emoun