Commit Graph

24380 Commits

Author SHA1 Message Date
bors
ac4dd9efee auto merge of #10593 : metajack/rust/pkgid-hash, r=brson
This replaces the link meta attributes with a pkgid attribute and uses a hash
of this as the crate hash. This makes the crate hash computable by things
other than the Rust compiler. It also switches the hash function ot SHA1 since
that is much more likely to be available in shell, Python, etc than SipHash.

Fixes #10188, #8523.
2013-12-10 16:51:20 -08:00
Jack Moffitt
a16753c188 Add missing sundown dependency to rustdoc tests. 2013-12-10 17:04:24 -07:00
Jack Moffitt
b349036e5f Make crate hash stable and externally computable.
This replaces the link meta attributes with a pkgid attribute and uses a hash
of this as the crate hash. This makes the crate hash computable by things
other than the Rust compiler. It also switches the hash function ot SHA1 since
that is much more likely to be available in shell, Python, etc than SipHash.

Fixes #10188, #8523.
2013-12-10 17:04:24 -07:00
Patrick Walton
6113508055 libstd: Remove two uses of Cell. 2013-12-10 15:13:13 -08:00
Patrick Walton
89e1db3d6c libstd: Change atomically to use RAII. 2013-12-10 15:13:13 -08:00
Patrick Walton
6bd80f7450 librustuv: Change with_local_io to use RAII. 2013-12-10 15:13:12 -08:00
Patrick Walton
8c2ebe1622 libextra: Remove various cells involved in Arcs.
I could have done this by making `Arc` use RAII, but this is too
involved for now.
2013-12-10 15:13:12 -08:00
Patrick Walton
9a6ebbbecc librustdoc: Remove a couple of Cells. 2013-12-10 15:13:12 -08:00
Patrick Walton
ebe8ac88a7 librustdoc: Don't use finally, shaving off a Cell. 2013-12-10 15:13:12 -08:00
Patrick Walton
fdd6750570 compiletest: Remove uses of Cell. 2013-12-10 15:13:12 -08:00
Patrick Walton
f08f3a7576 libstd: Remove Cells that were used because of finally by converting
their `finally` blocks to RAII.
2013-12-10 15:13:12 -08:00
Patrick Walton
ec5603bf13 librustpkg: Make io::ignore_io_error() use RAII; remove a few more
cells.
2013-12-10 15:13:12 -08:00
Patrick Walton
ab3bec91d7 libstd: Remove some cells involved in
`deschedule_running_task_and_then`.
2013-12-10 15:13:12 -08:00
Patrick Walton
7cac9fe763 librustuv: RAII-ify Local::borrow, and remove some 12 Cells. 2013-12-10 15:13:12 -08:00
Patrick Walton
786dea207d libextra: Another round of de-Cell-ing.
34 uses of `Cell` remain.
2013-12-10 15:13:12 -08:00
Chris Morgan
267ac45f41 Deduplicate in syntax::parse::token with a macro.
I also renumbered things at the same time; ``in`` was shifted into its
alphabetical position and the reserved keywords were reordered (a couple
of them were out of order).
2013-12-11 09:52:05 +11:00
Steven Fackler
8240faf73a Allow ref and mut modifiers for short form field patterns
Previously, if you wanted to bind a field mutably or by ref, you had to
do something like Foo { x: ref mut x }. You can now just do
Foo { ref mut x }.

