Commit Graph

42784 Commits

Author SHA1 Message Date
Manish Goregaokar
bea1bba9ca Rollup merge of #25476 - rpjohnst:master, r=huonw
Closes #18173
2015-05-17 11:55:38 +05:30
Manish Goregaokar
27676ea8c2 Rollup merge of #25474 - achanda:fix_email, r=nikomatsakis 2015-05-17 11:55:38 +05:30
Manish Goregaokar
a25925a3d4 Rollup merge of #25472 - WillEngler:book-tiny-typo-fixes, r=alexcrichton
This PR fixes two little typos in the Dining Philosophers example.

Also, there are two style points that may have been oversights but may have been deliberate, so I'll just bring them up here:

1) In the last paragraph, you say

> You’ll notice we can introduce a new binding to `table` here, and it will shadow the old one. This is often used so that you don’t need to come up with two unique names.

You already said something similar to this in the Guessing Game, but maybe you intended for this example to be independent of that one.

2) In "Rust Inside Other Languages," you introduce the idea of the "global interpreter lock" and then refer to it as the GIL a few paragraphs later without explicitly stating that GIL == global interpreter lock. It's reasonable to expect readers to make the connection, but maybe that's not what you intended.

Excellent work on the examples! Congrats on 1.0!

r? @steveklabnik
2015-05-17 11:55:38 +05:30
Manish Goregaokar
e06eb1c733 Rollup merge of #25469 - ecoal95:patch-1, r=alexcrichton
Just detected it while reading.
2015-05-17 11:55:38 +05:30
Manish Goregaokar
e8d29a9cfb Rollup merge of #25465 - Ryman:patch-2, r=alexcrichton
r? @steveklabnik
2015-05-17 11:55:37 +05:30
Nick Hamann
f47cb0ecfb Remove error about obsolete dereferencing of newtype structs.
A built-in feature enabling the dereferencing of newtype structs was removed
in PR #11188, and this error (E0068) was added at the same time to warn of
its removal. It seems to make sense to remove the error now, given that
the obsolete feature it is warning about was removed nearly a year and a
half ago.
2015-05-17 01:12:11 -05:00
Alex Crichton
e5e722bd32 std: Reexport std::net::tcp::Incoming
This iterator was mistakenly not reexported at the top level, preventing
actually naming the type!

Closes #25519
2015-05-16 22:24:13 -07:00
Ben Striegel
e1f73b8e2b Simplify CString doc comment
No need for `&b"foo"[..]` to make a CString, `"foo"` will do.
2015-05-16 22:30:25 -04:00
bors
4f83c4b851 Auto merge of #25458 - P1start:arc-dst, r=huonw 2015-05-17 01:41:52 +00:00
bors
c23a9d42ea Auto merge of #25387 - eddyb:syn-file-loader, r=nikomatsakis
This allows compiling entire crates from memory or preprocessing source files before they are tokenized.

Minor API refactoring included, which is a [breaking-change] for libsyntax users:
* `ParseSess::{next_node_id, reserve_node_ids}` moved to rustc's `Session`
* `new_parse_sess` -> `ParseSess::new`
* `new_parse_sess_special_handler` -> `ParseSess::with_span_handler`
* `mk_span_handler` -> `SpanHandler::new`
* `default_handler` -> `Handler::new`
* `mk_handler` -> `Handler::with_emitter`
* `string_to_filemap(sess source, path)` -> `sess.codemap().new_filemap(path, source)`
2015-05-17 00:05:34 +00:00
peferron
55c8bacc3a Make error message consistent with source code
The source code uses `"whatever".as_bytes()`, not `b"whatever"`.
2015-05-16 17:01:25 -07:00
Mário Feroldi
ce8fb6c6c6 Fixed reserve_exact example
The same example for ``reverse`` were in the ``reserve_exact``'s example.
2015-05-16 20:59:20 -03:00
P1start
e840393625 Make Arc support DSTs 2015-05-17 11:25:17 +12:00
Eduard Burtescu
8cc9878f8d test/compile-fail: fix expected error message for non-UTF8 source. 2015-05-17 02:15:00 +03:00
Johannes Hoff
b6e755df66 fs::walk_dir example without unstable features
The current version of the example won't compile due to unstable features.
This is an attempt to fix that, at the cost of slightly more verbose code.
2015-05-16 16:07:52 -07:00
Wilfred Hughes
ba02739ad3 Avoid calling a variable 'string' when discussing strings.
Newcomers to Rust need to learn the distinctinion between `&str` and
`String`, so additonally having `string` in an example risks confusion.
2015-05-16 23:56:45 +01:00
bors
2da9efefca Auto merge of #25463 - jeremyschlatter:master, r=alexcrichton 2015-05-16 22:29:56 +00:00
Brian Anderson
bf15d040c0 Make a test compatible with the beta channel 2015-05-16 14:53:37 -07:00
bors
0d707d15f6 Auto merge of #25485 - XuefengWu:24968_err_msg_parse_self_type_2, r=nrc
fix #24968
report more friendly error message for Self when fn args
copy from https://github.com/rust-lang/rust/pull/25096
r? @nrc  @arielb1
2015-05-16 20:53:42 +00:00
bors
d332aead90 Auto merge of #25434 - dotdash:gep, r=alexcrichton
Using regular pointer arithmetic to iterate collections of zero-sized types
doesn't work, because we'd get the same pointer all the time. Our
current solution is to convert the pointer to an integer, add an offset
and then convert back, but this inhibits certain optimizations.

