Skip to content

Commit ca8578a

Browse files
committed
Add test case that RangeTo notation works in return statements.
1 parent d0863ad commit ca8578a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/run-pass/range.rs

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
fn foo() -> int { 42 }
1414

15+
// Test that range syntax works in return statements
16+
fn return_range_to() -> ::std::ops::RangeTo<i32> { return ..1; }
17+
1518
pub fn main() {
1619
let mut count = 0;
1720
for i in 0u..10 {

0 commit comments

Comments
 (0)