Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled the
vec![]
macro to use the [a; b]
repeat syntax.
Closes #15587
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
|
||
pub fn main() { | ||
assert_eq!(vec![1; 3], vec![1, 1, 1]); | ||
assert_eq!(vec![1; 2], vec![1, 1]); | ||
assert_eq!(vec![1; 1], vec![1]); | ||
assert_eq!(vec![1; 0], vec![]); | ||
} |
c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at Kimundi@c163eff
c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging 8 batched pull requests into batch
c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status: {"merge_sha": "3b03c20c6ddaee5ba8b9797e988af1be42d612e2", "rollup_pulls": [[20771, "c163effc2b4704e3ec9d0011c90a8bd0bab4cb6c"], [20808, "4a7b710031de43c2d126ea42ac5f8b9c23201803"], [20817, "1a602c177908c3d6dcbf7d25817abfc11ddb2a6b"], [20818, "28723048a56a346dd23f06fa25cc174a195f4bc0"], [20819, "ba462b88e9f3ef217a264abe377963087d65728c"], [20833, "2a29296ea3f891f3216962d0ba8ada078a0657e6"], [20849, "d873aeeb923b733f86c89f4a9fc599770a170640"], [20851, "68ecfe0b61d85f4afbe5a25bcfc74cacdcb3ad47"]]}
c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing rollup candidate = 3b03c20
Successful merges:
vec![]
macro to use the[a; b]
repeat syntax. #20771 Enabled thevec![]
macro to use the[a; b]
repeat syntax. (Kimundi/vec-macro-repeat = c163eff)assert_eq!
notassert_eq
#20851 Docs: Should beassert_eq!
notassert_eq
(englishm/patch-1 = 68ecfe0)c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3095
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3088
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3089
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3080
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3080
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3083
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3076
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/3071
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/2748
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2746
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/1584
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/1576
c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 3b03c20
c163eff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 3b03c20