File tree Expand file tree Collapse file tree 10 files changed +113
-12
lines changed Expand file tree Collapse file tree 10 files changed +113
-12
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,14 @@ mod int_macros;
7878mod uint_macros;
7979
8080#[ path = "num/int.rs" ] pub mod int;
81+ #[ path = "num/isize.rs" ] pub mod isize;
8182#[ path = "num/i8.rs" ] pub mod i8;
8283#[ path = "num/i16.rs" ] pub mod i16;
8384#[ path = "num/i32.rs" ] pub mod i32;
8485#[ path = "num/i64.rs" ] pub mod i64;
8586
8687#[ path = "num/uint.rs" ] pub mod uint;
88+ #[ path = "num/usize.rs" ] pub mod usize;
8789#[ path = "num/u8.rs" ] pub mod u8;
8890#[ path = "num/u16.rs" ] pub mod u16;
8991#[ path = "num/u32.rs" ] pub mod u32;
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- //! Operations and constants for architecture-sized signed integers (`int` type)
11+ //! Deprecated: replaced by `isize`.
12+ //!
13+ //! The rollout of the new type will gradually take place over the
14+ //! alpha cycle along with the development of clearer conventions
15+ //! around integer types.
1216
13- #![ stable]
14- #![ doc( primitive = "int" ) ]
17+ #![ deprecated = "replaced by isize" ]
1518
1619#[ cfg( target_word_size = "32" ) ] int_module ! { int, 32 }
1720#[ cfg( target_word_size = "64" ) ] int_module ! { int, 64 }
Original file line number Diff line number Diff line change 1+ // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ //! Operations and constants for pointer-sized signed integers (`isize` type)
12+ //!
13+ //! This type was recently added to replace `int`. The rollout of the
14+ //! new type will gradually take place over the alpha cycle along with
15+ //! the development of clearer conventions around integer types.
16+
17+ #![ stable]
18+ #![ doc( primitive = "isize" ) ]
19+
20+ #[ cfg( target_word_size = "32" ) ] int_module ! { isize , 32 }
21+ #[ cfg( target_word_size = "64" ) ] int_module ! { isize , 64 }
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- //! Operations and constants for architecture-sized unsigned integers (`uint` type)
11+ //! Deprecated: replaced by `usize`.
12+ //!
13+ //! The rollout of the new type will gradually take place over the
14+ //! alpha cycle along with the development of clearer conventions
15+ //! around integer types.
1216
13- #![ stable]
14- #![ doc( primitive = "uint" ) ]
17+ #![ deprecated = "replaced by usize" ]
1518
1619uint_module ! { uint, int, :: int:: BITS }
Original file line number Diff line number Diff line change 1+ // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ //! Operations and constants for pointer-sized unsigned integers (`usize` type)
12+ //!
13+ //! This type was recently added to replace `uint`. The rollout of the
14+ //! new type will gradually take place over the alpha cycle along with
15+ //! the development of clearer conventions around integer types.
16+
17+ #![ stable]
18+ #![ doc( primitive = "usize" ) ]
19+
20+ uint_module ! { usize , isize , :: isize :: BITS }
Original file line number Diff line number Diff line change @@ -201,12 +201,14 @@ mod int_macros;
201201mod uint_macros;
202202
203203#[ path = "num/int.rs" ] pub mod int;
204+ #[ path = "num/isize.rs" ] pub mod isize;
204205#[ path = "num/i8.rs" ] pub mod i8;
205206#[ path = "num/i16.rs" ] pub mod i16;
206207#[ path = "num/i32.rs" ] pub mod i32;
207208#[ path = "num/i64.rs" ] pub mod i64;
208209
209210#[ path = "num/uint.rs" ] pub mod uint;
211+ #[ path = "num/usize.rs" ] pub mod usize;
210212#[ path = "num/u8.rs" ] pub mod u8;
211213#[ path = "num/u16.rs" ] pub mod u16;
212214#[ path = "num/u32.rs" ] pub mod u32;
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- //! Operations and constants for architecture-sized signed integers (`int` type)
11+ //! Deprecated: replaced by `isize`.
12+ //!
13+ //! The rollout of the new type will gradually take place over the
14+ //! alpha cycle along with the development of clearer conventions
15+ //! around integer types.
1216
13- #![ stable]
14- #![ doc( primitive = "int" ) ]
17+ #![ deprecated = "replaced by isize" ]
1518
1619pub use core:: int:: { BITS , BYTES , MIN , MAX } ;
1720
Original file line number Diff line number Diff line change 1+ // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ //! Operations and constants for pointer-sized signed integers (`isize` type)
12+ //!
13+ //! This type was recently added to replace `int`. The rollout of the
14+ //! new type will gradually take place over the alpha cycle along with
15+ //! the development of clearer conventions around integer types.
16+
17+ #![ stable]
18+ #![ doc( primitive = "isize" ) ]
19+
20+ pub use core:: isize:: { BITS , BYTES , MIN , MAX } ;
21+
22+ int_module ! { isize }
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- //! Operations and constants for architecture-sized unsigned integers (`uint` type)
11+ //! Deprecated: replaced by `usize`.
12+ //!
13+ //! The rollout of the new type will gradually take place over the
14+ //! alpha cycle along with the development of clearer conventions
15+ //! around integer types.
1216
13- #![ stable]
14- #![ doc( primitive = "uint" ) ]
17+ #![ deprecated = "replaced by usize" ]
1518
1619pub use core:: uint:: { BITS , BYTES , MIN , MAX } ;
1720
Original file line number Diff line number Diff line change 1+ // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ //! Operations and constants for pointer-sized unsigned integers (`usize` type)
12+ //!
13+ //! This type was recently added to replace `uint`. The rollout of the
14+ //! new type will gradually take place over the alpha cycle along with
15+ //! the development of clearer conventions around integer types.
16+
17+ #![ stable]
18+ #![ doc( primitive = "usize" ) ]
19+
20+ pub use core:: usize:: { BITS , BYTES , MIN , MAX } ;
21+
22+ uint_module ! { usize }
You can’t perform that action at this time.
0 commit comments