Commit Graph

41947 Commits

Author SHA1 Message Date
bors
f46c4e158d Auto merge of #24606 - bombless:doc-result, r=alexcrichton
Get rid of the confusion that what does "custom" mean in this context.
2015-04-20 18:43:34 +00:00
Steve Klabnik
1e29abec59 Add common macros to TRPL
Fixes #22621
2015-04-20 14:40:54 -04:00
Steve Klabnik
1150fb0f88 TRPL: unsafe -> raw pointers
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.

This addresses part of #12905.
2015-04-20 13:38:05 -04:00
Steve Klabnik
0f20c9d8b7 Remove feature gated examples from the reference.
The slice patterns example was nice, so let's put it with the other
slice pattern feature gate documentation.

Fixes #24573
2015-04-20 13:33:57 -04:00
Steve Klabnik
9a65045611 TRPL: casting
Due to documenting `transmute`, addresses part of #12905
2015-04-20 11:55:29 -04:00
bors
e959fab4a5 Auto merge of #24597 - bombless:doc, r=steveklabnik
This patch will make links like http://doc.rust-lang.org/std/collections/struct.BTreeMap.html#examples actually playable without modifying the code.

It seems that this patch cannot be tested on test/rustdoc.

And I suggest adding a `&run=1` to those links.

Thank @jorisgio for noticing me this!

r? @steveklabnik 

Closes https://github.com/rust-lang/rust/issues/24332
2015-04-20 15:23:52 +00:00
Steve Klabnik
fbd3261e37 Fix small typo in TRPL intro 2015-04-20 10:42:17 -04:00
Steve Klabnik
ac09864c90 Clean up Box documentation.
Without the `box` keyword, one of these two reasons is not correct, so
let's just eliminate this section and elaborate on the reason for the
legit use case inline.

Fixes #24511
2015-04-20 10:06:49 -04:00
Steve Klabnik
89ef6371e0 remove bad example from PartialEq docs
Fixes #24173
2015-04-20 09:59:58 -04:00
Steve Klabnik
1dd8a651ba Make iterator struct docs more consistent.
Fixes #24008.
2015-04-20 09:55:40 -04:00
Steve Klabnik
14af25797f TRPL edits: generics 2015-04-20 09:44:21 -04:00
Steve Klabnik
1c48227b3c Remove inverse example from generics part of TRPL
Fixes #24325.
2015-04-20 09:44:21 -04:00
Steve Klabnik
e289b689d4 TRPL edits: traits
Let's talk about generics first, since we use traits to bound them
in funtions.

Partially addresses #24325

Fixes #24271
2015-04-20 09:44:10 -04:00
Steve Klabnik
1646ebd5ba move Deref coercions to syntax and semantics
It's a language feature, so it belongs here.
2015-04-20 09:37:49 -04:00
Steve Klabnik
5b54a4f03b TRPL copyedits: strings 2015-04-20 09:37:49 -04:00
Steve Klabnik
73d3d68550 TRPL editing: vectors 2015-04-20 09:37:49 -04:00
Steve Klabnik
a3a2049166 Move drop back in TRPL TOC
It's a trait implementation, so we need traits first.
2015-04-20 09:37:49 -04:00
Steve Klabnik
f81b1fcf8c TRPL edits: method syntax 2015-04-20 09:37:49 -04:00
Steve Klabnik
7f43c5782c TRPL editing: structs 2015-04-20 09:37:48 -04:00
Steve Klabnik
44db46a308 TRPL editing: move patterns back
We want to talk about how to pattern match on structs, so let's bump
it back one.
2015-04-20 09:37:48 -04:00
Steve Klabnik
9661efac8b TRPL editing: patterns
Partially addresses #24388
2015-04-20 09:37:48 -04:00
Steve Klabnik
836c8a826b TRPL editing: match 2015-04-20 09:37:46 -04:00
Steve Klabnik
213708867e TRPL editing: enums
Now that we're not doing the guessing game, a lot of this is irrelevant.
2015-04-20 09:37:45 -04:00
bors
be9a72b9c1 Auto merge of #22117 - fhahn:fail-on-errors, r=nikomatsakis
At the moment, when compilation is stopped at a stop point (like `-Z parse-only`), `rustc` does not return an nonzero exit code even if there are errors (expect fatal ones, that cause it to panic immediately). As an example, compiling `src/test/compile-fail/doc-before-semi.rs` with `-Z parse-only` raises an error, but exists with 0.

