[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 0e832ec 340/486: Remove `float`, `int`, and `uin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 0e832ec 340/486: Remove `float`, `int`, and `uint` as built-in types. |
Date: |
Sat, 7 Aug 2021 09:25:48 -0400 (EDT) |
branch: elpa/rust-mode
commit 0e832ecc9a19086d85718e378febb633e38afe84
Author: Jake Goulding <jake.goulding@gmail.com>
Commit: Jake Goulding <jake.goulding@gmail.com>
Remove `float`, `int`, and `uint` as built-in types.
These went away pre Rust-1.0 and are valid identifiers. Went ahead and
removed them from the tests as well, replacing them with real types of
the same number of characters.
---
rust-mode-tests.el | 76 +++++++++++++++++++++++++++---------------------------
rust-mode.el | 2 +-
2 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index f0a73a2..b2e8338 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -316,11 +316,11 @@ very very very long string
(ert-deftest indent-struct-fields-aligned ()
(test-indent
"
-struct Foo { bar: int,
- baz: int }
+struct Foo { bar: i32,
+ baz: i32 }
-struct Blah {x:int,
- y:int,
+struct Blah {x:i32,
+ y:i32,
z:String"))
(ert-deftest indent-doc-comments ()
@@ -345,12 +345,12 @@ fn foo() {
"
// struct fields out one level:
struct foo {
- a:int,
+ a:i32,
// comments too
b:char
}
-fn bar(x:Box<int>) { // comment here should not affect the next indent
+fn bar(x:Box<i32>) { // comment here should not affect the next indent
bla();
bla();
}"))
@@ -397,11 +397,11 @@ not_a_string();
"
// Indent out one level because no params appear on the first line
fn xyzzy(
- a:int,
+ a:i32,
b:char) { }
fn abcdef(
- a:int,
+ a:i32,
b:char)
-> char
{ }"))
@@ -410,17 +410,17 @@ fn abcdef(
(test-indent
"
// Align the second line of params to the first
-fn foo(a:int,
+fn foo(a:i32,
b:char) { }
-fn bar( a:int,
+fn bar( a:i32,
b:char)
- -> int
+ -> i32
{ }
-fn baz( a:int, // should work with a comment here
+fn baz( a:i32, // should work with a comment here
b:char)
- -> int
+ -> i32
{ }
"))
@@ -428,24 +428,24 @@ fn baz( a:int, // should work with a comment here
(test-indent
"
// Indent function body only one level after `-> {`
-fn foo1(a:int, b:char) -> int {
+fn foo1(a:i32, b:char) -> i32 {
let body;
}
-fn foo2(a:int,
- b:char) -> int {
+fn foo2(a:i32,
+ b:char) -> i32 {
let body;
}
-fn foo3(a:int,
+fn foo3(a:i32,
b:char)
- -> int {
+ -> i32 {
let body;
}
-fn foo4(a:int,
+fn foo4(a:i32,
b:char)
- -> int where int:A {
+ -> i32 where i32:A {
let body;
}
"))
@@ -657,7 +657,7 @@ pub struct Region { // <-- this should be flush with left
margin!
(test-indent
"
fn args_on_the_next_line( // with a comment
- a:int,
+ a:i32,
b:String) {
let aaaaaa = [
1,
@@ -692,11 +692,11 @@ fn args_on_the_next_line( // with a comment
(ert-deftest indent-nested-fns ()
(test-indent
"
-fn nexted_fns(a: fn(b:int,
+fn nexted_fns(a: fn(b:i32,
c:char)
- -> int,
- d: int)
- -> uint
+ -> i32,
+ d: i32)
+ -> u128
{
0
}
@@ -849,32 +849,32 @@ struct A {
(setq rust-test-motion-string
"
-fn fn1(arg: int) -> bool {
+fn fn1(arg: i32) -> bool {
let x = 5;
let y = b();
true
}
-fn fn2(arg: int) -> bool {
+fn fn2(arg: i32) -> bool {
let x = 5;
let y = b();
true
}
-pub fn fn3(arg: int) -> bool {
+pub fn fn3(arg: i32) -> bool {
let x = 5;
let y = b();
true
}
struct Foo {
- x: int
+ x: i32
}
"
rust-test-region-string rust-test-motion-string
rust-test-indent-motion-string
"
-fn blank_line(arg:int) -> bool {
+fn blank_line(arg:i32) -> bool {
}
@@ -1820,7 +1820,7 @@ pattern to what did and did not trip it."
;; would make the failure go away.
(with-temp-buffer
(rust-mode)
- (insert "fn blank_line(arg:int) -> bool {
+ (insert "fn blank_line(arg:i32) -> bool {
}
@@ -2774,7 +2774,7 @@ fn foo() -> Box<i32> {
(ert-deftest rust-test-paren-matching-lt-operator-after-special-type ()
(rust-test-matching-parens
- "fn foo() { low as uint <= c }"
+ "fn foo() { low as u128 <= c }"
'((10 29))
'(24)))
@@ -2887,16 +2887,16 @@ fn f() {
(rust-test-matching-parens
"
fn rfc803() {
- let z = a < b:FunnkyThing<int>;
+ let z = a < b:FunnkyThing<i32>;
let s = Foo {
a: b < 3,
- b: d:CrazyStuff<int> < 3,
- c: 2 < x:CrazyStuff<uint>
+ b: d:CrazyStuff<i32> < 3,
+ c: 2 < x:CrazyStuff<u128>
}
}"
- '((45 49) ;; FunkyThing<int>
- (111 115) ;; CrazyStuff<int>
- (149 154) ;; CrazyStuff<uint>
+ '((45 49) ;; FunkyThing<i32>
+ (111 115) ;; CrazyStuff<i32>
+ (149 154) ;; CrazyStuff<u128>
)
'(30 ;; a < b
83 ;; b < 3
diff --git a/rust-mode.el b/rust-mode.el
index ebc6ee9..d5f1391 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -547,7 +547,7 @@ buffer."
"u128" "i128"
"f32" "f64"
- "float" "int" "uint" "isize" "usize"
+ "isize" "usize"
"bool"
"str" "char"))
- [nongnu] elpa/rust-mode 4ec735e 300/486: Add stderr output from rustfmt on exit code 3, (continued)
- [nongnu] elpa/rust-mode 4ec735e 300/486: Add stderr output from rustfmt on exit code 3, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9afe997 313/486: Declare `rust-buffer-project' and require `json' at runtime., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b4077f8 314/486: Add `rust-cargo-bin' custom variable., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d2bb17c 315/486: Skip `rust-test-project-located' without cargo and avoid `find-file' in test., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0985f5f 318/486: Merge pull request #217 from Aankhen/add-clippy-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 34cc528 319/486: Highlight question mark operator using new `rust-question-mark-face'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2a9fcd0 321/486: Add syntax highlighting and imenu support for `union`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 89320ad 323/486: Highlight interpolation in arguments to print! &c., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e48a650 329/486: Merge pull request #225 from Aankhen/add-var-colours, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6e9db46 331/486: Merge pull request #230 from tromey/fix-indentation-bug, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0e832ec 340/486: Remove `float`, `int`, and `uint` as built-in types.,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 302b537 344/486: Revert #216 and Add Suggestions from #226, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b8e4908 345/486: Merge pull request #243 from iwillspeak/rust-compile-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6bcb82b 350/486: Merge pull request #249 from brotzeit/rust--format-call, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 705f3e4 352/486: Improved font-locking for print macros, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2fe1f9d 355/486: add dyn to keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0d408d5 357/486: Merge pull request #253 from jjwest/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 42c98bb 362/486: Merge pull request #263 from nikomatsakis/tweak-compilation-regexp, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3613551 365/486: throw error in after-save-hook instead of before-save-hook, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 64b4a24 368/486: Merge pull request #272 from tromey/let-ref-font-lock, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 106aeab 369/486: Merge pull request #267 from jthemphill/patch-1, ELPA Syncer, 2021/08/07