File tree 6 files changed +44
-24
lines changed
6 files changed +44
-24
lines changed Original file line number Diff line number Diff line change 14
14
15
15
#![ unstable( feature = "i128" , issue="35118" ) ]
16
16
17
- int_module ! { i128 }
17
+ int_module ! { i128 , # [ unstable ( feature = "i128" , issue= "35118" ) ] }
Original file line number Diff line number Diff line change 1
- // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2017 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
10
10
11
11
#![ doc( hidden) ]
12
12
13
- macro_rules! int_module { ( $T: ident) => (
14
-
15
- /// The smallest value that can be represented by this integer type.
16
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
17
- pub const MIN : $T = $T:: min_value( ) ;
18
- /// The largest value that can be represented by this integer type.
19
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
20
- pub const MAX : $T = $T:: max_value( ) ;
21
-
22
- ) }
13
+ macro_rules! int_module {
14
+ ( $T: ident) => ( int_module!( $T, #[ stable( feature = "rust1" , since = "1.0.0" ) ] ) ; ) ;
15
+ ( $T: ident, $( $attr: tt) * ) => (
16
+ /// The smallest value that can be represented by this integer type.
17
+ $( $attr) *
18
+ pub const MIN : $T = $T:: min_value( ) ;
19
+ /// The largest value that can be represented by this integer type.
20
+ $( $attr) *
21
+ pub const MAX : $T = $T:: max_value( ) ;
22
+ )
23
+ }
Original file line number Diff line number Diff line change 13
13
//! *[See also the `u128` primitive type](../../std/primitive.u128.html).*
14
14
15
15
#![ unstable( feature = "i128" , issue="35118" ) ]
16
- uint_module ! { u128 }
16
+ uint_module ! { u128 , # [ unstable ( feature = "i128" , issue= "35118" ) ] }
Original file line number Diff line number Diff line change 1
- // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2017 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
10
10
11
11
#![ doc( hidden) ]
12
12
13
- macro_rules! uint_module { ( $T: ident) => (
14
-
15
- /// The smallest value that can be represented by this integer type.
16
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
17
- pub const MIN : $T = $T:: min_value( ) ;
18
- /// The largest value that can be represented by this integer type.
19
- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
20
- pub const MAX : $T = $T:: max_value( ) ;
21
-
22
- ) }
13
+ macro_rules! uint_module {
14
+ ( $T: ident) => ( uint_module!( $T, #[ stable( feature = "rust1" , since = "1.0.0" ) ] ) ; ) ;
15
+ ( $T: ident, $( $attr: tt) * ) => (
16
+ /// The smallest value that can be represented by this integer type.
17
+ $( $attr) *
18
+ pub const MIN : $T = $T:: min_value( ) ;
19
+ /// The largest value that can be represented by this integer type.
20
+ $( $attr) *
21
+ pub const MAX : $T = $T:: max_value( ) ;
22
+ )
23
+ }
Original file line number Diff line number Diff line change 26
26
#![ feature( rustc_private) ]
27
27
#![ feature( staged_api) ]
28
28
#![ feature( const_fn) ]
29
+ #![ cfg_attr( not( stage0) , feature( i128 ) ) ]
29
30
30
31
#[ macro_use] extern crate log;
31
32
#[ macro_use] extern crate syntax;
Original file line number Diff line number Diff line change
1
+ // Copyright 2017 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
+ fn testl ( ) {
12
+ :: std:: u128:: MAX ; //~ ERROR use of unstable library feature 'i128'
13
+ }
14
+
15
+ fn testl2 ( ) {
16
+ :: std:: i128:: MAX ; //~ ERROR use of unstable library feature 'i128'
17
+ }
You can’t perform that action at this time.
0 commit comments