Commit Graph

29353 Commits

Author SHA1 Message Date
bors
ee97698f85 auto merge of #14567 : cburgdorf/rust/patch-2, r=brson
This rewrites the example to also be more aligned with
the same example given in the main tutorial.
2014-05-31 20:01:45 -07:00
bors
3712551bc4 auto merge of #14566 : cburgdorf/rust/patch-1, r=cmr
Renamed `owned_box` to `on_the_heap` to use a consistent
naming across the tutorial and the life time guide.
Also it makes the example easier to grasp.
2014-05-31 17:51:44 -07:00
Christoph Burgdorf
ade5a9d2fe Fix example in lifetime guide
This rewrites the example to also be more aligned with
the same example given in the main tutorial.
2014-05-31 23:41:50 +02:00
Christoph Burgdorf
b657af8946 Rename variable in tutorial
Renamed `owned_box` to `on_the_heap` to use a consistent
naming across the tutorial and the life time guide.
Also it makes the example easier to grasp.
2014-05-31 23:33:03 +02:00
bors
60b4a97de7 auto merge of #14562 : jakub-/rust/issue-14541, r=alexcrichton
Fixes #14541
2014-05-31 11:21:38 -07:00
bors
b38712071e auto merge of #14565 : fhartwig/rust/master, r=sfackler 2014-05-31 09:36:39 -07:00
Florian Hartwig
096f80e770 Fix broken markup in query_to_str documentation 2014-05-31 17:46:35 +02:00
bors
2f221c766b auto merge of #14563 : dotdash/rust/clone_kill, r=huonw
By dropping the intermediate vector that holds the relevant candidates
including duplicates and directly building the vector that has the
duplicates removed we can eliminate quite a few allocations. This
reduces the times for type checking by 5-10% (measured with libstd,
libsyntax and librustc).
2014-05-31 07:56:39 -07:00
bors
0839e940a5 auto merge of #14557 : zwarich/rust/missing-comment, r=alexcrichton
For some reason, I had this comment in my local tree but not in the
branch I sent with the PR.
2014-05-31 06:16:40 -07:00
Björn Steinbrink
cd844c5fb5 Remove unnecessary allocations / clones during method lookup
By dropping the intermediate vector that holds the relevant candidates
including duplicates and directly building the vector that has the
duplicates removed we can eliminate quite a few allocations. This
reduces the times for type checking by 5-10% (measured with libstd,
libsyntax and librustc).
2014-05-31 14:58:12 +02:00
bors
bcf3464827 auto merge of #14556 : sfackler/rust/kill-workcache, r=alexcrichton
This was only ever used by rustpkg and is very unmaintained.

[breaking-change]
2014-05-31 04:26:40 -07:00
Jakub Wieczorek
80e84e0001 Use RHS's struct def ID for error messages in pattern matching
Fixes #14541
2014-05-31 12:50:14 +02:00
bors
2652ba1505 auto merge of #14555 : tomjakubowski/rust/fix-snappy-link, r=alexcrichton
Google have migrated snappy to GitHub.
2014-05-31 02:46:38 -07:00
bors
faa7ba75a7 auto merge of #14553 : reem/rust/nuke-owned-vectors, r=alexcrichton
I removed all remaining deprecated owned vectors from the docs. All example tests pass.
2014-05-31 01:06:40 -07:00
Steven Fackler
c56c286b10 Remove libworkcache
This was only ever used by rustpkg and is very unmaintained.

[breaking-change]
2014-05-30 23:44:05 -07:00
bors
92c43dba50 auto merge of #14544 : aturon/rust/issue-14352, r=alexcrichton
Adds a platform-specific function, `split_paths` to the `os` module. This
function can be used to parse PATH-like environment variables according to
local platform conventions.

Closes #14352.
2014-05-30 23:01:43 -07:00
Cameron Zwarich
3bc76d27ae Add a comment missing from 5aff0e7
For some reason, I had this comment in my local tree but not in the
branch I sent with the PR.
2014-05-30 22:31:05 -07:00
Jonathan Reem
1959925e51 Remove deprecated owned vector from tutorial. 2014-05-30 21:30:21 -07:00
Jonathan Reem
66ee71a517 Remove deprecated owned vector from rust.md 2014-05-30 21:30:21 -07:00
Jonathan Reem
f740e8dde1 Remove deprecated owned vector from macro guide. 2014-05-30 21:30:20 -07:00
Jonathan Reem
c3825cbb9d Remove deprecated owned vector from intro. 2014-05-30 21:30:20 -07:00
Jonathan Reem
0033a8b269 Remove deprecated owned vector from complement cheatsheet. 2014-05-30 21:30:18 -07:00
Tom Jakubowski
7cd4879126 Fix outgoing link to snappy in the FFI guide
Google have migrated snappy to GitHub.
2014-05-30 21:27:47 -07:00
bors
60a43f9bc5 auto merge of #14534 : alexcrichton/rust/snapshots, r=sfackler
This is part 2 of the saga of renaming the Partial/Total equality and comparison traits.
2014-05-30 21:21:39 -07:00
Aaron Turon
b1fbbf3e48 Add os::split_paths
Adds a platform-specific function, `split_paths` to the `os` module. This
function can be used to parse PATH-like environment variables according to
local platform conventions.

Closes #14352.
2014-05-30 21:10:48 -07:00
Alex Crichton
bb96ee6123 syntax: Prepare for Total{Eq,Ord} => {Eq,Ord}
This commit adds the groundwork for the renaming of the Total{Eq,Ord} traits.
After this commit hits a snapshot, the traits can be renamed.
2014-05-30 16:03:25 -07:00
bors
cc4513202d auto merge of #14547 : reem/rust/remove-owned-vec-docs, r=alexcrichton
The last example in the containers and iterators guide had a superfluous owned vector in it. Everything works fine without it, so I removed it to avoid confusion.
2014-05-30 16:01:35 -07:00
Alex Crichton
748bc3ca49 std: Rename {Eq,Ord} to Partial{Eq,Ord}
This is part of the ongoing renaming of the equality traits. See #12517 for more
details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord}
or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}.

cc #12517

[breaking-change]
2014-05-30 15:52:24 -07:00
Alex Crichton
f4fa7c8a07 Register new snapshots 2014-05-30 15:52:23 -07:00
bors
7e461eaeaa auto merge of #14546 : SimonSapin/rust/patch-13, r=alexcrichton
CC @alexcrichton
Closes #14545
2014-05-30 14:21:37 -07:00
bors
e5e865b804 auto merge of #14536 : zwarich/rust/issue-14498, r=luqmana
Make check_for_assignment_to_restricted_or_frozen_location treat
mutation through an owning pointer the same way it treats mutation
through an &mut pointer, where mutability must be inherited from the
base path.

I also included GC pointers in this check, as that is what the
corresponding code in gather_loans/restrictions.rs does, but I don't
think there is a way to test this with the current language.

Fixes #14498.
2014-05-30 12:41:39 -07:00
Jonathan Reem
3dace35044 Remove deprecated owned vector from iterator example. 2014-05-30 12:18:52 -07:00
Simon Sapin
cf3e8ba6d0 Ignore /build even if it’s a symlink, but only at top-level. 2014-05-30 11:37:31 -07:00
bors
24e489f1e1 auto merge of #14520 : Ryman/rust/SnakeCaseLint, r=alexcrichton
This enforces `snake_case` for functions and methods only. Might be worth extending it to fields and locals too at some point in the future.

A number of breaking changes each detailed in the attached commits.
2014-05-30 11:01:37 -07:00
Kevin Butler
030b3a2499 windows: Allow snake_case errors for now. 2014-05-30 17:59:41 +01:00
Kevin Butler
09fc34066b librustc: Fix snake case errors.
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.

rustc:🔙🔗:WriteOutputFile => write_output_file
rustc::middle::ty::EmptyBuiltinBounds => empty_builtin_bounds
rustc::middle::ty::AllBuiltinBounds => all_builtin_bounds
rustc::middle::liveness::IrMaps => IrMaps::new
rustc::middle::liveness::Liveness => Liveness::new
rustc::middle::resolve::NameBindings => NameBindings::new
rustc::middle::resolve::PrimitiveTypeTable => PrimitiveTypeTable::new
rustc::middle::resolve::Resolver => Resolver::new
rustc::middle::trans::datum::Datum => Datum::new
rustc::middle::trans::datum::DatumBlock => DatumBlock::new
rustc::middle::trans::datum::Rvalue => Rvalue::new
rustc::middle::typeck::infer::new_ValsAndBindings => ::infer::unify::ValsAndBindings::new
rustc::middle::typeck::infer::region_inference::RegionVarBindings => RegionVarBindings::new

