Skip to content

Commit

Permalink
Add test demonstrating Rust ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Aug 28, 2021
1 parent c8482e8 commit 30eaa22
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions provider/core/tests/ice.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

#![allow(unreachable_code)]
#![allow(unused_variables)]

use icu_provider::hello_world::*;
use icu_provider::prelude::*;
use std::borrow::Cow;

struct HelloWorldV1MessageMarker;
impl<'data> DataMarker<'data> for HelloWorldV1MessageMarker {
type Yokeable = Cow<'static, str>;
type Cart = HelloWorldV1<'data>;
}

struct Options {}

fn demo(options: &Options) {
let p1: DataPayload<HelloWorldV1Marker> = todo!();
let p2: DataPayload<HelloWorldV1MessageMarker> =
p1.map_project_with_capture(options, |obj, options, _| todo!());
}

#[test]
fn map_project_with_capture_bug() {
demo(todo!());
}

0 comments on commit 30eaa22

Please sign in to comment.