auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=brson
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date. Closes #4219.
This commit is contained in:
commit
e2f8b51dc5
24 changed files with 905 additions and 1197 deletions
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// xfail-test not a test. used by mod-merge-hack.rs
|
||||
|
||||
mod inst {
|
||||
pub type T = i32;
|
||||
pub static bits: uint = 32;
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// xfail-test not a test. used by mod-merge-hack.rs
|
||||
|
||||
use T = self::inst::T;
|
||||
|
||||
pub static bits: uint = inst::bits;
|
||||
pub fn min(x: T, y: T) -> T { if x < y { x } else { y } }
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2012 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.
|
||||
|
||||
// xfail-pretty
|
||||
#[path = "mod-merge-hack-template.rs"]
|
||||
#[merge = "mod-merge-hack-inst.rs"]
|
||||
mod myint32;
|
||||
|
||||
pub fn main() {
|
||||
assert_eq!(myint32::bits, 32);
|
||||
assert_eq!(myint32::min(10, 20), 10);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue