rust/tests/incremental/change_implementation_cross_crate/auxiliary/a.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
434 B
Rust
Raw Normal View History

#![allow(warnings)]
#![crate_name = "a"]
#![crate_type = "rlib"]
#[cfg(rpass1)]
#[inline(never)]
pub fn foo(b: u8) -> u32 {
b as u32
}
#[cfg(rpass2)]
#[inline(never)]
pub fn foo(b: u8) -> u32 {
(b + 42) as u32
}
pub fn bar(b: u8) -> u32 {
bar_impl(b) as u32
}
#[cfg(rpass1)]
#[inline(never)]
fn bar_impl(b: u8) -> u16 {
b as u16
}
#[cfg(rpass2)]
#[inline(never)]
fn bar_impl(b: u8) -> u32 {
(b + 42) as u32
}