- 27 6月, 2014 4 次提交
-
-
由 Steve Klabnik 提交于
@chris-morgan and @huonw pointed out that even though the feature is a proper noun, we're using it in a more generic sense here.
-
由 Steve Klabnik 提交于
-
由 Steve Klabnik 提交于
-
由 bors 提交于
-
- 26 6月, 2014 25 次提交
-
-
由 bors 提交于
The JSON spec requires that these special values be serialized as "null"; the current serialization breaks any conformant JSON parser. So encoding needs to output "null", `to_json` on floating-point types can return `Null` as well as `Number` values, and reading a `Null` value when specifically expecting a number should be interpreted as NaN. There's no way to round-trip Infinity through JSON. This is my first attempt at both writing Rust and opening pull requests, so please dial your derp detector up to eleven when reviewing. A `rustc --test lib.rs` in `libserialize` passes all tests; a `make check` of the whole tree fails with the error below, but it doesn't look obviously related and the docs say that `make check` is known to be flaky on Windows. ---- [compile-fail] compile-fail/svh-change-significant-cfg.rs stdout ---- task '[compile-fail] compile-fail/svh-change-significant-cfg.rs' failed at 'called `Result:: unwrap()` on an `Err` value: couldn't create file (end of file (unknown error); path=i686-pc-mingw32 \test\compile-fail\svh-a-base.err; mode=truncate; access=write)', C:\msys\home\Mike\rust\src\libcore \result.rs:545 Incidentally, it may just be my lack of familiarity with the language and its idioms, but the duplication between `Encoder`/`PrettyEncoder` had a distinct code smell to it. The size of the file (~3500 lines) also made it a bit hard to navigate. Has there been any discussion of refactoring and/or breaking it up? I couldn't find anything in Issues except the ancient #9028.
-
由 bors 提交于
This commit removes superfluous to_string calls from various places
-
由 OGINO Masanori 提交于
Signed-off-by: NOGINO Masanori <masanori.ogino@gmail.com>
-
由 bors 提交于
This is built on top of https://github.com/rust-lang/rust/pull/15162 . https://github.com/steveklabnik/rust/commit/cccae83d922f5aade2b7cca96579521cc35ced59 is the only new commit, you may want to look at that rather than the whole diff. Writing our first Rust program together. This is the most crucial step, so I go to a fairly deep level of detail. Future sections will move more quickly.
-
由 Piotr Jawniak 提交于
This commit removes superfluous to_string calls from various places
-
由 bors 提交于
This has my voice *very strongly*. I'm not sure if it's too much. I'd find it okay if I had to tone it back, and I don't want it to be _too strong_, but clinical docs are boring.
-
由 bors 提交于
It turns out that bindings introduced by 'for' loops were not treated hygienically. The fix for this is to make the 'for' expansion more like a macro; rather than expanding sub-pieces and then assembling them, we need to rewrite the for and then call expand again on the whole thing. This PR includes a test and the fix. It also contains a number of other things: - unit tests for other forms of hygiene (currently ignored) - a fix for the isaac.rs macro that (it turned out) was relying on capturing - other miscellaneous cleanup and comments
-
由 John Clements 提交于
-
由 mrec 提交于
The JSON spec requires that these special values be serialized as null; the current serialization breaks any conformant JSON parser. So encoding needs to output "null", to_json on floating-point types can return Null as well as Number, and reading null when specifically expecting a number should be interpreted as NaN. There's no way to round-trip Infinity.
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
Fixes #15167
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 Steve Klabnik 提交于
-
由 bors 提交于
This will break code like: fn f(x: &mut int) {} let mut a = box 1i; f(a); Change it to: fn f(x: &mut int) {} let mut a = box 1i; f(&mut *a); RFC 33; issue #10504. [breaking-change] r? @brson
-
由 Steve Klabnik 提交于
Let's write our first Rust program!
-
由 bors 提交于
-
- 25 6月, 2014 11 次提交
-
-
由 bors 提交于
Fixes #11113.
-
由 Steve Klabnik 提交于
-
由 Steve Klabnik 提交于
-
由 Steve Klabnik 提交于
-
由 Steve Klabnik 提交于
Fixes #11113.
-
由 bors 提交于
-
由 Alexei Sholik 提交于
-
由 Alexei Sholik 提交于
-
由 bors 提交于
vector-reference-to-unsafe-pointer-to-element cast if the type to be casted to is not fully specified. This is a conservative change to fix the user-visible symptoms of the issue. A more flexible treatment would delay cast checks to after function typechecking. This can break code that did: let x: *u8 = &([0, 0]) as *_; Change this code to: let x: *u8 = &([0, 0]) as *u8; Closes #14893. [breaking-change] r? @alexcrichton
-
由 Patrick Walton 提交于
vector-reference-to-unsafe-pointer-to-element cast if the type to be casted to is not fully specified. This is a conservative change to fix the user-visible symptoms of the issue. A more flexible treatment would delay cast checks to after function typechecking. This can break code that did: let x: *u8 = &([0, 0]) as *_; Change this code to: let x: *u8 = &([0, 0]) as *u8; Closes #14893. [breaking-change]
-
由 bors 提交于
auto merge of #15165 : zookoatleastauthoritycom/rust/14148-Optimize-out-exhortations-about-being-careful-2, r=huonw Yes, it is important to be careful, but repeated emphasis about it is probably not helpful — it starts to sound like you came for a tutorial but found a finger-wagging lecture. Even after I removed a few of these comments, there are still several left in the text. That's probably fine! A couple of mentions of how this is dangerous and you ought to be careful may be a good reminder to the reader. After making the edits, I reflowed the paragraphs that I had touched, using emacs's "M-x fill-paragraph", with fill-column equal to 70.
-