Note that I could not use `sess.abort_if_errors()` in the macro, because `sess` is passed by value and move at some point.
2015-04-20 13:20:19 +00:00
Corey Farwell
be08d35c8f Simplify alloc::arc::Arc example in doc-comment
As far as I can tell, this conversion to integer to floating point does not need to happen and is beside the point
2015-04-20 08:57:06 -04:00
bors
fe11393172 Auto merge of #24525 - GuillaumeGomez:check-const, r=pnkfelix
Part of #24407.
2015-04-20 10:26:17 +00:00
Guillaume Gomez
737005a110 Fix typos 2015-04-20 12:01:56 +02:00
bors
5910dc0e8e Auto merge of #24608 - frewsxcv:patch-15, r=alexcrichton 2015-04-20 02:47:45 +00:00
York Xiang
c3c761058c Improve doc for Result::unwrap() 2015-04-20 08:59:06 +08:00
bors
07560d2330 Auto merge of #24586 - richo:test-16745, r=jakub-
closes #16745
2015-04-20 00:43:37 +00:00
Guillaume Gomez
8a6980c553 Add long explanation for E0018 2015-04-20 00:49:53 +02:00
bors
c64feb6341 Auto merge of #24592 - P1start:style-lints-changes, r=alexcrichton
Passing a non-snake-case name to `#![crate_name]` or `--crate-name` will now yield a warning from the `non_snake_case` lint.
2015-04-19 21:36:14 +00:00
Piotr Czarnecki
e5e343aeb7 Finished unicode support in the model lexer.
Completed XID_Start and XID_Continue rules
2015-04-19 23:05:32 +02:00
Florian Hahn
be437132b8 Add proper XID_Start and XID_Continue rules and use CharPos for span comparison, closes #15679 2015-04-19 23:02:10 +02:00
Ariel Ben-Yehuda
94a1b266f9 Call skolemize_late_bound_regions only after fast rejection
skolemize_late_bound_regions essentially copies the entire type (most of the times it shouldn't, but it does), and match_impl runs millions of times.

Times compiling rustc, tested with
$ make -j4 rustc-stage1
$ ( time RUSTFLAGS=-Z time-passes make -j4 rustc-stage2 ) # need LLVM time for calibration

Before:
real	21m44.960s
user	29m38.812s
sys	0m14.944s

After:
real	19m31.445s
user	26m47.260s
sys	0m14.952s

Making this is a 10% performance improvement.

LLVM passes took 867 seconds before, 862 seconds after.
2015-04-19 23:38:37 +03:00
bors
da355efc1c Auto merge of #24517 - erickt:str, r=alexcrichton
This implementation is currently about 3-4 times faster than using the `.to_string()` based approach.

I would also suggest we deprecate `String::from_str` since it's redundant with the stable `String::from` method, but I'll leave that for a future PR.
2015-04-19 19:32:45 +00:00
Erick Tryzelaar
f055054eab collections: Move optimized String::from_str to String::from
This implementation is currently about 3-4 times faster than using
the `.to_string()` based approach.
2015-04-19 10:59:06 -07:00
bors
c6b8d96abd Auto merge of #24526 - klutzy:getrandom-fix, r=alexcrichton
Fixes #21538.
2015-04-19 17:28:27 +00:00
Corey Farwell
aaafb96abd Fix typos in code comments 2015-04-19 12:18:51 -04:00
bors
ddf25c890d Auto merge of #24572 - steveklabnik:gh24569, r=brson
Fixes #24569.

Should wait until https://github.com/rust-lang/rust-www/pull/114 is merged.
2015-04-19 15:24:19 +00:00
bors
be41e98067 Auto merge of #24567 - tamird:windows-caviats, r=steveklabnik
- https://github.com/rust-lang/rust/issues/1237 is closed
- `libgcc` is now statically linked:
  https://github.com/rust-lang/rust/pull/17471
2015-04-19 13:20:24 +00:00
bors
d86b6f67bc Auto merge of #24559 - frewsxcv:get-mut-if-let, r=steveklabnik
None
2015-04-19 11:16:45 +00:00
York Xiang
adc93ceac9 rustdoc: don't inject "extern crate std;" 2015-04-19 18:10:45 +08:00
P1start
c163f89310 Lint non-snake-case crate names
Passing a non-snake-case name to #![crate_name] or --crate-name will now yield a
warning from the `non_snake_case` lint.
2015-04-19 20:31:18 +12:00
klutzy
4d80a82381 std::rand::os: Fix race condition of atomics
Fixes #21538.
2015-04-19 16:56:35 +09:00
bors
14d9d1c1cf Auto merge of #24552 - meqif:explain, r=alexcrichton
cc #24407
2015-04-19 07:51:27 +00:00
Richo Healey
4cf9e2db5e test: Add an assertion to the #16745 testcase 2015-04-19 00:25:13 -07:00
bors
049de3fe7f Auto merge of #24555 - frewsxcv:patch-14, r=steveklabnik 2015-04-19 05:46:47 +00:00
bors
bd968a1d65 Auto merge of #24554 - tshepang:let-faq, r=steveklabnik 2015-04-19 03:42:59 +00:00
Richo Healey
57fdeecd91 test: Add testcase for #16745 2015-04-18 17:41:18 -07:00