- 19 1月, 2014 12 次提交
-
-
由 musitdev 提交于
commit d00623d60afd460755b749ad5f94935f756f29d2 Author: musitdev <philippe.delrieu@free.fr> Date: Sat Jan 4 22:31:40 2014 +0100 correct last comments. commit ef09d6b6d1eebbd7c713c9dad96ed7bfc19dd884 Author: musitdev <philippe.delrieu@free.fr> Date: Thu Jan 2 20:28:53 2014 +0100 update with the last remarks. commit 46a028fe1fcdc2a7dcdd78a63001793eff614349 Author: musitdev <philippe.delrieu@free.fr> Date: Thu Jan 2 10:17:18 2014 +0100 wrap example code in main function. commit 2472901929bef09786b7aef8ca7c89fbe67d8e3e Author: musitdev <philippe.delrieu@free.fr> Date: Mon Dec 30 19:32:46 2013 +0100 Correct code to compile. commit ed96b2223176781743e984af0e19abcb82150f1f Author: musitdev <philippe.delrieu@free.fr> Date: Thu Dec 5 11:32:28 2013 +0100 Correct the comment based on the PR comment. Change init call to new to reflect last change. commit 38b0390c3533a16f822a6df5f90b907bd8ed6edc Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 22:34:25 2013 +0100 correct from_utf8_owned call. commit 08bed4c5f4fadf93ec457b605a1a1354323d2f5c Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 22:12:41 2013 +0100 correct code ''' commit 02fddcbe2ab37fe842872691105bc4c5cff5abb5 Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 13:25:54 2013 +0100 correct typing error commit b26830b8ddb49f551699e791832ed20640a0fafc Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 13:18:39 2013 +0100 pass make check commit e87c4f53286122efd0d2364ea45600d4fa4d5744 Author: musitdev <philippe.delrieu@free.fr> Date: Wed Dec 4 10:47:24 2013 +0100 Add Json example and documentation.
-
由 bors 提交于
This is my first patch so feedback appreciated! Bug when initialising `bitv:Bitv::new(int,bool)` when `bool=true`. It created a `Bitv` with underlying representation `!0u` rather than the actual desired bit layout ( e.g. `11111111` instead of `00001111`). This works OK because a size attribute is included which keeps access to legal bounds. However when using `BitvSet::from_bitv(Bitv)`, we then find that `bitvset.contains(i)` can return true when `i` should not in fact be in the set. ``` let bs = BitvSet::from_bitv(Bitv::new(100, true)); assert!(!bs.contains(&127)) //fails ``` The fix is to create the correct representation by treating various cases separately and using a bitshift `(1<<nbits) - 1` to generate correct number of `1`s where necessary.
-
由 bors 提交于
I found the boxes diagram in the tutorial misleading about how the enum worked. The current diagram makes it seem that there is a separate Cons struct when there is only one type of struct for the List type, and Nil is drawn almost as if it's not consuming memory. I'm aware of the optimization that happens for this enum which takes advantage of the fact that pointer cannot be null but this is an implementation detail and not the only one that applies here. I can add a note below the diagram mentioning this if you like.
-
由 bors 提交于
Add `@Spell` clusters to Vim syntax highlighting file to do spell checking only inside comments and strings
-
由 bors 提交于
-
由 bors 提交于
This commit re-works how the monitor() function works and how it both receives and transmits errors. There are a few cases in which the compiler can abort: 1. A normal compiler error. In this case, the compiler raises a FatalError as the failure value of the task. If this happens, then the monitor task does nothing. It ignores all stderr output of the child task and it also suppresses the failure message of the main task itself. This means that on a normal compiler error just the error message itself is printed. 2. A normal internal compiler error. These are invoked from sess.span_bug() and friends. In these cases, they follow the same path (raising a FatalError), but they will also print an ICE message which has a URL to go report a bug. 3. An actual compiler bug. This happens whenever anything calls fail!() instead of going through the session itself. In this case, we print out stuff about RUST_LOG=2 and we by default capture all stderr and print via warn!() so it's only printed out with the RUST_LOG var set.
-
由 bors 提交于
For `use` statements, this means disallowing qualifiers when in functions and disallowing `priv` outside of functions. For `extern mod` statements, this means disallowing everything everywhere. It may have been envisioned for `pub extern mod foo` to be a thing, but it currently doesn't do anything (resolve doesn't pick it up), so better to err on the side of forwards-compatibility and forbid it entirely for now. Closes #9957
-
由 bors 提交于
This must have been fixed in some recent trans refactor/rewrite, hurray! Closes #9259
-
由 Alex Crichton 提交于
This must have been fixed in some recent trans refactor/rewrite, hurray! Closes #9259
-
由 Alex Crichton 提交于
This commit re-works how the monitor() function works and how it both receives and transmits errors. There are a few cases in which the compiler can abort: 1. A normal compiler error. In this case, the compiler raises a FatalError as the failure value of the task. If this happens, then the monitor task does nothing. It ignores all stderr output of the child task and it also suppresses the failure message of the main task itself. This means that on a normal compiler error just the error message itself is printed. 2. A normal internal compiler error. These are invoked from sess.span_bug() and friends. In these cases, they follow the same path (raising a FatalError), but they will also print an ICE message which has a URL to go report a bug. 3. An actual compiler bug. This happens whenever anything calls fail!() instead of going through the session itself. In this case, we print out stuff about RUST_LOG=2 and we by default capture all stderr and print via warn!() so it's only printed out with the RUST_LOG var set.
-
由 Alex Crichton 提交于
For `use` statements, this means disallowing qualifiers when in functions and disallowing `priv` outside of functions. For `extern mod` statements, this means disallowing everything everywhere. It may have been envisioned for `pub extern mod foo` to be a thing, but it currently doesn't do anything (resolve doesn't pick it up), so better to err on the side of forwards-compatibility and forbid it entirely for now. Closes #9957
-
由 bors 提交于
Noticeably necroes #10892. Also closes #11559. r? @alexcrichton
-
- 18 1月, 2014 28 次提交
-
-
由 bors 提交于
-
由 bors 提交于
As part of #10387, this removes the `Primitive::{bits, bytes, is_signed}` methods and removes the trait's operator trait constraints for the reasons outlined below: - The `Primitive::{bits, bytes}` associated functions were originally added to reflect the existing `BITS` and `BYTES`statics included in the numeric modules. These statics are only exist as a workaround for Rust's lack of CTFE, and should be deprecated in the future in favor of using the `std::mem::size_of` function (see #11621). - `Primitive::is_signed` seems to be of little utility and does not seem to be used anywhere in the Rust compiler or libraries. It is also rather ugly to call due to the `Option<Self>` workaround for #8888. - The operator trait constraints are already covered by the `Num` trait.
-
由 Adrien Tétar 提交于
Fixes #11559 (not that the manual couldn't use a review).
-
由 bors 提交于
#[cfg(test)] was being interpreted as starting a header
-
由 bors 提交于
Closes #9582
-
由 bors 提交于
Most Iterators renamed to make their naming more consistent. Most significantly, the Iterator and Iter suffixes have been completely removed.
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
-
由 Palmer Cox 提交于
Rename existing iterators to get rid of the Iterator suffix and to give them names that better describe the things being iterated over.
-
由 bors 提交于
...arts. This fixes a bug where new syntax crate IDs would cause rustpkg to fail to build crates.
-
由 bors 提交于
The patch adds the missing pow method for all the implementations of the Integer trait. This is a small addition that will most likely be improved by the work happening in #10387. Fixes #11499
-
由 Brian Anderson 提交于
-
由 bors 提交于
This stores the stack of iterators inline (we have a maximum depth with `uint` keys), and then uses direct pointer offsetting to manipulate it, in a blazing fast way: Before: bench_iter_large ... bench: 43187 ns/iter (+/- 3082) bench_iter_small ... bench: 618 ns/iter (+/- 288) After: bench_iter_large ... bench: 13497 ns/iter (+/- 1575) bench_iter_small ... bench: 220 ns/iter (+/- 91) Also, removes `.each_{key,value}_reverse` as an offering to placate the gods of external iterators for my heinous sin of attempting to add new internal ones (in a previous version of this PR).
-
由 bors 提交于
The new macro loading infrastructure needs the ability to force a procedural-macro crate to be built with the host architecture rather than the target architecture (because the compiler is just about to dlopen it).
-
由 Huon Wilson 提交于
This stores the stack of iterators inline (we have a maximum depth with `uint` keys), and then uses direct pointer offsetting to manipulate it, in a blazing fast way: Before: bench_iter_large ... bench: 43187 ns/iter (+/- 3082) bench_iter_small ... bench: 618 ns/iter (+/- 288) After: bench_iter_large ... bench: 13497 ns/iter (+/- 1575) bench_iter_small ... bench: 220 ns/iter (+/- 91)
-
由 Huon Wilson 提交于
This are *trivial* to reimplement in terms of each_reverse if that extra little bit of performance is needed.
-
由 Brendan Zabarauskas 提交于
-
由 Brendan Zabarauskas 提交于
This removes the `Primitive::{bits, bytes, is_signed}` methods and removes the operator trait constraints, for the reasons outlined below: - The `Primitive::{bits, bytes}` associated functions were originally added to reflect the existing `BITS` and `BYTES` statics included in the numeric modules. These statics are only exist as a workaround for Rust's lack of CTFE, and should probably be deprecated in the future in favor of using the `std::mem::size_of` function (see #11621). - `Primitive::is_signed` seems to be of little utility and does not seem to be used anywhere in the Rust compiler or libraries. It is also rather ugly to call due to the `Option<Self>` workaround for #8888. - The operator trait constraints are already covered by the `Num` trait.
-
由 Jack Moffitt 提交于
-
由 Jack Moffitt 提交于
-
由 Jack Moffitt 提交于
This fixes a bug where new syntax crate IDs would cause rustpkg to fail to build crates.
-
由 bors 提交于
Apparently this isn't necessary, and it's just causing problems. Closes #11162
-
由 bors 提交于
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered) cc #11119
-
由 Alex Crichton 提交于
The new macro loading infrastructure needs the ability to force a procedural-macro crate to be built with the host architecture rather than the target architecture (because the compiler is just about to dlopen it).
-
由 Adrien Tétar 提交于
-
由 Edward Z. Yang 提交于
Signed-off-by: NEdward Z. Yang <ezyang@cs.stanford.edu>
-
由 Adrien Tétar 提交于
This fixes a regression introduced in 3d57b240.
-
由 Petter Remen 提交于
Added back-quotes around #[cfg(test)] which was otherwise being interpreted as starting a header
-