-
Notifications
You must be signed in to change notification settings - Fork 961
Closed
Labels
1x-backport:pendingFixed/resolved in source but not yet backported to a 1x branch and releaseFixed/resolved in source but not yet backported to a 1x branch and releaseA-call-chainsArea: method call chainsArea: method call chainsA-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE
Description
In the following snippet, there is a trailing comment following the entire builder chain after normal_message:
// Client set up {{{
discord_client.with_framework(
StandardFramework::new()
// Framework configuration {{{{
.configure(|c| {
c.with_whitespace(true) // allow `{prefix} command`
.case_insensitivity(true) // allow `{prefix}cOmMaNd`
.no_dm_prefix(true) // allow `command` in DMs
.prefix(config.prefix()) // set the prefix to use for commands
.delimiters(vec![" "]) // split arguments at space; `{prefix} test a b c` => [{prefix test}, a, b, c]
})
// Normal message {{{{
.normal_message(|_ctx, _msg| {
})
// }}}}
,
// wee
);
// }}}When I run rustfmt on this with default settings:
$ rustfmt --version
rustfmt 1.4.8-nightly (afb1ee1 2019-09-08)I get this result:
// Client set up {{{
discord_client.with_framework(
StandardFramework::new()
// Framework configuration {{{{
.configure(|c| {
c.with_whitespace(true) // allow `{prefix} command`
.case_insensitivity(true) // allow `{prefix}cOmMaNd`
.no_dm_prefix(true) // allow `command` in DMs
.prefix(config.prefix()) // set the prefix to use for commands
.delimiters(vec![" "]) // split arguments at space; `{prefix} test a b c` => [{prefix test}, a, b, c]
})
// Normal message {{{{
.normal_message(|_ctx, _msg| {}), // }}}}
, // uh oh.. there's a comma over this one as well! ;o
// wee
);
// }}}The comma clearly duplicated where it wasn't supposed to.
The //uh oh comment was added in the issue creation; the rest was from my source code, except "a bit" stripped down.
Metadata
Metadata
Assignees
Labels
1x-backport:pendingFixed/resolved in source but not yet backported to a 1x branch and releaseFixed/resolved in source but not yet backported to a 1x branch and releaseA-call-chainsArea: method call chainsArea: method call chainsA-commentsArea: commentsArea: commentsC-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICE