summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-77/+85
2014-06-27auto merge of #15213 : Sawyer47/rust/issue-11677, r=huonwbors-0/+24
This code used to cause an ICE Closes #11677
2014-06-27auto merge of #15211 : steveklabnik/rust/guide_skeleton, r=huonwbors-0/+61
This diff will look better once bors takes care of https://github.com/rust-lang/rust/pull/15183 @brson and I talked about it, and, if I commit this skeleton, I can submit PRs for each portion, without doing this silly "builds on previous PRs" stuff, and it shouldn't cause conflicts. This lays out what I think the guide should cover, and in what order. I haven't picked a cohesive project yet that shows all this off, but I think this progression of concepts is appropriate.
2014-06-27auto merge of #15166 : ↵bors-5/+6
zookoatleastauthoritycom/rust/13570-add-see-below-to-a-reference-to-a-new-concept-2, r=huonw This is the same patch as submitted to https://github.com/rust-lang/rust/issues/13570 and https://github.com/rust-lang/rust/pull/14124, but with @pnkfelix's comment (https://github.com/rust-lang/rust/pull/14124#issuecomment-42797536) addressed, and with reflow as a separate commit. I'm submitting it in case @steveklabnik hasn't yet merged a rewrite of the tutorial (https://github.com/rust-lang/rust/issues/13570#issuecomment-46864789), in which case this patch might as well be merged into the old tutorial.
2014-06-27Add test for #11677Piotr Jawniak-0/+24
This code used to cause an ICE Closes #11677
2014-06-27Skeleton outline of the guide.Steve Klabnik-0/+61
2014-06-27auto merge of #15183 : steveklabnik/rust/hello_cargo, r=huonwbors-20/+144
Built on top of https://github.com/rust-lang/rust/pull/15181. https://github.com/steveklabnik/rust/commit/e52719291183d7b4f691a1997c69fd75b8101b07 is the only new commit, you may want to review that separately. I'm not sure if the car analogy is too glib.
2014-06-26Add one more ignore.Steve Klabnik-1/+1
Thanks @huonw
2014-06-26Fix windows run instructionsSteve Klabnik-1/+1
Thank you, @stormbrew!
2014-06-27auto merge of #15206 : omasanori/rust/use-reexported, r=alexcrichtonbors-10/+10
We use re-exported pathes (e.g. std::io::Command) and original ones (e.g. std::io::process::Command) together in examples now. Using re-exported ones consistently avoids confusion.
2014-06-26librustc: Ensure that proc upvars have static lifetime.Patrick Walton-2/+38
Since procs do not have lifetime bounds, we must do this to maintain safety. This can break code that incorrectly captured references in procedure types. Change such code to not do this, perhaps with a trait object instead. A better solution would be to add higher-rank lifetime support to procs. However, this would be a lot of work for a feature we want to remove in favor of unboxed closures. The corresponding "real fix" is #15067. Closes #14036. [breaking-change]
2014-06-27std::io: Use re-exported pathes in examples.OGINO Masanori-10/+10
We use re-exported pathes (e.g. std::io::Command) and original ones (e.g. std::io::process::Command) together in examples now. Using re-exported ones consistently avoids confusion. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-06-26C macros, not C++ templates.Steve Klabnik-2/+2
@cmr rightfully points out that C macros are worse, and share the same name.
2014-06-26Fix missing word and some grammarSteve Klabnik-2/+2
Thanks @chris-morgan and @P1start! :heart:
2014-06-26auto merge of #14886 : alexcrichton/rust/rt-improvements, r=brsonbors-118/+337
Most of the comments are available on the Task structure itself, but this commit is aimed at making FFI-style usage of Rust tasks a little nicer. Primarily, this commit enables re-use of tasks across multiple invocations. The method `run` will no longer unconditionally destroy the task itself. Rather, the task will be internally re-usable if the closure specified did not fail. Once a task has failed once it is considered poisoned and it can never be used again. Along the way I tried to document shortcomings of the current method of tearing down a task, opening a few issues as well. For now none of the behavior is a showstopper, but it's useful to acknowledge it. Also along the way I attempted to remove as much `unsafe` code as possible, opting for safer abstractions.
2014-06-26Note that macros != templatesSteve Klabnik-1/+4
Good call, @chris-morgan and @cmr!
2014-06-26Clarify which curly is being referred toSteve Klabnik-2/+2
Thanks @chris-morgan
2014-06-26TIL PATHEXTSteve Klabnik-1/+1
Thanks @chris-morgan :heart:
2014-06-26rustrt: Reorganize task usageAlex Crichton-118/+337
Most of the comments are available on the Task structure itself, but this commit is aimed at making FFI-style usage of Rust tasks a little nicer. Primarily, this commit enables re-use of tasks across multiple invocations. The method `run` will no longer unconditionally destroy the task itself. Rather, the task will be internally re-usable if the closure specified did not fail. Once a task has failed once it is considered poisoned and it can never be used again. Along the way I tried to document shortcomings of the current method of tearing down a task, opening a few issues as well. For now none of the behavior is a showstopper, but it's useful to acknowledge it. Also along the way I attempted to remove as much `unsafe` code as possible, opting for safer abstractions.
2014-06-26Move note about $ upSteve Klabnik-3/+3
Thanks @chris-morgan :heart:
2014-06-26Fixing link to subreddit.Steve Klabnik-4/+4
Thanks @chris-morgan :heart:
2014-06-26StackOverflow -> Stack OverflowSteve Klabnik-1/+1
Thanks @chris-morgan
2014-06-26Fix IRC linkage.Steve Klabnik-2/+3
Death to `here`! Thanks @chris-morgan :heart:
2014-06-26staticly -> staticallySteve Klabnik-5/+5
What's funny about this one is that spellcheck caught it, but for some reason didn't give me the right suggestion, so I assumed that it wasn't in my dictionary. Oh well. Thanks @P1start! :heart:
2014-06-26all/someSteve Klabnik-1/+1
How could I forsake `rustdoc`? :sweat_smile: Thanks @huonw.
2014-06-26tha -> thanSteve Klabnik-4/+4
Thanks @huonw :heart:
2014-06-26Fix capitalization of Issue.Steve Klabnik-1/+1
@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.
2014-06-26Add a note that this requires `git`.Steve Klabnik-1/+8
2014-06-26Guide: Hello, cargoSteve Klabnik-0/+113
2014-06-26auto merge of #15197 : omasanori/rust/doc-fix, r=alexcrichtonbors-1/+1
2014-06-26auto merge of #15192 : mrec/rust/json-nan, r=alexcrichtonbors-6/+51
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.
2014-06-26auto merge of #15194 : Sawyer47/rust/to-string-cleanup, r=alexcrichtonbors-106/+62
This commit removes superfluous to_string calls from various places
2014-06-26Fix a typo and a small syntactic error.OGINO Masanori-1/+1
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-06-26auto merge of #15181 : steveklabnik/rust/hello_world, r=brsonbors-0/+180
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.
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-106/+62
This commit removes superfluous to_string calls from various places
2014-06-26auto merge of #15162 : steveklabnik/rust/install_instructions, r=brsonbors-1/+100
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.
2014-06-26auto merge of #15184 : jbclements/rust/for-loop-hygiene-etc, r=jbclementsbors-110/+249
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
2014-06-25more loops to be ignored by pretty-rpassJohn Clements-0/+8
2014-06-26json: Fix handling of NaN/Infinitymrec-6/+51
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.
2014-06-25work around 15189 in test casesJohn Clements-0/+38
2014-06-25make macros hygienicJohn Clements-62/+65
2014-06-25added compile-fail test for 15167John Clements-0/+21
2014-06-25don't expand subexprs of for loop, just re-expand whole thing.John Clements-5/+6
Fixes #15167
2014-06-25remove misleading and unnecessary underscoresJohn Clements-2/+3
2014-06-25remove unneccessary pubs, shorten namesJohn Clements-9/+9
2014-06-25remove unneeded visit_ty methodsJohn Clements-9/+0
2014-06-25add unit test for match var hygieneJohn Clements-0/+12
2014-06-25enrich and rename crate_idents test caseJohn Clements-6/+12
2014-06-25comments onlyJohn Clements-4/+9
2014-06-25revive old commented-out test cases as ignored test cases for hygieneJohn Clements-6/+59