about summary refs log tree commit diff
path: root/src/test/ui/macros/assert_ne_trailing_comma.stderr
AgeCommit message (Collapse)AuthorLines
2017-11-09Allow a trailing comma in assert_eq/ne macroKonrad Borowski-8/+0
2017-09-02Dont abort on first macro errorbjorn3-0/+2
2017-02-06improve error message when two-arg assert_eq! receives a trailing commaZack M. Davis-0/+6
Previously, `assert_eq!(left, right,)` (respectively, `assert_ne!(left, right,)`; note the trailing comma) would result in a confusing "requires at least a format string argument" error. In reality, a format string is optional, but the trailing comma puts us into the "match a token tree of zero or more tokens" branch of the macro (in order to support the optional format string), and passing the empty token tree into `format_args!` results in the confusing error. If instead we match a token tree of one or more tokens, we get a much more sensible "unexpected end of macro invocation" error. While we're here, fix up a stray space before a comma in the match guards. Resolves #39369.