Skip to content

Commit 30eaa22

Browse files
committed
Add test demonstrating Rust ICE
1 parent c8482e8 commit 30eaa22

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

provider/core/tests/ice.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// This file is part of ICU4X. For terms of use, please see the file
2+
// called LICENSE at the top level of the ICU4X source tree
3+
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4+
5+
#![allow(unreachable_code)]
6+
#![allow(unused_variables)]
7+
8+
use icu_provider::hello_world::*;
9+
use icu_provider::prelude::*;
10+
use std::borrow::Cow;
11+
12+
struct HelloWorldV1MessageMarker;
13+
impl<'data> DataMarker<'data> for HelloWorldV1MessageMarker {
14+
type Yokeable = Cow<'static, str>;
15+
type Cart = HelloWorldV1<'data>;
16+
}
17+
18+
struct Options {}
19+
20+
fn demo(options: &Options) {
21+
let p1: DataPayload<HelloWorldV1Marker> = todo!();
22+
let p2: DataPayload<HelloWorldV1MessageMarker> =
23+
p1.map_project_with_capture(options, |obj, options, _| todo!());
24+
}
25+
26+
#[test]
27+
fn map_project_with_capture_bug() {
28+
demo(todo!());
29+
}

0 commit comments

Comments
 (0)