]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/issue-49043.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / test / incremental / issue-49043.rs
1 // Regression test for hashing involving canonical variables.  In this
2 // test -- which has an intensional error -- the type of the value
3 // being dropped winds up including a type variable. Canonicalization
4 // would then produce a `?0` which -- in turn -- triggered an ICE in
5 // hashing.
6
7 // revisions:cfail1
8
9 fn main() {
10     println!("Hello, world! {}",*thread_rng().choose(&[0, 1, 2, 3]).unwrap());
11     //[cfail1]~^ ERROR cannot find function `thread_rng`
12 }