Commit Graph

821 Commits

Author SHA1 Message Date
bors
7fbbfe6bf2 auto merge of #17366 : ohazi/rust/master, r=steveklabnik
See: http://doc.rust-lang.org/std/from_str/trait.FromStr.html
```
let input_num = from_str::<Option<uint>>("5");
```
```
<anon>:2:21: 2:45 error: failed to find an implementation of trait std::from_str::FromStr for core::option::Option<uint>
<anon>:2     let input_num = from_str::<Option<uint>>("5");
                             ^~~~~~~~~~~~~~~~~~~~~~~~
```
2014-09-23 20:20:41 +00:00
Alfie John
9d95729af4 doc: Removing repeated variable name to make it less ambiguious 2014-09-22 20:48:10 +00:00
Alex Crichton
0169218047 Fix fallout from Vec stabilization 2014-09-21 22:15:51 -07:00
Alex Crichton
dbaa9300ac rollup merge of #17350 : pablobm/doc-fix 2014-09-19 10:00:32 -07:00
Oren Hazi
c942df9fa5 from_str has an impl for uint, not Option<uint> 2014-09-18 00:52:42 -07:00
Patrick Walton
78a841810e librustc: Implement associated types behind a feature gate.
The implementation essentially desugars during type collection and AST
type conversion time into the parameter scheme we have now. Only fully
qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-17 16:38:57 -07:00
Pablo Brasero
17674e02fc Fix warning and make code follow the text better 2014-09-17 21:05:16 +01:00
Alex Crichton
1921055dda rollup merge of #17294 : theevocater/master 2014-09-17 08:49:31 -07:00
Alex Crichton
9dfcb41926 rollup merge of #17292 : thestinger/tasks 2014-09-17 08:49:28 -07:00
Alex Crichton
b27947ac4d rollup merge of #17278 : steveklabnik/gh17242 2014-09-17 08:49:08 -07:00
Alex Crichton
b4bff574d2 rollup merge of #17277 : steveklabnik/doc_fix_rollup 2014-09-17 08:49:06 -07:00
bors
ff613abaa2 auto merge of #17227 : tshepang/rust/stronger-break, r=aturon
Remove trailing whitespace while at it
2014-09-17 03:46:15 +00:00
bors
0e784e1684 auto merge of #17268 : aturon/rust/mut-conventions, r=alexcrichton
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. Additional details and motivation in the RFC.

Note that the iterator *type* names are not changed by this RFC; those are awaiting a separate RFC for standardization.

Closes #13660
Closes #16810

[breaking-change]
2014-09-16 23:26:11 +00:00
Aaron Turon
fc525eeb4e Fallout from renaming 2014-09-16 14:37:48 -07:00
bors
ceb9bbfbf5 auto merge of #17213 : mo/rust/fix_typos, r=aturon 2014-09-16 21:36:08 +00:00
Jake Kaufman
7d00eb6133 Update triple per comments 2014-09-16 08:44:47 -07:00
bors
946654a721 auto merge of #17197 : nikomatsakis/rust/issue-5527-trait-reform-revisited, r=pcwalton
This patch does not make many functional changes, but does a lot of restructuring towards the goals of #5527. This is the biggest patch, basically, that should enable most of the other patches in a relatively straightforward way.

Major changes:

- Do not track impls through trans, instead recompute as needed.
- Isolate trait matching code into its own module, carefully structure to distinguish various phases (selection vs confirmation vs fulfillment)
- Consider where clauses in their more general form
- Integrate checking of builtin bounds into the  trait matching process, rather than doing it separately in kind.rs (important for opt-in builtin bounds)

What is not included:

- Where clauses are still not generalized. This should be a straightforward follow-up patch.
- Caching. I did not include much caching. I have plans for various kinds of caching we can do. Should be straightforward. Preliminary perf measurements suggested that this branch keeps compilation times roughly what they are.
- Method resolution. The initial algorithm I proposed for #5527 does not work as well as I hoped. I have a revised plan which is much more similar to what we do today.
- Deref vs deref-mut. The initial fix I had worked great for autoderef, but not for explicit deref. 
- Permitting blanket impls to overlap with specific impls. Initial plan to consider all nested obligations before considering an impl to match caused many compilation errors. We have a revised plan but it is not implemented here, should be a relatively straightforward extension.
2014-09-16 15:25:59 +00:00
bors
c09437ab2d auto merge of #17244 : spastorino/rust/patch-1, r=alexcrichton 2014-09-16 11:11:03 +00:00
bors
e6a3dabe43 auto merge of #17232 : untitaker/rust/patch-1, r=alexcrichton
The wording is correct if you consider that two of these lines were extracted from the original example. It still tripped me up while reading, so i just removed any reference to the linecount.
2014-09-16 09:26:03 +00:00
Jake Kaufman
2f35723170 Correct windows install link in guide
This closes #17260. The guide references the old install location for
the windows rust install before it was split into 64bit and 32bit
installers. This adds a link to each binary.
2014-09-15 23:36:17 -07:00
Daniel Micay
7ce2ea0d14 stop spawning so many tasks in guide-tasks
1000 tasks * 2MiB stack size -> 2GiB of virtual memory

On a 64-bit OS, a 32-bit executable has 4GiB available, but the kernel
gets half of the available address space so the limit is 2GiB on 32-bit.

