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

Add syntax extension ary![expr, ..N] #14272

Closed
wants to merge 1 commit into from

Commits on May 18, 2014

  1. Add syntax extension ary![expr, ..N]

    ary![expr, ..N] expands to an array by repeating `expr` N times. This is
    in contrast to [expr, ..N] which Copies `expr` N times.
    
    Sample usage:
    
        let x = ary![None::<Vec<u8>>, ..10];
    
    The one limitation is the count needs to be an integral literal, it
    cannot be a static or a compile-time expression.
    lilyball committed May 18, 2014
    Configuration menu
    Copy the full SHA
    efadf8b View commit details
    Browse the repository at this point in the history