2016-07-29 15:49:26 -05:00
|
|
|
// Regression test for #34991: an ICE occurred here because we inline
|
|
|
|
// some of the vector routines and give them a local def-id `X`. This
|
2020-02-12 09:00:15 -06:00
|
|
|
// got hashed after codegen (`hir_owner(X)`). When we load back up, we get an
|
2016-07-29 15:49:26 -05:00
|
|
|
// error because the `X` is remapped to the original def-id (in
|
|
|
|
// libstd), and we can't hash a HIR node from std.
|
|
|
|
|
|
|
|
// revisions:rpass1 rpass2
|
|
|
|
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
use std::vec::Vec;
|
|
|
|
|
|
|
|
pub fn foo() -> Vec<i32> {
|
|
|
|
vec![1, 2, 3]
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn bar() {
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
bar();
|
|
|
|
}
|