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

Comprehensively support trailing commas in std/core macros #48056

Merged
merged 6 commits into from
Feb 28, 2018

Commits on Feb 7, 2018

  1. Configuration menu
    Copy the full SHA
    5fa97c3 View commit details
    Browse the repository at this point in the history
  2. 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.
    ExpHP committed Feb 7, 2018
    Configuration menu
    Copy the full SHA
    96eed86 View commit details
    Browse the repository at this point in the history
  3. libsyntax/ext: trailing commas in builtin macros

    Most notably this changes 'syntax::ext::base::get_single_str_from_tts'
    to accept a trailing comma, and revises the documentation so that this
    aspect is not surprising. I made this change under the understanding
    that this crate is private rustc implementation detail (I hope this is
    correct!). After reviewing all call sites, I believe the revised
    semantics are closer to the intended spirit of the function.
    ExpHP committed Feb 7, 2018
    Configuration menu
    Copy the full SHA
    1137fb1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b7c6dc6 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2018

  1. macro-commas test cleanup

    ExpHP committed Feb 14, 2018
    Configuration menu
    Copy the full SHA
    9205f3d View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2018

  1. ignore-pretty for the macro-comma-support test

    include! and the pretty test do not mix
    ExpHP committed Feb 25, 2018
    Configuration menu
    Copy the full SHA
    af503be View commit details
    Browse the repository at this point in the history