Skip to content

Commit 32739a2

Browse files
committed
add regression test
1 parent f0487ce commit 32739a2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// run-pass
2+
// compile-flags:-Zmir-opt-level=2
3+
pub fn main() {
4+
let _x: fn() = handle_debug_column;
5+
}
6+
7+
fn handle_debug_column() {
8+
let sampler = sample_columns();
9+
10+
let foo = || {
11+
sampler.get(17);
12+
};
13+
foo();
14+
}
15+
16+
fn sample_columns() -> impl Sampler {
17+
ColumnGen {}
18+
}
19+
20+
struct ColumnGen {}
21+
22+
trait Sampler {
23+
fn get(&self, index: i32);
24+
}
25+
26+
impl Sampler for ColumnGen {
27+
fn get(&self, _index: i32) {}
28+
}

0 commit comments

Comments
 (0)