Open
Description
I tried this code:
struct Foo<T>(T);
impl<T> Foo<T> {
fn foo(&self) {}
fn bar(&self) {}
}
fn main() {
let foo = Foo( () );
foo.foo();
}
When compiled with -Clink-dead-code
, I expected to see Foo::<()>::bar
in the resulting binary.
Instead, it is omitted.
Meta
rustc --version --verbose
:
rustc 1.47.0-nightly (d7f945163 2020-07-19)
binary: rustc
commit-hash: d7f94516345a36ddfcd68cbdf1df835d356795c3
commit-date: 2020-07-19
host: x86_64-apple-darwin
release: 1.47.0-nightly
LLVM version: 10.0