@@ -316,11 +316,11 @@ very very very long string
316
316
(ert-deftest indent-struct-fields-aligned ()
317
317
(test-indent
318
318
"
319
- struct Foo { bar: int ,
320
- baz: int }
319
+ struct Foo { bar: i32 ,
320
+ baz: i32 }
321
321
322
- struct Blah {x:int ,
323
- y:int ,
322
+ struct Blah {x:i32 ,
323
+ y:i32 ,
324
324
z:String" ))
325
325
326
326
(ert-deftest indent-doc-comments ()
@@ -345,12 +345,12 @@ fn foo() {
345
345
"
346
346
// struct fields out one level:
347
347
struct foo {
348
- a:int ,
348
+ a:i32 ,
349
349
// comments too
350
350
b:char
351
351
}
352
352
353
- fn bar(x:Box<int >) { // comment here should not affect the next indent
353
+ fn bar(x:Box<i32 >) { // comment here should not affect the next indent
354
354
bla();
355
355
bla();
356
356
}" ))
@@ -397,11 +397,11 @@ not_a_string();
397
397
"
398
398
// Indent out one level because no params appear on the first line
399
399
fn xyzzy(
400
- a:int ,
400
+ a:i32 ,
401
401
b:char) { }
402
402
403
403
fn abcdef(
404
- a:int ,
404
+ a:i32 ,
405
405
b:char)
406
406
-> char
407
407
{ }" ))
@@ -410,42 +410,42 @@ fn abcdef(
410
410
(test-indent
411
411
"
412
412
// Align the second line of params to the first
413
- fn foo(a:int ,
413
+ fn foo(a:i32 ,
414
414
b:char) { }
415
415
416
- fn bar( a:int ,
416
+ fn bar( a:i32 ,
417
417
b:char)
418
- -> int
418
+ -> i32
419
419
{ }
420
420
421
- fn baz( a:int , // should work with a comment here
421
+ fn baz( a:i32 , // should work with a comment here
422
422
b:char)
423
- -> int
423
+ -> i32
424
424
{ }
425
425
" ))
426
426
427
427
(ert-deftest indent-open-after-arrow ()
428
428
(test-indent
429
429
"
430
430
// Indent function body only one level after `-> {`
431
- fn foo1(a:int , b:char) -> int {
431
+ fn foo1(a:i32 , b:char) -> i32 {
432
432
let body;
433
433
}
434
434
435
- fn foo2(a:int ,
436
- b:char) -> int {
435
+ fn foo2(a:i32 ,
436
+ b:char) -> i32 {
437
437
let body;
438
438
}
439
439
440
- fn foo3(a:int ,
440
+ fn foo3(a:i32 ,
441
441
b:char)
442
- -> int {
442
+ -> i32 {
443
443
let body;
444
444
}
445
445
446
- fn foo4(a:int ,
446
+ fn foo4(a:i32 ,
447
447
b:char)
448
- -> int where int :A {
448
+ -> i32 where i32 :A {
449
449
let body;
450
450
}
451
451
" ))
@@ -657,7 +657,7 @@ pub struct Region { // <-- this should be flush with left margin!
657
657
(test-indent
658
658
"
659
659
fn args_on_the_next_line( // with a comment
660
- a:int ,
660
+ a:i32 ,
661
661
b:String) {
662
662
let aaaaaa = [
663
663
1,
@@ -692,11 +692,11 @@ fn args_on_the_next_line( // with a comment
692
692
(ert-deftest indent-nested-fns ()
693
693
(test-indent
694
694
"
695
- fn nexted_fns(a: fn(b:int ,
695
+ fn nexted_fns(a: fn(b:i32 ,
696
696
c:char)
697
- -> int ,
698
- d: int )
699
- -> uint
697
+ -> i32 ,
698
+ d: i32 )
699
+ -> u128
700
700
{
701
701
0
702
702
}
@@ -849,32 +849,32 @@ struct A {
849
849
850
850
(setq rust-test-motion-string
851
851
"
852
- fn fn1(arg: int ) -> bool {
852
+ fn fn1(arg: i32 ) -> bool {
853
853
let x = 5;
854
854
let y = b();
855
855
true
856
856
}
857
857
858
- fn fn2(arg: int ) -> bool {
858
+ fn fn2(arg: i32 ) -> bool {
859
859
let x = 5;
860
860
let y = b();
861
861
true
862
862
}
863
863
864
- pub fn fn3(arg: int ) -> bool {
864
+ pub fn fn3(arg: i32 ) -> bool {
865
865
let x = 5;
866
866
let y = b();
867
867
true
868
868
}
869
869
870
870
struct Foo {
871
- x: int
871
+ x: i32
872
872
}
873
873
"
874
874
rust-test-region-string rust-test-motion-string
875
875
rust-test-indent-motion-string
876
876
"
877
- fn blank_line(arg:int ) -> bool {
877
+ fn blank_line(arg:i32 ) -> bool {
878
878
879
879
}
880
880
@@ -1820,7 +1820,7 @@ pattern to what did and did not trip it."
1820
1820
; ; would make the failure go away.
1821
1821
(with-temp-buffer
1822
1822
(rust-mode )
1823
- (insert " fn blank_line(arg:int ) -> bool {
1823
+ (insert " fn blank_line(arg:i32 ) -> bool {
1824
1824
1825
1825
}
1826
1826
@@ -2774,7 +2774,7 @@ fn foo() -> Box<i32> {
2774
2774
2775
2775
(ert-deftest rust-test-paren-matching-lt-operator-after-special-type ()
2776
2776
(rust-test-matching-parens
2777
- " fn foo() { low as uint <= c }"
2777
+ " fn foo() { low as u128 <= c }"
2778
2778
'((10 29 ))
2779
2779
'(24 )))
2780
2780
@@ -2887,16 +2887,16 @@ fn f() {
2887
2887
(rust-test-matching-parens
2888
2888
"
2889
2889
fn rfc803() {
2890
- let z = a < b:FunnkyThing<int >;
2890
+ let z = a < b:FunnkyThing<i32 >;
2891
2891
let s = Foo {
2892
2892
a: b < 3,
2893
- b: d:CrazyStuff<int > < 3,
2894
- c: 2 < x:CrazyStuff<uint >
2893
+ b: d:CrazyStuff<i32 > < 3,
2894
+ c: 2 < x:CrazyStuff<u128 >
2895
2895
}
2896
2896
}"
2897
- '((45 49 ) ; ; FunkyThing<int >
2898
- (111 115 ) ; ; CrazyStuff<int >
2899
- (149 154 ) ; ; CrazyStuff<uint >
2897
+ '((45 49 ) ; ; FunkyThing<i32 >
2898
+ (111 115 ) ; ; CrazyStuff<i32 >
2899
+ (149 154 ) ; ; CrazyStuff<u128 >
2900
2900
)
2901
2901
'(30 ; ; a < b
2902
2902
83 ; ; b < 3
0 commit comments