[breaking-change]
2014-05-30 17:55:42 +01:00
Kevin Butler
ed5bf6621e lib{serialize, uuid}: Fix snake case errors.
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.

serialize::ebml::reader::Doc => seriaize::ebml::Doc::new
serialize::ebml::reader::Decoder => Decoder::new
serialize::ebml::writer::Encoder => Encoder::new

[breaking-change]
2014-05-30 17:55:41 +01:00
Kevin Butler
3faa6762c1 lib{std,core,debug,rustuv,collections,native,regex}: Fix snake_case errors.
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.

std::reflect::MovePtrAdaptor => MovePtrAdaptor::new
debug::reflect::MovePtrAdaptor => MovePtrAdaptor::new
std::repr::ReprVisitor => ReprVisitor::new
debug::repr::ReprVisitor => ReprVisitor::new
rustuv::homing::HomingIO.go_to_IO_home => go_to_io_home

[breaking-change]
2014-05-30 17:55:41 +01:00
Kevin Butler
190d8bdbc6 libsyntax: Fix snake_case errors.
A number of functions/methods have been moved or renamed to align
better with rust standard conventions.

syntax::ext::mtwt::xorPush => xor_push
syntax::parse::parser::Parser => Parser::new

[breaking-change]
2014-05-30 17:55:41 +01:00
Kevin Butler
16f15ce391 rustc: Add lint for snake_case functions & methods. 2014-05-30 17:55:41 +01:00
bors
36c2c56277 auto merge of #14535 : sfackler/rust/bitv-show, r=alexcrichton
Closes #14531
2014-05-30 08:26:36 -07:00
bors
874b56d337 auto merge of #14524 : ahmedcharles/rust/to_string, r=alexcrichton 2014-05-30 06:01:41 -07:00
bors
32b6fc1eff auto merge of #14522 : aturon/rust/make_unique, r=alexcrichton,alexcrichton,me
This patch makes `Arc::make_unique` examine the number of weak
references as well as strong references, which is required for safety.

It also adds a `make_unique` method to the `Rc` type for consistency.

Closes #14521.
2014-05-30 04:21:41 -07:00
bors
3a105464fb auto merge of #14517 : lucy/rust/issue-14499, r=alexcrichton
Fixes #8537
Fixes #14499 (duplicate of #8537)

Old:
```rust
test.rs:2 	pub extern "xxxxx" fn add(x: int, y: int) -> int {
          	                   ^~
```

New:
```rust
test.rs:2 	pub extern "xxxxx" fn add(x: int, y: int) -> int {
          	           ^~~~~~~
```
2014-05-30 02:11:45 -07:00
bors
25951b2242 auto merge of #14514 : Randati/rust/patch-1, r=huonw 2014-05-30 00:31:44 -07:00
bors
af7c030310 auto merge of #14511 : Sawyer47/rust/osrng-rename, r=alexcrichton
According to Rust's style guide acronyms in type names should be
CamelCase.

[breaking-change]
2014-05-29 22:56:44 -07:00
Cameron Zwarich
5aff0e7cec Fix the handling of assignments to owning pointer paths in check_loans
Make check_for_assignment_to_restricted_or_frozen_location treat
mutation through an owning pointer the same way it treats mutation
through an &mut pointer, where mutability must be inherited from the
base path.

I also included GC pointers in this check, as that is what the
corresponding code in gather_loans/restrictions.rs does, but I don't
think there is a way to test this with the current language.

Fixes #14498.
2014-05-29 22:02:57 -07:00
Piotr Jawniak
aa7b215f04 Rename OSRng to OsRng
According to Rust's style guide acronyms in type names should be
CamelCase.

[breaking-change]
2014-05-30 06:37:31 +02:00
Steven Fackler
8e8f6a0372 Implement Show for Bitv{,Set}
Closes #14531
2014-05-29 21:29:06 -07:00
bors
d0b0f16c3f auto merge of #14512 : Heather/rust/patch-1, r=alexcrichton 2014-05-29 21:16:41 -07:00