]> git.lizzy.rs Git - rust.git/blob - src/test/incremental/inlined_hir_34991/main.rs
Rollup merge of #98998 - workingjubilee:naked-means-no-clothes-enforcement-technology...
[rust.git] / src / test / incremental / inlined_hir_34991 / main.rs
1 // Regression test for #34991: an ICE occurred here because we inline
2 // some of the vector routines and give them a local def-id `X`. This
3 // got hashed after codegen (`hir_owner(X)`). When we load back up, we get an
4 // error because the `X` is remapped to the original def-id (in
5 // libstd), and we can't hash a HIR node from std.
6
7 // revisions:rpass1 rpass2
8
9 #![feature(rustc_attrs)]
10
11 use std::vec::Vec;
12
13 pub fn foo() -> Vec<i32> {
14     vec![1, 2, 3]
15 }
16
17 pub fn bar() {
18     foo();
19 }
20
21 pub fn main() {
22     bar();
23 }