- 28 6月, 2014 22 次提交
-
-
由 bors 提交于
This PR includes two big things and a bunch of little ones. 1) It enables hygiene for variables bound by 'match' expressions. 2) It fixes a bug discovered indirectly (#15221), wherein fold traversal failed to visit nonterminal nodes. 3) It fixes a small bug in the macro tutorial. It also adds tests for the first two, and makes a bunch of small comment improvements and cleanup.
-
由 John Clements 提交于
-
由 John Clements 提交于
Closes #15221
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
as written, I don't believe this comment was helpful; I think it's better just to steer the reader toward a general understanding of hygiene.
-
由 John Clements 提交于
-
由 John Clements 提交于
Yes, that word is spelled \'memoization\'
-
由 John Clements 提交于
... and possibly totally pointless. Specifically, fixing these to make their macros hygienic may mean that they no longer test the thing that they were supposed to test.
-
由 John Clements 提交于
-
由 John Clements 提交于
Closes #9384
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 John Clements 提交于
Per @acrichto's suggestion, use the more narrowly focused exclusion.
-
由 John Clements 提交于
-
由 John Clements 提交于
-
由 bors 提交于
This was causing a ton of leaks in macro expansion.
-
由 Luqman Aden 提交于
-
由 bors 提交于
rustc: update the unnecessary parens lint for struct literals. Things like `match X { x: 1 } { ... }` now need to be written with parentheses, so the lint should avoid warning in cases like that.
-
- 27 6月, 2014 18 次提交
-
-
由 bors 提交于
This code used to cause an ICE Closes #11677
-
由 bors 提交于
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.
-
由 bors 提交于
auto merge of #15166 : 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.
-
由 Piotr Jawniak 提交于
This code used to cause an ICE Closes #11677
-
由 Steve Klabnik 提交于
-
由 Huon Wilson 提交于
Things like `match X { x: 1 } { ... }` now need to be written with parentheses, so the lint should avoid warning in cases like that.
-
由 bors 提交于
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.
-
由 Steve Klabnik 提交于
Thanks @huonw
-
由 Steve Klabnik 提交于
Thank you, @stormbrew!
-
由 bors 提交于
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.
-
由 bors 提交于
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. Closes #14036. [breaking-change] r? @alexcrichton
-
由 Patrick Walton 提交于
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]
-
由 OGINO Masanori 提交于
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: NOGINO Masanori <masanori.ogino@gmail.com>
-
由 Steve Klabnik 提交于
@cmr rightfully points out that C macros are worse, and share the same name.
-
由 Steve Klabnik 提交于
Thanks @chris-morgan and @P1start!
❤ -
由 bors 提交于
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.
-
由 Steve Klabnik 提交于
Good call, @chris-morgan and @cmr!
-
由 Steve Klabnik 提交于
Thanks @chris-morgan
-