fix cross-crate destructor inlining

Closes #7793
This commit is contained in:
Daniel Micay 2013-10-31 19:44:25 -04:00
parent b2f62acaeb
commit e58270219f
3 changed files with 48 additions and 5 deletions

View file

@ -0,0 +1,18 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[link(name="inline_dtor", vers="0.1")];
pub struct Foo;
impl Drop for Foo {
#[inline]
fn drop(&mut self) {}
}

View file

@ -0,0 +1,18 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// aux-build:inline_dtor.rs
// xfail-fast
extern mod inline_dtor;
fn main() {
let _x = inline_dtor::Foo;
}