What we should do instead is to convert the pointer to one that points
to an i8\*, and then use a LLVM GEP instructions without the inbounds
flag to perform the pointer arithmetic. This allows to generate pointers
that point outside allocated objects without causing UB (as long as you
don't dereference them), and it wraps around using two's complement,
i.e. it behaves exactly like the wrapping_* operations we're currently
using, with the added benefit of LLVM being able to better optimize the
resulting IR.
2015-05-16 19:17:30 +00:00
Alex Crichton
f894417e6b std: Fix missing stability on iter::Cloned
The method was stabilized but the structure was forgotten to be stabilized.

Closes #25480
2015-05-16 11:27:08 -07:00
Alex Crichton
1ec7a69732 std: Add an unstable method Child::id
This commits adds a method to the `std::process` module to get the process
identifier of the child as a `u32`. On Windows the underlying identifier is
already a `u32`, and on Unix the type is typically defined as `c_int` (`i32` for
almost all our supported platforms), but the actually pid is normally a small
positive number.

Eventually we may add functions to load information about a process based on its
identifier or the ability to terminate a process based on its identifier, but
for now this function should enable this sort of functionality to exist outside
the standard library.
2015-05-16 11:13:38 -07:00
bors
6403a2fc32 Auto merge of #25462 - alexcrichton:favicon-https, r=nrc
Helps prevent mixed content warnings if accessing docs over HTTPS.

Closes #25459
2015-05-16 17:41:28 +00:00
Maximilian Haack
e095e3963e Update windows install links to 1.0
Fixes #25489
2015-05-16 19:18:52 +02:00
bors
5e535eae5c Auto merge of #25460 - P1start:rc-unsized-impls, r=luqmana
Most of `Rc`’s trait implementations were DST-ified in #24619, but not these ones.
2015-05-16 16:06:05 +00:00
Maximilian Haack
76fa4f427b Update the shown installed rust version to 1.0
🎉 🎉 🎉
2015-05-16 17:20:07 +02:00
Huachao Huang
6e8e6a4b08 Update rust-inside-other-languages.md 2015-05-16 21:44:02 +08:00
Xuefeng Wu
7fe60c1636 fix error message in test 2015-05-16 21:39:48 +08:00
bors
63b000b1b8 Auto merge of #25444 - nikomatsakis:macro-tt-fix, r=pnkfelix
Permit token trees, identifiers, and blocks to be following by sequences.

Fixes #25436.

r? @pnkfelix
2015-05-16 12:29:31 +00:00
Niko Matsakis
7a5d74828b Add test for two sequence repetitions in a row 2015-05-16 08:26:44 -04:00
bors
8fdb3a4ad9 Auto merge of #25487 - P1start:extern-crate-unexpected-error, r=huonw
Closes #25468.
2015-05-16 10:53:25 +00:00
P1start
dadac15477 Clarify the error message for malformed extern crate statements
Closes #25468.
2015-05-16 22:35:59 +12:00
Xuefeng Wu
574a8cd8cc fix trait capitalise typo in test file 2015-05-16 17:37:11 +08:00
Xuefeng Wu
5cf6b02571 fix typo for copyright year and trait capitalise 2015-05-16 17:29:48 +08:00
XuefengWu
1e39d9b95d change Self type error message 2015-05-16 17:22:27 +08:00
Xuefeng Wu
8e82c21bf3 more friend error message for in fn arg 2015-05-16 17:21:43 +08:00
sumito3478
f641bd8396 Fix deadlinks in complement-lang-faq.md 2015-05-16 18:06:22 +09:00
bors
0becf6aec7 Auto merge of #25453 - jimblandy:FQA-fiasco-link, r=alexcrichton
Fix the link to the "static initialization order fiasco" discussion in the C++ Frequently Questioned Answers.

At present the link points to a mail message summarizing the decision not to have resumable exceptions, but the FAQ means to refer to a discussion of the "static initialization order fiasco". I've made my best guess at what it meant to refer to.
2015-05-16 08:37:31 +00:00
bors
15c18e725c Auto merge of #25450 - dnaeon:docs, r=alexcrichton 2015-05-16 07:01:32 +00:00
bors
7dbee36e17 Auto merge of #25449 - IvanUkhov:std-doc, r=alexcrichton 2015-05-16 05:25:44 +00:00
bors
e10bd27f50 Auto merge of #25447 - brson:version, r=alexcrichton 2015-05-16 03:48:24 +00:00
Russell Johnston
84d6dcb351 Test that associated types are not required as type parameters
Closes #18173
2015-05-15 20:49:01 -06:00
Abhishek Chanda
89eee9ac36 Change my email 2015-05-15 19:18:06 -07:00
bors
4ce08a5d70 Auto merge of #25440 - durka:patch-3, r=alexcrichton
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
2015-05-16 02:11:11 +00:00
Will Engler
d5394d00d1 Correct two small typos in the Dining Philosophers example. 2015-05-15 19:32:13 -06:00
ray glover
307fab1aa7 fix to size_hint(); documentation for bit-twiddle; 2015-05-16 01:53:11 +01:00
bors
7a52835c1a Auto merge of #25466 - P1start:move-closure-span, r=alexcrichton
Closes #24986.
2015-05-16 00:32:35 +00:00
Emilio Cobos Álvarez
e30909de11 Small typo in the docs
Just detected it while reading.
2015-05-16 02:21:05 +02:00
P1start
5a1b336a01 Fix the spans of move closures
Closes #24986.
2015-05-16 11:24:06 +12:00
Ryman
0909ce382f libstd: Path docs: file is now file_name 2015-05-16 00:16:11 +01:00