Skip to content

Commit 8f03078

Browse files
committed
---
yaml --- r: 273773 b: refs/heads/beta c: 6cc449a h: refs/heads/master i: 273771: f5b7f5d
1 parent 09f0dc2 commit 8f03078

File tree

40 files changed

+56
-141
lines changed

40 files changed

+56
-141
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: bfacabc6a2b59771aa336ff420c363d9695a6ad2
26+
refs/heads/beta: 6cc449ad241c1cc54f5a789affffed2642422cec
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/COMPILER_TESTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_foo() {
7777
}
7878
```
7979

80-
Note that not all headers have meaning when customized to a revision.
80+
Note that not all headers have meaning when customized too a revision.
8181
For example, the `ignore-test` header (and all "ignore" headers)
8282
currently only apply to the test as a whole, not to particular
8383
revisions. The only headers that are intended to really work when

branches/beta/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ DEPS_test := std getopts term native:rust_test_helpers
9292
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9393
DEPS_syntax_ext := syntax fmt_macros
9494

95-
DEPS_rustc_const_eval := std syntax
95+
DEPS_rustc_const_math := std syntax log serialize
9696

9797
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
9898
log graphviz rustc_back rustc_data_structures\

branches/beta/src/doc/book/no-stdlib.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {
3838
// for a bare-bones hello world. These are normally
3939
// provided by libstd.
4040
#[lang = "eh_personality"] extern fn eh_personality() {}
41-
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! { loop {} }
41+
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
4242
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
4343
# #[no_mangle] pub extern fn rust_eh_register_frames () {}
4444
# #[no_mangle] pub extern fn rust_eh_unregister_frames () {}
@@ -65,7 +65,7 @@ pub extern fn main(argc: i32, argv: *const *const u8) -> i32 {
6565
}
6666

6767
#[lang = "eh_personality"] extern fn eh_personality() {}
68-
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! { loop {} }
68+
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
6969
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
7070
# #[no_mangle] pub extern fn rust_eh_register_frames () {}
7171
# #[no_mangle] pub extern fn rust_eh_unregister_frames () {}

branches/beta/src/doc/book/vectors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ You can iterate the vector multiple times by taking a reference to the vector wh
120120
For example, the following code does not compile.
121121

122122
```rust,ignore
123-
let v = vec![1, 2, 3, 4, 5];
123+
let mut v = vec![1, 2, 3, 4, 5];
124124
125125
for i in v {
126126
println!("Take ownership of the vector and its element {}", i);
@@ -134,7 +134,7 @@ for i in v {
134134
Whereas the following works perfectly,
135135

136136
```rust
137-
let v = vec![1, 2, 3, 4, 5];
137+
let mut v = vec![1, 2, 3, 4, 5];
138138

139139
for i in &v {
140140
println!("This is a reference to {}", i);

branches/beta/src/libcollections/binary_heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ use vec::{self, Vec};
173173
/// ```
174174
/// use std::collections::BinaryHeap;
175175
///
176-
/// // Type inference lets us omit an explicit type signature (which
176+
/// // type inference lets us omit an explicit type signature (which
177177
/// // would be `BinaryHeap<i32>` in this example).
178178
/// let mut heap = BinaryHeap::new();
179179
///
@@ -194,7 +194,7 @@ use vec::{self, Vec};
194194
///
195195
/// // We can iterate over the items in the heap, although they are returned in
196196
/// // a random order.
197-
/// for x in &heap {
197+
/// for x in heap.iter() {
198198
/// println!("{}", x);
199199
/// }
200200
///

branches/beta/src/libcore/convert.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
//!
2020
//! - Impl the `As*` traits for reference-to-reference conversions
2121
//! - Impl the `Into` trait when you want to consume the value in the conversion
22-
//! - The `From` trait is the most flexible, useful for value _and_ reference conversions
22+
//! - The `From` trait is the most flexible, useful for values _and_ references conversions
2323
//!
24-
//! As a library author, you should prefer implementing `From<T>` rather than
25-
//! `Into<U>`, as `From` provides greater flexibility and offers an equivalent `Into`
24+
//! As a library writer, you should prefer implementing `From<T>` rather than
25+
//! `Into<U>`, as `From` provides greater flexibility and offer the equivalent `Into`
2626
//! implementation for free, thanks to a blanket implementation in the standard library.
2727
//!
2828
//! **Note: these traits must not fail**. If the conversion can fail, you must use a dedicated
29-
//! method which returns an `Option<T>` or a `Result<T, E>`.
29+
//! method which return an `Option<T>` or a `Result<T, E>`.
3030
//!
3131
//! # Generic impl
3232
//!
@@ -49,7 +49,7 @@ use marker::Sized;
4949
/// [book]: ../../book/borrow-and-asref.html
5050
///
5151
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
52-
/// returns an `Option<T>` or a `Result<T, E>`.
52+
/// return an `Option<T>` or a `Result<T, E>`.
5353
///
5454
/// # Examples
5555
///
@@ -82,7 +82,7 @@ pub trait AsRef<T: ?Sized> {
8282
/// A cheap, mutable reference-to-mutable reference conversion.
8383
///
8484
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
85-
/// returns an `Option<T>` or a `Result<T, E>`.
85+
/// return an `Option<T>` or a `Result<T, E>`.
8686
///
8787
/// # Generic Impls
8888
///
@@ -99,10 +99,10 @@ pub trait AsMut<T: ?Sized> {
9999
/// A conversion that consumes `self`, which may or may not be expensive.
100100
///
101101
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
102-
/// returns an `Option<T>` or a `Result<T, E>`.
102+
/// return an `Option<T>` or a `Result<T, E>`.
103103
///
104-
/// Library authors should not directly implement this trait, but should prefer implementing
105-
/// the `From` trait, which offers greater flexibility and provides an equivalent `Into`
104+
/// Library writer should not implement directly this trait, but should prefer the implementation
105+
/// of the `From` trait, which offer greater flexibility and provide the equivalent `Into`
106106
/// implementation for free, thanks to a blanket implementation in the standard library.
107107
///
108108
/// # Examples
@@ -134,7 +134,7 @@ pub trait Into<T>: Sized {
134134
/// Construct `Self` via a conversion.
135135
///
136136
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
137-
/// returns an `Option<T>` or a `Result<T, E>`.
137+
/// return an `Option<T>` or a `Result<T, E>`.
138138
///
139139
/// # Examples
140140
///

branches/beta/src/libcore/ptr.rs

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,6 @@ pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
212212
#[lang = "const_ptr"]
213213
impl<T: ?Sized> *const T {
214214
/// Returns true if the pointer is null.
215-
///
216-
/// # Examples
217-
///
218-
/// Basic usage:
219-
///
220-
/// ```
221-
/// let s: &str = "Follow the rabbit";
222-
/// let ptr: *const u8 = s.as_ptr();
223-
/// assert!(ptr.is_null() == false);
224-
/// ```
225215
#[stable(feature = "rust1", since = "1.0.0")]
226216
#[inline]
227217
pub fn is_null(self) -> bool where T: Sized {
@@ -237,20 +227,6 @@ impl<T: ?Sized> *const T {
237227
/// null-safety, it is important to note that this is still an unsafe
238228
/// operation because the returned value could be pointing to invalid
239229
/// memory.
240-
///
241-
/// # Examples
242-
///
243-
/// Basic usage:
244-
///
245-
/// ```ignore
246-
/// let val: *const u8 = &10u8 as *const u8;
247-
///
248-
/// unsafe {
249-
/// if let Some(val_back) = val.as_ref() {
250-
/// println!("We got back the value: {}!", val_back);
251-
/// }
252-
/// }
253-
/// ```
254230
#[unstable(feature = "ptr_as_ref",
255231
reason = "Option is not clearly the right return type, and we \
256232
may want to tie the return lifetime to a borrow of \
@@ -274,20 +250,6 @@ impl<T: ?Sized> *const T {
274250
/// byte past the end of an allocated object. If either pointer is out of
275251
/// bounds or arithmetic overflow occurs then
276252
/// any further use of the returned value will result in undefined behavior.
277-
///
278-
/// # Examples
279-
///
280-
/// Basic usage:
281-
///
282-
/// ```
283-
/// let s: &str = "123";
284-
/// let ptr: *const u8 = s.as_ptr();
285-
///
286-
/// unsafe {
287-
/// println!("{}", *ptr.offset(1) as char);
288-
/// println!("{}", *ptr.offset(2) as char);
289-
/// }
290-
/// ```
291253
#[stable(feature = "rust1", since = "1.0.0")]
292254
#[inline]
293255
pub unsafe fn offset(self, count: isize) -> *const T where T: Sized {
@@ -298,16 +260,6 @@ impl<T: ?Sized> *const T {
298260
#[lang = "mut_ptr"]
299261
impl<T: ?Sized> *mut T {
300262
/// Returns true if the pointer is null.
301-
///
302-
/// # Examples
303-
///
304-
/// Basic usage:
305-
///
306-
/// ```
307-
/// let mut s = [1, 2, 3];
308-
/// let ptr: *mut u32 = s.as_mut_ptr();
309-
/// assert!(ptr.is_null() == false);
310-
/// ```
311263
#[stable(feature = "rust1", since = "1.0.0")]
312264
#[inline]
313265
pub fn is_null(self) -> bool where T: Sized {
@@ -323,20 +275,6 @@ impl<T: ?Sized> *mut T {
323275
/// null-safety, it is important to note that this is still an unsafe
324276
/// operation because the returned value could be pointing to invalid
325277
/// memory.
326-
///
327-
/// # Examples
328-
///
329-
/// Basic usage:
330-
///
331-
/// ```ignore
332-
/// let val: *mut u8 = &mut 10u8 as *mut u8;
333-
///
334-
/// unsafe {
335-
/// if let Some(val_back) = val.as_ref() {
336-
/// println!("We got back the value: {}!", val_back);
337-
/// }
338-
/// }
339-
/// ```
340278
#[unstable(feature = "ptr_as_ref",
341279
reason = "Option is not clearly the right return type, and we \
342280
may want to tie the return lifetime to a borrow of \
@@ -359,20 +297,6 @@ impl<T: ?Sized> *mut T {
359297
/// The offset must be in-bounds of the object, or one-byte-past-the-end.
360298
/// Otherwise `offset` invokes Undefined Behavior, regardless of whether
361299
/// the pointer is used.
362-
///
363-
/// # Examples
364-
///
365-
/// Basic usage:
366-
///
367-
/// ```
368-
/// let mut s = [1, 2, 3];
369-
/// let ptr: *mut u32 = s.as_mut_ptr();
370-
///
371-
/// unsafe {
372-
/// println!("{}", *ptr.offset(1));
373-
/// println!("{}", *ptr.offset(2));
374-
/// }
375-
/// ```
376300
#[stable(feature = "rust1", since = "1.0.0")]
377301
#[inline]
378302
pub unsafe fn offset(self, count: isize) -> *mut T where T: Sized {
@@ -386,15 +310,6 @@ impl<T: ?Sized> *mut T {
386310
///
387311
/// As with `as_ref`, this is unsafe because it cannot verify the validity
388312
/// of the returned pointer.
389-
///
390-
/// # Examples
391-
///
392-
/// Basic usage:
393-
///
394-
/// ```
395-
/// let mut s = [1, 2, 3];
396-
/// let ptr: *mut u32 = s.as_mut_ptr();
397-
/// ```
398313
#[unstable(feature = "ptr_as_ref",
399314
reason = "return value does not necessarily convey all possible \
400315
information",

branches/beta/src/librustc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ log = { path = "../liblog" }
1818
rbml = { path = "../librbml" }
1919
rustc_back = { path = "../librustc_back" }
2020
rustc_bitflags = { path = "../librustc_bitflags" }
21-
rustc_const_eval = { path = "../librustc_const_eval" }
21+
rustc_const_math = { path = "../librustc_const_math" }
2222
rustc_data_structures = { path = "../librustc_data_structures" }
2323
rustc_front = { path = "../librustc_front" }
2424
serialize = { path = "../libserialize" }

branches/beta/src/librustc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extern crate rustc_front;
5555
extern crate rustc_data_structures;
5656
extern crate serialize;
5757
extern crate collections;
58-
extern crate rustc_const_eval;
58+
extern crate rustc_const_math;
5959
#[macro_use] extern crate log;
6060
#[macro_use] extern crate syntax;
6161
#[macro_use] #[no_link] extern crate rustc_bitflags;

branches/beta/src/librustc/middle/const_eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use std::hash;
4646
use std::mem::transmute;
4747
use std::rc::Rc;
4848

49-
use rustc_const_eval::*;
49+
use rustc_const_math::*;
5050

5151
macro_rules! math {
5252
($e:expr, $op:expr) => {

branches/beta/src/librustc/mir/repr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use graphviz::IntoCow;
1212
use middle::const_eval::ConstVal;
13-
use rustc_const_eval::{ConstUsize, ConstInt};
13+
use rustc_const_math::{ConstUsize, ConstInt};
1414
use middle::def_id::DefId;
1515
use ty::subst::Substs;
1616
use ty::{self, AdtDef, ClosureSubsts, FnOutput, Region, Ty};

branches/beta/src/librustc/mir/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use middle::def_id::DefId;
1313
use ty::subst::Substs;
1414
use ty::{ClosureSubsts, FnOutput, Region, Ty};
1515
use mir::repr::*;
16-
use rustc_const_eval::ConstUsize;
16+
use rustc_const_math::ConstUsize;
1717
use rustc_data_structures::tuple_slice::TupleSlice;
1818
use syntax::codemap::Span;
1919

branches/beta/src/librustc/ty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use syntax::attr::{self, AttrMetaMethods};
5050
use syntax::codemap::{DUMMY_SP, Span};
5151
use syntax::parse::token::InternedString;
5252

53-
use rustc_const_eval::ConstInt;
53+
use rustc_const_math::ConstInt;
5454

5555
use rustc_front::hir;
5656
use rustc_front::hir::{ItemImpl, ItemTrait, PatKind};

branches/beta/src/librustc/ty/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use ty::{self, Ty, TyCtxt, TypeAndMut, TypeFlags, TypeFoldable};
2222
use ty::{Disr, ParameterEnvironment};
2323
use ty::TypeVariants::*;
2424

25-
use rustc_const_eval::{ConstInt, ConstIsize, ConstUsize};
25+
use rustc_const_math::{ConstInt, ConstIsize, ConstUsize};
2626

2727
use std::cmp;
2828
use std::hash::{Hash, SipHasher, Hasher};

branches/beta/src/librustc_const_eval/Cargo.toml renamed to branches/beta/src/librustc_const_math/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
authors = ["The Rust Project Developers"]
3-
name = "rustc_const_eval"
3+
name = "rustc_const_math"
44
version = "0.0.0"
55

66
[lib]
7-
name = "rustc_const_eval"
7+
name = "rustc_const_math"
88
path = "lib.rs"
99
crate-type = ["dylib"]
1010

branches/beta/src/librustc_const_eval/lib.rs renamed to branches/beta/src/librustc_const_math/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! This API is completely unstable and subject to change.
1616
17-
#![crate_name = "rustc_const_eval"]
17+
#![crate_name = "rustc_const_math"]
1818
#![unstable(feature = "rustc_private", issue = "27812")]
1919
#![crate_type = "dylib"]
2020
#![crate_type = "rlib"]

branches/beta/src/librustc_metadata/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ rbml = { path = "../librbml" }
1515
rustc = { path = "../librustc" }
1616
rustc_back = { path = "../librustc_back" }
1717
rustc_bitflags = { path = "../librustc_bitflags" }
18-
rustc_const_eval = { path = "../librustc_const_eval" }
18+
rustc_const_math = { path = "../librustc_const_math" }
1919
rustc_front = { path = "../librustc_front" }
2020
rustc_llvm = { path = "../librustc_llvm" }
2121
serialize = { path = "../libserialize" }

branches/beta/src/librustc_metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use rustc::ty::subst;
3636
use rustc::ty::{ImplContainer, TraitContainer};
3737
use rustc::ty::{self, Ty, TyCtxt, TypeFoldable, VariantKind};
3838

39-
use rustc_const_eval::ConstInt;
39+
use rustc_const_math::ConstInt;
4040

4141
use rustc::mir;
4242
use rustc::mir::visit::MutVisitor;

branches/beta/src/librustc_metadata/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern crate rustc;
3737
extern crate rustc_back;
3838
extern crate rustc_front;
3939
extern crate rustc_llvm;
40-
extern crate rustc_const_eval;
40+
extern crate rustc_const_math;
4141

4242
pub use rustc::middle;
4343

branches/beta/src/librustc_mir/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ graphviz = { path = "../libgraphviz" }
1313
log = { path = "../liblog" }
1414
rustc = { path = "../librustc" }
1515
rustc_back = { path = "../librustc_back" }
16-
rustc_const_eval = { path = "../librustc_const_eval" }
16+
rustc_const_math = { path = "../librustc_const_math" }
1717
rustc_data_structures = { path = "../librustc_data_structures" }
1818
rustc_front = { path = "../librustc_front" }
1919
syntax = { path = "../libsyntax" }

0 commit comments

Comments
 (0)