add regression test
This commit is contained in:
parent
f0487cee74
commit
32739a2ff1
1 changed files with 28 additions and 0 deletions
28
src/test/ui/mir/mir-inlining/ice-issue-68347.rs
Normal file
28
src/test/ui/mir/mir-inlining/ice-issue-68347.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// run-pass
|
||||
// compile-flags:-Zmir-opt-level=2
|
||||
pub fn main() {
|
||||
let _x: fn() = handle_debug_column;
|
||||
}
|
||||
|
||||
fn handle_debug_column() {
|
||||
let sampler = sample_columns();
|
||||
|
||||
let foo = || {
|
||||
sampler.get(17);
|
||||
};
|
||||
foo();
|
||||
}
|
||||
|
||||
fn sample_columns() -> impl Sampler {
|
||||
ColumnGen {}
|
||||
}
|
||||
|
||||
struct ColumnGen {}
|
||||
|
||||
trait Sampler {
|
||||
fn get(&self, index: i32);
|
||||
}
|
||||
|
||||
impl Sampler for ColumnGen {
|
||||
fn get(&self, _index: i32) {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue