Skip to content

Commit 786e135

Browse files
committed
---
yaml --- r: 174251 b: refs/heads/auto c: 12f9fb88e0c3bc0ad881c519b655fe4130126d2a h: refs/heads/master i: 174249: c79a8d6 174247: a8c6c6b v: v3
1 parent dfdb054 commit 786e135

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: d5c83652b33a6e5049699ccc7e6bd6fffb42c2b8
13+
refs/heads/auto: 12f9fb88e0c3bc0ad881c519b655fe4130126d2a
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libsyntax/ext/deriving/generic/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//! arguments:
2929
//!
3030
//! - `Struct`, when `Self` is a struct (including tuple structs, e.g
31-
//! `struct T(int, char)`).
31+
//! `struct T(i32, char)`).
3232
//! - `EnumMatching`, when `Self` is an enum and all the arguments are the
3333
//! same variant of the enum (e.g. `Some(1)`, `Some(3)` and `Some(4)`)
3434
//! - `EnumNonMatchingCollapsed` when `Self` is an enum and the arguments
@@ -54,17 +54,17 @@
5454
//! following snippet
5555
//!
5656
//! ```rust
57-
//! struct A { x : int }
57+
//! struct A { x : i32 }
5858
//!
59-
//! struct B(int);
59+
//! struct B(i32);
6060
//!
6161
//! enum C {
62-
//! C0(int),
63-
//! C1 { x: int }
62+
//! C0(i32),
63+
//! C1 { x: i32 }
6464
//! }
6565
//! ```
6666
//!
67-
//! The `int`s in `B` and `C0` don't have an identifier, so the
67+
//! The `i32`s in `B` and `C0` don't have an identifier, so the
6868
//! `Option<ident>`s would be `None` for them.
6969
//!
7070
//! In the static cases, the structure is summarised, either into the just
@@ -90,8 +90,8 @@
9090
//! trait PartialEq {
9191
//! fn eq(&self, other: &Self);
9292
//! }
93-
//! impl PartialEq for int {
94-
//! fn eq(&self, other: &int) -> bool {
93+
//! impl PartialEq for i32 {
94+
//! fn eq(&self, other: &i32) -> bool {
9595
//! *self == *other
9696
//! }
9797
//! }
@@ -117,7 +117,7 @@
117117
//!
118118
//! ```{.text}
119119
//! Struct(vec![FieldInfo {
120-
//! span: <span of `int`>,
120+
//! span: <span of `i32`>,
121121
//! name: None,
122122
//! self_: <expr for &a>
123123
//! other: vec![<expr for &b>]
@@ -132,7 +132,7 @@
132132
//! ```{.text}
133133
//! EnumMatching(0, <ast::Variant for C0>,
134134
//! vec![FieldInfo {
135-
//! span: <span of int>
135+
//! span: <span of i32>
136136
//! name: None,
137137
//! self_: <expr for &a>,
138138
//! other: vec![<expr for &b>]
@@ -179,7 +179,7 @@
179179
//! StaticStruct(<ast::StructDef of B>, Unnamed(vec![<span of x>]))
180180
//!
181181
//! StaticEnum(<ast::EnumDef of C>,
182-
//! vec![(<ident of C0>, <span of C0>, Unnamed(vec![<span of int>])),
182+
//! vec![(<ident of C0>, <span of C0>, Unnamed(vec![<span of i32>])),
183183
//! (<ident of C1>, <span of C1>, Named(vec![(<ident of x>, <span of x>)]))])
184184
//! ```
185185
@@ -719,7 +719,7 @@ impl<'a> MethodDef<'a> {
719719

720720
/// ```
721721
/// #[derive(PartialEq)]
722-
/// struct A { x: int, y: int }
722+
/// struct A { x: i32, y: i32 }
723723
///
724724
/// // equivalent to:
725725
/// impl PartialEq for A {
@@ -825,7 +825,7 @@ impl<'a> MethodDef<'a> {
825825
/// #[derive(PartialEq)]
826826
/// enum A {
827827
/// A1,
828-
/// A2(int)
828+
/// A2(i32)
829829
/// }
830830
///
831831
/// // is equivalent to

branches/auto/src/libsyntax/ext/deriving/generic/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub enum PtrTy<'a> {
3232
Raw(ast::Mutability),
3333
}
3434

35-
/// A path, e.g. `::std::option::Option::<int>` (global). Has support
35+
/// A path, e.g. `::std::option::Option::<i32>` (global). Has support
3636
/// for type parameters and a lifetime.
3737
#[derive(Clone)]
3838
pub struct Path<'a> {
@@ -91,7 +91,7 @@ pub enum Ty<'a> {
9191
/// &/Box/ Ty
9292
Ptr(Box<Ty<'a>>, PtrTy<'a>),
9393
/// mod::mod::Type<[lifetime], [Params...]>, including a plain type
94-
/// parameter, and things like `int`
94+
/// parameter, and things like `i32`
9595
Literal(Path<'a>),
9696
/// includes unit
9797
Tuple(Vec<Ty<'a>> )

branches/auto/src/libsyntax/ext/expand.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ mod test {
15071507
#[should_fail]
15081508
#[test] fn macros_cant_escape_fns_test () {
15091509
let src = "fn bogus() {macro_rules! z (() => (3+4));}\
1510-
fn inty() -> int { z!() }".to_string();
1510+
fn inty() -> i32 { z!() }".to_string();
15111511
let sess = parse::new_parse_sess();
15121512
let crate_ast = parse::parse_crate_from_source_str(
15131513
"<test>".to_string(),
@@ -1521,7 +1521,7 @@ mod test {
15211521
#[should_fail]
15221522
#[test] fn macros_cant_escape_mods_test () {
15231523
let src = "mod foo {macro_rules! z (() => (3+4));}\
1524-
fn inty() -> int { z!() }".to_string();
1524+
fn inty() -> i32 { z!() }".to_string();
15251525
let sess = parse::new_parse_sess();
15261526
let crate_ast = parse::parse_crate_from_source_str(
15271527
"<test>".to_string(),
@@ -1533,7 +1533,7 @@ mod test {
15331533
// macro_use modules should allow macros to escape
15341534
#[test] fn macros_can_escape_flattened_mods_test () {
15351535
let src = "#[macro_use] mod foo {macro_rules! z (() => (3+4));}\
1536-
fn inty() -> int { z!() }".to_string();
1536+
fn inty() -> i32 { z!() }".to_string();
15371537
let sess = parse::new_parse_sess();
15381538
let crate_ast = parse::parse_crate_from_source_str(
15391539
"<test>".to_string(),
@@ -1564,8 +1564,8 @@ mod test {
15641564
// should be able to use a bound identifier as a literal in a macro definition:
15651565
#[test] fn self_macro_parsing(){
15661566
expand_crate_str(
1567-
"macro_rules! foo ((zz) => (287u;));
1568-
fn f(zz : int) {foo!(zz);}".to_string()
1567+
"macro_rules! foo ((zz) => (287;));
1568+
fn f(zz: i32) {foo!(zz);}".to_string()
15691569
);
15701570
}
15711571

@@ -1601,23 +1601,23 @@ mod test {
16011601
fn automatic_renaming () {
16021602
let tests: Vec<RenamingTest> =
16031603
vec!(// b & c should get new names throughout, in the expr too:
1604-
("fn a() -> int { let b = 13; let c = b; b+c }",
1604+
("fn a() -> i32 { let b = 13; let c = b; b+c }",
16051605
vec!(vec!(0,1),vec!(2)), false),
16061606
// both x's should be renamed (how is this causing a bug?)
1607-
("fn main () {let x: int = 13;x;}",
1607+
("fn main () {let x: i32 = 13;x;}",
16081608
vec!(vec!(0)), false),
16091609
// the use of b after the + should be renamed, the other one not:
1610-
("macro_rules! f (($x:ident) => (b + $x)); fn a() -> int { let b = 13; f!(b)}",
1610+
("macro_rules! f (($x:ident) => (b + $x)); fn a() -> i32 { let b = 13; f!(b)}",
16111611
vec!(vec!(1)), false),
16121612
// the b before the plus should not be renamed (requires marks)
1613-
("macro_rules! f (($x:ident) => ({let b=9; ($x + b)})); fn a() -> int { f!(b)}",
1613+
("macro_rules! f (($x:ident) => ({let b=9; ($x + b)})); fn a() -> i32 { f!(b)}",
16141614
vec!(vec!(1)), false),
16151615
// the marks going in and out of letty should cancel, allowing that $x to
16161616
// capture the one following the semicolon.
16171617
// this was an awesome test case, and caught a *lot* of bugs.
16181618
("macro_rules! letty(($x:ident) => (let $x = 15;));
16191619
macro_rules! user(($x:ident) => ({letty!($x); $x}));
1620-
fn main() -> int {user!(z)}",
1620+
fn main() -> i32 {user!(z)}",
16211621
vec!(vec!(0)), false)
16221622
);
16231623
for (idx,s) in tests.iter().enumerate() {
@@ -1680,13 +1680,13 @@ mod test {
16801680
// can't write this test case until we have macro-generating macros.
16811681

16821682
// method arg hygiene
1683-
// method expands to fn get_x(&self_0, x_1:int) {self_0 + self_2 + x_3 + x_1}
1683+
// method expands to fn get_x(&self_0, x_1: i32) {self_0 + self_2 + x_3 + x_1}
16841684
#[test] fn method_arg_hygiene(){
16851685
run_renaming_test(
16861686
&("macro_rules! inject_x (()=>(x));
16871687
macro_rules! inject_self (()=>(self));
16881688
struct A;
1689-
impl A{fn get_x(&self, x: int) {self + inject_self!() + inject_x!() + x;} }",
1689+
impl A{fn get_x(&self, x: i32) {self + inject_self!() + inject_x!() + x;} }",
16901690
vec!(vec!(0),vec!(3)),
16911691
true),
16921692
0)
@@ -1706,21 +1706,21 @@ mod test {
17061706
}
17071707

17081708
// item fn hygiene
1709-
// expands to fn q(x_1:int){fn g(x_2:int){x_2 + x_1};}
1709+
// expands to fn q(x_1: i32){fn g(x_2: i32){x_2 + x_1};}
17101710
#[test] fn issue_9383(){
17111711
run_renaming_test(
1712-
&("macro_rules! bad_macro (($ex:expr) => (fn g(x:int){ x + $ex }));
1713-
fn q(x:int) { bad_macro!(x); }",
1712+
&("macro_rules! bad_macro (($ex:expr) => (fn g(x: i32){ x + $ex }));
1713+
fn q(x: i32) { bad_macro!(x); }",
17141714
vec!(vec!(1),vec!(0)),true),
17151715
0)
17161716
}
17171717

17181718
// closure arg hygiene (ExprClosure)
1719-
// expands to fn f(){(|x_1 : int| {(x_2 + x_1)})(3);}
1719+
// expands to fn f(){(|x_1 : i32| {(x_2 + x_1)})(3);}
17201720
#[test] fn closure_arg_hygiene(){
17211721
run_renaming_test(
17221722
&("macro_rules! inject_x (()=>(x));
1723-
fn f(){(|x : int| {(inject_x!() + x)})(3);}",
1723+
fn f(){(|x : i32| {(inject_x!() + x)})(3);}",
17241724
vec!(vec!(1)),
17251725
true),
17261726
0)
@@ -1729,7 +1729,7 @@ mod test {
17291729
// macro_rules in method position. Sadly, unimplemented.
17301730
#[test] fn macro_in_method_posn(){
17311731
expand_crate_str(
1732-
"macro_rules! my_method (() => (fn thirteen(&self) -> int {13}));
1732+
"macro_rules! my_method (() => (fn thirteen(&self) -> i32 {13}));
17331733
struct A;
17341734
impl A{ my_method!(); }
17351735
fn f(){A.thirteen;}".to_string());
@@ -1876,7 +1876,7 @@ foo_module!();
18761876
// it's the name of a 0-ary variant, and that 'i' appears twice in succession.
18771877
#[test]
18781878
fn crate_bindings_test(){
1879-
let the_crate = string_to_crate("fn main (a : int) -> int {|b| {
1879+
let the_crate = string_to_crate("fn main (a: i32) -> i32 {|b| {
18801880
match 34 {None => 3, Some(i) | i => j, Foo{k:z,l:y} => \"banana\"}} }".to_string());
18811881
let idents = crate_bindings(&the_crate);
18821882
assert_eq!(idents, strs_to_idents(vec!("a","b","None","i","i","z","y")));
@@ -1885,10 +1885,10 @@ foo_module!();
18851885
// test the IdentRenamer directly
18861886
#[test]
18871887
fn ident_renamer_test () {
1888-
let the_crate = string_to_crate("fn f(x : int){let x = x; x}".to_string());
1888+
let the_crate = string_to_crate("fn f(x: i32){let x = x; x}".to_string());
18891889
let f_ident = token::str_to_ident("f");
18901890
let x_ident = token::str_to_ident("x");
1891-
let int_ident = token::str_to_ident("int");
1891+
let int_ident = token::str_to_ident("i32");
18921892
let renames = vec!((x_ident,Name(16)));
18931893
let mut renamer = IdentRenamer{renames: &renames};
18941894
let renamed_crate = renamer.fold_crate(the_crate);
@@ -1900,10 +1900,10 @@ foo_module!();
19001900
// test the PatIdentRenamer; only PatIdents get renamed
19011901
#[test]
19021902
fn pat_ident_renamer_test () {
1903-
let the_crate = string_to_crate("fn f(x : int){let x = x; x}".to_string());
1903+
let the_crate = string_to_crate("fn f(x: i32){let x = x; x}".to_string());
19041904
let f_ident = token::str_to_ident("f");
19051905
let x_ident = token::str_to_ident("x");
1906-
let int_ident = token::str_to_ident("int");
1906+
let int_ident = token::str_to_ident("i32");
19071907
let renames = vec!((x_ident,Name(16)));
19081908
let mut renamer = PatIdentRenamer{renames: &renames};
19091909
let renamed_crate = renamer.fold_crate(the_crate);

branches/auto/src/libsyntax/parse/lexer/comments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ mod test {
399399
}
400400

401401
#[test] fn test_block_doc_comment_3() {
402-
let comment = "/**\n let a: *int;\n *a = 5;\n*/";
402+
let comment = "/**\n let a: *i32;\n *a = 5;\n*/";
403403
let stripped = strip_doc_comment_decoration(comment);
404-
assert_eq!(stripped, " let a: *int;\n *a = 5;");
404+
assert_eq!(stripped, " let a: *i32;\n *a = 5;");
405405
}
406406

407407
#[test] fn test_block_doc_comment_4() {

branches/auto/src/libsyntax/parse/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ mod test {
855855

856856
#[test]
857857
fn string_to_tts_1 () {
858-
let tts = string_to_tts("fn a (b : int) { b; }".to_string());
858+
let tts = string_to_tts("fn a (b : i32) { b; }".to_string());
859859
assert_eq!(json::encode(&tts),
860860
"[\
861861
{\
@@ -919,7 +919,7 @@ mod test {
919919
{\
920920
\"variant\":\"Ident\",\
921921
\"fields\":[\
922-
\"int\",\
922+
\"i32\",\
923923
\"Plain\"\
924924
]\
925925
}\
@@ -1031,8 +1031,8 @@ mod test {
10311031

10321032
// check the contents of the tt manually:
10331033
#[test] fn parse_fundecl () {
1034-
// this test depends on the intern order of "fn" and "int"
1035-
assert!(string_to_item("fn a (b : int) { b; }".to_string()) ==
1034+
// this test depends on the intern order of "fn" and "i32"
1035+
assert!(string_to_item("fn a (b: i32) { b; }".to_string()) ==
10361036
Some(
10371037
P(ast::Item{ident:str_to_ident("a"),
10381038
attrs:Vec::new(),
@@ -1046,7 +1046,7 @@ mod test {
10461046
segments: vec!(
10471047
ast::PathSegment {
10481048
identifier:
1049-
str_to_ident("int"),
1049+
str_to_ident("i32"),
10501050
parameters: ast::PathParameters::none(),
10511051
}
10521052
),

branches/auto/src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ impl<'a> Parser<'a> {
14991499
self.expect(&token::OpenDelim(token::Bracket));
15001500
let t = self.parse_ty_sum();
15011501

1502-
// Parse the `; e` in `[ int; e ]`
1502+
// Parse the `; e` in `[ i32; e ]`
15031503
// where `e` is a const expression
15041504
let t = match self.maybe_parse_fixed_length_of_vec() {
15051505
None => TyVec(t),
@@ -4803,7 +4803,7 @@ impl<'a> Parser<'a> {
48034803
Some(attrs))
48044804
}
48054805

4806-
/// Parse a::B<String,int>
4806+
/// Parse a::B<String,i32>
48074807
fn parse_trait_ref(&mut self) -> TraitRef {
48084808
ast::TraitRef {
48094809
path: self.parse_path(LifetimeAndTypesWithoutColons),
@@ -4822,7 +4822,7 @@ impl<'a> Parser<'a> {
48224822
}
48234823
}
48244824

4825-
/// Parse for<'l> a::B<String,int>
4825+
/// Parse for<'l> a::B<String,i32>
48264826
fn parse_poly_trait_ref(&mut self) -> PolyTraitRef {
48274827
let lifetime_defs = self.parse_late_bound_lifetime_defs();
48284828

0 commit comments

Comments
 (0)