diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-25 17:06:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-26 12:10:22 -0700 |
| commit | 43bfaa4a336095eb5697fb2df50909fd3c72ed14 (patch) | |
| tree | e10610e1ce9811c89e1291b786d7a49b63ee02d9 /src/doc | |
| parent | 54f16b818b58f6d6e81891b041fc751986e75155 (diff) | |
| download | rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.tar.gz rust-43bfaa4a336095eb5697fb2df50909fd3c72ed14.zip | |
Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/reference.md | 7 | ||||
| -rw-r--r-- | src/doc/trpl/ffi.md | 4 | ||||
| -rw-r--r-- | src/doc/trpl/more-strings.md | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index 32088b2ab67..1f043424f31 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -2440,9 +2440,6 @@ The currently implemented features of the reference compiler are: * `intrinsics` - Allows use of the "rust-intrinsics" ABI. Compiler intrinsics are inherently unstable and no promise about them is made. -* `int_uint` - Allows the use of the `int` and `uint` types, which are deprecated. - Use `isize` and `usize` instead. - * `lang_items` - Allows use of the `#[lang]` attribute. Like `intrinsics`, lang items are inherently unstable and no promise about them is made. @@ -2759,7 +2756,7 @@ The following are examples of structure expressions: ``` # struct Point { x: f64, y: f64 } # struct TuplePoint(f64, f64); -# mod game { pub struct User<'a> { pub name: &'a str, pub age: u32, pub score: uint } } +# mod game { pub struct User<'a> { pub name: &'a str, pub age: u32, pub score: usize } } # struct Cookie; fn some_fn<T>(t: T) {} Point {x: 10.0, y: 20.0}; TuplePoint(10.0, 20.0); @@ -3402,7 +3399,7 @@ subpattern`. For example: #![feature(box_patterns)] #![feature(box_syntax)] -enum List { Nil, Cons(uint, Box<List>) } +enum List { Nil, Cons(u32, Box<List>) } fn is_sorted(list: &List) -> bool { match *list { diff --git a/src/doc/trpl/ffi.md b/src/doc/trpl/ffi.md index 695279e2d5b..b65d90f52a4 100644 --- a/src/doc/trpl/ffi.md +++ b/src/doc/trpl/ffi.md @@ -401,7 +401,7 @@ Unsafe functions, on the other hand, advertise it to the world. An unsafe functi this: ``` -unsafe fn kaboom(ptr: *const int) -> int { *ptr } +unsafe fn kaboom(ptr: *const i32) -> i32 { *ptr } ``` This function can only be called from an `unsafe` block or another `unsafe` function. @@ -423,7 +423,7 @@ extern { fn main() { println!("You have readline version {} installed.", - rl_readline_version as int); + rl_readline_version as i32); } ``` diff --git a/src/doc/trpl/more-strings.md b/src/doc/trpl/more-strings.md index c46f84caa86..17a463842e7 100644 --- a/src/doc/trpl/more-strings.md +++ b/src/doc/trpl/more-strings.md @@ -129,7 +129,7 @@ need, and it can make your lifetimes more complex. To write a function that's generic over types of strings, use `&str`. ``` -fn some_string_length(x: &str) -> uint { +fn some_string_length(x: &str) -> usize { x.len() } |
