File tree Expand file tree Collapse file tree 6 files changed +44
-24
lines changed Expand file tree Collapse file tree 6 files changed +44
-24
lines changed Original file line number Diff line number Diff line change 1414
1515#![ unstable( feature = "i128" , issue="35118" ) ]
1616
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
22// file at the top-level directory of this distribution and at
33// http://rust-lang.org/COPYRIGHT.
44//
1010
1111#![ doc( hidden) ]
1212
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 1313//! *[See also the `u128` primitive type](../../std/primitive.u128.html).*
1414
1515#![ 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
22// file at the top-level directory of this distribution and at
33// http://rust-lang.org/COPYRIGHT.
44//
1010
1111#![ doc( hidden) ]
1212
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 2626#![ feature( rustc_private) ]
2727#![ feature( staged_api) ]
2828#![ feature( const_fn) ]
29+ #![ cfg_attr( not( stage0) , feature( i128 ) ) ]
2930
3031#[ macro_use] extern crate log;
3132#[ 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