Closes #17044
2014-09-16 00:47:49 -04:00
Niko Matsakis
eafeb335a0 Update docs to include Sized trait, which is needed 2014-09-15 18:52:20 -04:00
Martin Olsson
7caf2ab802 Fix two typos 2014-09-15 23:04:08 +02:00
Dan Connolly
2ee91ea437 use _sample configurations..._ rather than _here_ as link text 2014-09-15 13:40:16 -04:00
Steve Klabnik
51b4c515f4 remove rendundant function
Fixes #17230.
2014-09-15 13:23:46 -04:00
Steve Klabnik
b45853860c remove references to HM inference
Fixes #17229.
2014-09-15 13:23:31 -04:00
Steve Klabnik
df6240dc9e properly annotate C code in the guide
Without 'notrust,' we were getting a playpen link.

Fixes #17228.
2014-09-15 13:23:12 -04:00
Steve Klabnik
b3432b267d Don't use 'here'
Fixes #17225
2014-09-15 13:21:50 -04:00
bors
8e2860407b auto merge of #16887 : steveklabnik/rust/guide_iterators, r=alexcrichton
This isn't ready to merge yet.

The 'containers and iterators' guide is basically just a collection of stuff that should be in the module definitions. So I'm moving the guide to just an 'iterators' guide, and moved the info that was there into the right places.

So, is this a good path forward, and is all of the information still correct?
2014-09-15 15:11:12 +00:00
Santiago Pastorino
f8bbf6d0e1 rustc main.rs generates main binary file 2014-09-13 22:25:38 -03:00
Steve Klabnik
1b818020a0 Remove container guide.
This isn't really what guides are for, this information belongs in the
module-level docs.

Fixes #9314.
2014-09-13 15:06:00 -04:00
bors
079951ed2a auto merge of #17187 : damag/rust/ffi-guide-fixes, r=alexcrichton
Updates the callbacks section to refer to the right function name and fixes a couple of minor whitespace issues in the examples.
2014-09-13 13:50:57 +00:00
Markus Unterwaditzer
d36ac4def5 These two lines are actually three. 2014-09-13 15:16:59 +02:00
Tshepang Lekhonkhobe
46e3014ce0 doc: that felt like it needed a stronger break than what comma provides
Remove trailing whitespace while at it
2014-09-13 09:40:30 +02:00
bors
ccae356ace auto merge of #17155 : steveklabnik/rust/dherman_fixes, r=brson
Fixing more suggestions from @dherman . I made them individual commits in case we want to discuss any of them further.
2014-09-12 23:30:54 +00:00
Damien Grassart
d4b2edc3ee Use a space after colons per the Rust coding style:
https://github.com/rust-lang/rust-guidelines/blob/master/style/whitespace.md
2014-09-12 09:10:03 +02:00
Damien Grassart
0eedec560c The example code uses trigger_callback(), not do_callback(). 2014-09-12 09:03:15 +02:00
bors
4727381685 auto merge of #16657 : steveklabnik/rust/goodbye_tutorial, r=brson
The Guide isn't 100% perfect, but it's basically complete. It's
certainly better than the tutorial is. Time to start pointing more
people its way.

I also just made it consistent to call all things 'guides' rather than
tutorials.

Fixes #9874. This is the big one.

And two bugs that just go away.

Fixes #14503.
Fixes #15009.
2014-09-12 01:15:41 +00:00
Steve Klabnik
c456cca90a only deprecate the guide rather than 🔥 🔥 🔥 2014-09-11 16:21:32 -04:00
Steve Klabnik
a99ba25f2b Replace the Tutorial with the Guide.
The Guide isn't 100% perfect, but it's basically complete. It's
certainly better than the tutorial is. Time to start pointing more
people its way.

I also just made it consistent to call all things 'guides' rather than
tutorials.

Fixes #9874. This is the big one.

And two bugs that just go away.

Fixes #14503.
Fixes #15009.
2014-09-11 16:21:32 -04:00
bors
d24c82420b auto merge of #17154 : steveklabnik/rust/array_clarification, r=huonw
fixes #17148
2014-09-11 18:50:41 +00:00
bors
1dc31953e7 auto merge of #17153 : steveklabnik/rust/add_link_to_manual, r=sfackler
whoops

Fixes https://github.com/rust-lang/rust/pull/16827#issuecomment-55160273
2014-09-11 15:50:45 +00:00
bors
09abbbdafc auto merge of #16866 : P1start/rust/tuple-indexing, r=brson
This allows code to access the fields of tuples and tuple structs behind the feature gate `tuple_indexing`:

```rust
#![feature(tuple_indexing)]

let x = (1i, 2i);
assert_eq!(x.1, 2);

struct Point(int, int);
let origin = Point(0, 0);
assert_eq!(origin.0, 0);
assert_eq!(origin.1, 0);
```

Implements [RFC 53](https://github.com/rust-lang/rfcs/blob/master/active/0053-tuple-accessors.md). Closes #16950.
2014-09-11 00:05:41 +00:00
Steve Klabnik
c3943b3c89 don't say 'semantic' 2014-09-10 18:30:28 -04:00
Steve Klabnik
8f7470d864 remove rich hickey love 2014-09-10 18:29:58 -04:00
Steve Klabnik
311227003f Remove much of the modules section.
This part can get _really_ confusing, and we want to make sure that
people succeed in the guide. I plan on making a module guide in the
future to replace the information here.
2014-09-10 18:28:37 -04:00
Steve Klabnik
9c8c82b87d hello_world.rs -> main.rs 2014-09-10 18:26:17 -04:00
Steve Klabnik
b85191ae0f dave hates jokes 😉 2014-09-10 18:24:40 -04:00
Steve Klabnik
faf14ae633 Fix vector terminology in the manual.
fixes #17148
2014-09-10 17:02:37 -04:00
Steve Klabnik
60415e1032 reintroduce manual link in doc index
whoops

Fixes https://github.com/rust-lang/rust/pull/16827#issuecomment-55160273
2014-09-10 16:57:07 -04:00