]> git.lizzy.rs Git - rust.git/commit
libcore/libstd: fix commas in macro_rules! macros
authorMichael Lamparski <diagonaldevice@gmail.com>
Wed, 7 Feb 2018 14:31:22 +0000 (09:31 -0500)
committerMichael Lamparski <diagonaldevice@gmail.com>
Wed, 7 Feb 2018 14:36:20 +0000 (09:36 -0500)
commit96eed862a08f0ee1d234f4f83419dd46fe58ccef
tree9cf1209903f98f6a590bd44d7e089d15c767436f
parent5fa97c35da2f0eeda4321da7fb5933490b798d79
libcore/libstd: fix commas in macro_rules! macros

BREAKING CHANGE: (or perhaps, *bugfix*)

In #![no_std] applications, the following calls to `panic!` used
to behave differently; they now behave the same.

Old behavior:

    panic!("{{");   // panics with "{{"
    panic!("{{",);  // panics with "{"

New behavior:

    panic!("{{");   // panics with "{{"
    panic!("{{",);  // panics with "{{"

This only affects calls to `panic!` (and by proxy `assert`
and `debug_assert`) with a single string literal followed by
a trailing comma, and only in `#![no_std]` applications.
src/libcore/macros.rs
src/libstd/macros.rs