]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/issue-49043.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[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 }