Closes #6137
2013-12-10 14:05:57 -08:00
bors
5aad292fb9 auto merge of #10880 : cmr/rust/tut++, r=pnkfelix
Many of them are small. Will squash on request, but I feel like it's easier
for everyone (easier to see and back out individual changes) this way.
2013-12-10 12:51:22 -08:00
Niko Matsakis
76d9a9671b Fix test case harder (cc #9629) 2013-12-10 13:14:45 -05:00
Seo Sanghyeon
55d2d8eec9 Remove -Z coherence 2013-12-11 02:56:06 +09:00
bors
4ab6a0856f auto merge of #10886 : alexcrichton/rust/snapshots, r=huonw
Makes the `dead_code` lint a citizen of stage0 to silence the "unknown lint"
warnings.
2013-12-10 07:41:37 -08:00
Corey Richardson
c935a88a97 Remove duplication of libstd docs.
This is literally a copy-paste, there's no need to have this duplication.
2013-12-10 09:46:40 -05:00
Corey Richardson
c8f47db8f5 Update Freeze information 2013-12-10 09:43:36 -05:00
Corey Richardson
fab5624eb6 Tiny fixes to linked list section. 2013-12-10 09:43:36 -05:00
Corey Richardson
a44852a2d5 Update Owned to Send, show some types which aren't 2013-12-10 09:43:36 -05:00
Corey Richardson
888144c98d Function declaration takes pats, not exprs. 2013-12-10 09:43:36 -05:00
Corey Richardson
b5122c52ae Clarify newtype 2013-12-10 09:43:36 -05:00
Corey Richardson
d9eff8de8a Clarify arity 2013-12-10 09:43:36 -05:00
Corey Richardson
2750adb5d8 Inherited mutabilty clarification
Also no longer reference mutable fields
2013-12-10 09:43:36 -05:00
Corey Richardson
381c08bf69 loop -> continue 2013-12-10 09:43:36 -05:00
Corey Richardson
f006a10b1e Wildcard changes. 2013-12-10 09:43:35 -05:00
Corey Richardson
079ea00d23 Macro definition is feature gated. 2013-12-10 09:43:35 -05:00
Corey Richardson
eb8739f4f8 Fix tiny formatting error. 2013-12-10 09:43:35 -05:00
Corey Richardson
0f82cbd19a Clarify as, mention transmute. 2013-12-10 09:43:35 -05:00
Corey Richardson
d00a407e00 Clarify that strings aren't magical. 2013-12-10 09:43:35 -05:00
Corey Richardson
b6cf5f5af1 Fix tiny formatting error. 2013-12-10 09:43:35 -05:00
Corey Richardson
94e0a03f5d Add rustdoc documentation. 2013-12-10 09:43:33 -05:00
bors
487e58cca2 auto merge of #10882 : jhasse/rust/patch-1, r=metajack
typo
2013-12-10 05:26:35 -08:00
Corey Richardson
039a5933fb Fix grammar error. 2013-12-10 07:28:24 -05:00
Corey Richardson
d86f8b2fca Add a link to the wiki's package list and refer to git 2013-12-10 07:28:24 -05:00
Corey Richardson
8ae340a026 Note that Rust can be embedded. 2013-12-10 07:28:24 -05:00
Corey Richardson
61e8268645 Fix span. 2013-12-10 07:28:24 -05:00
Corey Richardson
8a8cccd4b6 Explain potentially confusing string example.
Reported be @ElBaha
2013-12-10 07:28:24 -05:00
bors
0d9c0c9771 auto merge of #10822 : ezyang/rust/master, r=huonw
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-10 03:16:37 -08:00
bors
3c399f613d auto merge of #10862 : alexcrichton/rust/issue-10857, r=huonw
This bug showed up because the visitor only visited the path of the implemented
trait via walk_path (with no corresponding visit_path function). I have modified
the visitor to use visit_path (which is now overridable), and the privacy
visitor overrides this function and now properly checks for the privacy of all
paths.

Closes #10857
2013-12-10 00:41:36 -08:00
Alex Crichton
9522a08cf0 Check the privacy of implemented traits
This bug showed up because the visitor only visited the path of the implemented
trait via walk_path (with no corresponding visit_path function). I have modified
the visitor to use visit_path (which is now overridable), and the privacy
visitor overrides this function and now properly checks for the privacy of all
paths.

Closes #10857
2013-12-09 22:53:58 -08:00
Edward Z. Yang
b3e54d5991 Add some more commentary to FFI tutorial.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-09 21:24:47 -08:00
bors
ad292ac8fd auto merge of #10873 : pradeep90/rust/rust-mode-changes, r=pcwalton
Specifically, we can now use:
+ beginning-of-defun
+ end-of-defun
+ mark-defun

where "defun" means a Rust item.

+ Add tests in rust-mode-tests.el
+ Fix indentation in rust-mode-tests.el
+ Add support for trait to Imenu
2013-12-09 20:36:29 -08:00
Chris Morgan
f39c883598 Vim keyword highlighting improvements.
- Removed the `log` keyword;
- Removed keyword duplicates;
- Highlighted `const` as `Error` rather than `StorageClass`; and
- Highlighted all the reserved keywords as `Error` rather than as
  `Keyword`.

(As usual, these highlightings can be overridden if desired.)
2013-12-10 14:28:27 +11:00
Chris Morgan
3a4d7ff2b9 Fix up float highlighting in Vim.
This fixes a regression introduced in #10793.

Having a colorscheme which highlights Float the same as Number (I
believe most do), I hadn't noticed that having the special case of "5."
floats (which was one of the added features in #10793) last made it take
precedence, and so it was left to @thestinger to notice it.

The regression meant that in `5.0`, the `5.` was a `rustFloat` (linked
by default to `Float`) and the `0` was a `rustDecNumber` (linked by
default to `Number`), and for `5.0f32` the `5.` was a `rustFloat` and
the `0f32` was a second `rustFloat` (and thus appeared correctly, though
for the wrong reason).
2013-12-10 14:17:26 +11:00