Commit Graph

48492 Commits

Author SHA1 Message Date
Sean Griffin
5dbc373f70 Fix tests for SystemTime addition on mac and ios
Those platforms don't support nanosecond precision, so adding 1
nanosecond does nothing.
2015-12-03 08:27:32 -07:00
Sean Griffin
a59cd363cc Fixed make tidy error 2015-12-02 15:01:58 -07:00
Sean Griffin
a69bcd885b Ensure two SystemTimes are equal when nanos add to exactly 1B
Currently if you add a duration which should lead to 0 nanos and 1
additional second, we end up with no additional seconds, and 1000000000
nanos.
2015-12-02 13:55:35 -07:00
bors
d5321f2abe Auto merge of #30133 - jseyfried:fix_regression, r=alexcrichton
r? @nikomatsakis
2015-12-02 17:54:30 +00:00
bors
01bd93d310 Auto merge of #30161 - JIghtuse:master, r=steveklabnik 2015-12-02 15:06:37 +00:00
bors
88397e092e Auto merge of #30160 - adambadawy:fix_wait_with_output_typo, r=bluss
r? @steveklabnik
2015-12-02 07:36:40 +00:00
bors
4f6fe3ee8e Auto merge of #30157 - brson:mk, r=sfackler
This dates from the stone-ages. We always configure LLVM with all
supported targets.
2015-12-02 05:31:44 +00:00
Boris Egorov
63bb3e66ee book: Provide link to tuple structs in type aliases chapter 2015-12-02 10:47:53 +06:00
Adam Badawy
3bbc632344 Fix typo in src/libstd/process.rs 2015-12-01 23:12:01 -05:00
bors
cede907e91 Auto merge of #30155 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30129, #30134, #30136, #30144, #30150, #30153, #30154
- Failed merges:
2015-12-02 02:43:04 +00:00
Brian Anderson
f65f438b08 mk: Remove obsolete comment
This dates from the stone-ages. We always configure LLVM with all
supported targets.
2015-12-02 02:13:32 +00:00
Steve Klabnik
9823511b2a Rollup merge of #30154 - salty-horse:guessing_panic, r=steveklabnik
The text mentions ```return```, but what's actually happening is a ```panic!```.
2015-12-01 19:01:42 -05:00
Steve Klabnik
63015e8dc0 Rollup merge of #30153 - durka:patch-11, r=steveklabnik
I think this fixes #30137. I basically just repeated some details that were scattered around other places in this document, and emphasized that you probably don't want an `extern crate` or `mod` statement to end up inside a function.
2015-12-01 19:01:42 -05:00
Steve Klabnik
9d05f56aab Rollup merge of #30150 - steveklabnik:fix_exe_suffix, r=alexcrichton 2015-12-01 19:01:42 -05:00
Steve Klabnik
da095eecc7 Rollup merge of #30144 - pjungwir:clarify-semver-rules, r=steveklabnik
The documentation shows this:

    [dependencies]

    rand="0.3.0"

and says it allows any version compatible with 0.3.0, but then it says, "If we wanted to use only 0.3.0 exactly, we could use `=0.3.0`." That is very easy to misunderstand, so hopefully this PR will help others not to be as confused as me. :-)
2015-12-01 19:01:41 -05:00
Steve Klabnik
8fd7f1e614 Rollup merge of #30136 - fhahn:remove-int-from-doc-examples, r=steveklabnik
This PR replaces uses of int/uint in some doc examples in various crates.
2015-12-01 19:01:41 -05:00
Steve Klabnik
5e4adf96cf Rollup merge of #30134 - salty-horse:patch-1, r=steveklabnik
random/secret guess -> secret number.
2015-12-01 19:01:41 -05:00
Steve Klabnik
f798f25073 Rollup merge of #30129 - tbu-:pr_doc_arrays_coerce, r=steveklabnik
Fixes #29993.
2015-12-01 19:01:41 -05:00
bors
2f95de3b3b Auto merge of #30129 - tbu-:pr_doc_arrays_coerce, r=steveklabnik
Fixes #29993.
2015-12-01 23:35:54 +00:00
Ori Avtalion
fa0009136d book: Change mention of unused return to panic! 2015-12-02 01:34:08 +02:00
Alex Burka
ca07c2ec21 trpl: explain how to inhibit rustdoc's auto-main
I think this fixes #30137. I basically just repeated some details that were scattered around other places in this document, and emphasized that you probably don't want an `extern crate` or `mod` statement to end up inside a function.
2015-12-01 18:18:19 -05:00
Steve Klabnik
4fb296e077 Small fix to EXE_SUFFIX and DLL_EXTENSION docs 2015-12-01 16:53:48 -05:00
bors
69b2fce7bb Auto merge of #29858 - fhahn:abort-if-path-has-spaces, r=brson
The Rust build scripts do work if the source directory contains spaces. I tried to make it work with spaces. I managed to get the Rust's and LLVM's configure scripts to work with spaces in the path, but I could not figure out how to get the Rust makefiles working.

So for now, this PR updates Rust's `configure` to abort if the source path contains spaces. I also added a note about spaces in the source path to the README.

I think this should close #18477 for now.
2015-12-01 21:38:20 +00:00
Florian Hahn
e48030d7d1 Replace uses of int/uint with isize/uzsize in doc examples 2015-12-01 21:21:45 +01:00
bors
eb1d018c01 Auto merge of #25570 - oli-obk:const_indexing, r=nikomatsakis
This PR allows the constant evaluation of index operations on constant arrays and repeat expressions. This allows index expressions to appear in the expression path of the length expression of a repeat expression or an array type.

An example is

```rust
const ARR: [usize; 5] = [1, 2, 3, 4, 5];
const ARR2: [usize; ARR[1]] = [42, 99];
```

In most other locations llvm's const evaluator figures it out already. This is not specific to index expressions and could be remedied in the future.
2015-12-01 19:47:38 +00:00
Paul A. Jungwirth
dfa0cbcb3e Clarify ambiguity about how to ask Cargo for a specific version 2015-12-01 10:03:46 -08:00
bors
dfe88bf1e5 Auto merge of #29391 - DanielKeep:syntax-index, r=steveklabnik
* `const`: Add reference to raw pointers
* Change `expr!(...)` etc. examples to use `ident` instead.
  *Technically*, it should be `pat`, but that's not how it works in
  practice.
* `|`: add reference to closure syntax.
* Closure syntax entry.
* Indexing and slicing entries.
* Add history of obsolete and deprecated syntax.

r? @steveklabnik
2015-12-01 17:59:42 +00:00
bors
ed121aa897 Auto merge of #30124 - steveklabnik:doc_string_errors, r=alexcrichton
Part of #29376
2015-12-01 16:09:33 +00:00
Steve Klabnik
546e8f9ff4 Document the Error types in std::string
Part of #29376
2015-12-01 09:59:00 -05:00
bors
4dda364ab3 Auto merge of #30135 - michaelwoerister:interning-checks, r=sanxiyn
This PR adds some safety checks to interning things in `ty::ctxt`. Accidentally re-interning an `AdtDef` has bitten me in the behind just last week (it messes up things in very subtle way only showing up later as an LLVM assertion).

Initially I had also added a check to `ty::ctxt::node_type_insert()` -- but there it seems to be expected that the same table slot is written to multiple times.

Roll-up candidate.
2015-12-01 13:19:41 +00:00
Ori Avtalion
4a35a732b7 Fix wording in Guessing Game 2015-12-01 11:59:04 +02:00
Jeffrey Seyfried
15b1f56499 Add test for #30089 2015-12-01 09:34:45 +00:00
Michael Woerister
f6a1db6199 Add some consistency checks for value interning in ty::ctxt. 2015-12-01 09:50:07 +01:00
Daniel Keep
a34274c8ea trpl: additions & fixes for syntax index.
* `const`: Add reference to raw pointers
* Change `expr!(...)` etc. examples to use `ident` instead.
  *Technically*, it should be `pat`, but that's not how it works in
  practice.
* `|`: add reference to closure syntax.
* Closure syntax entry.
* Indexing and slicing entries.
2015-12-01 19:39:52 +11:00
Jeffrey Seyfried
4da9694a55 Fixes #30089 2015-12-01 08:13:41 +00:00
bors
0bfdedb010 Auto merge of #30118 - alexcrichton:fix-time-again, r=aturon
I believe that because Windows' unit of resolution is 100ns that this unit of
time will ensure that the assertions will hold true as it's representable in the
native format.

cc #29970
2015-12-01 07:40:41 +00:00
bors
c212c0e1d1 Auto merge of #30116 - petrochenkov:exhaust, r=alexcrichton
Fixes https://github.com/rust-lang/rust/pull/29383#issuecomment-160652130

r? @bluss
2015-12-01 05:55:04 +00:00
bors
baf020802f Auto merge of #30057 - steveklabnik:doc_str, r=alexcrichton
Part of #29338
2015-12-01 03:37:58 +00:00
Tobias Bucher
53f026948a Arrays don't dereference but coerce to slices
Fixes #29993.
2015-12-01 02:13:35 +00:00
bors
407e8b3aac Auto merge of #30126 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30108, #30114, #30115, #30119, #30120, #30122
- Failed merges:
2015-12-01 01:05:58 +00:00
bors
a2866e387e Auto merge of #30121 - steveklabnik:fix_trpl_tests, r=alexcrichton
In #29932, I moved the location of TRPL, but I missed making the changes
in mk/tests.mk. This led to #30088 landing with a broken example.

As such, #30113 will need to land before this.
2015-11-30 23:12:14 +00:00
Steve Klabnik
06df5d8042 Rollup merge of #30122 - steveklabnik:last_trpl_fix, r=Manishearth
Along with https://github.com/rust-lang/rust/pull/30121, this should fix the last fallout from https://github.com/rust-lang/rust/pull/29932
2015-11-30 18:02:22 -05:00
Steve Klabnik
9437caff55 Rollup merge of #30120 - steveklabnik:doc_string_parse_error, r=alexcrichton
Part of #29376
2015-11-30 18:02:22 -05:00
Steve Klabnik
06419880a8 Rollup merge of #30119 - steveklabnik:doc_to_string, r=alexcrichton
Part of #29376
2015-11-30 18:02:22 -05:00
Steve Klabnik
30221eaedf Rollup merge of #30115 - nilcons-contrib:fix-book-stack, r=steveklabnik
The `f` argument will reference the actual value in the `d` box, not the box in the `bar`'s stack frame.

I am just learning Rust, so I don't know how to explain this well, but just from `f`'s type it is clear that it will be a pointer to an `i32`, not a pointer to a pointer. Some `println!("{:p}", ...)`'s can easily confirm this.

I would actually suggest to remove/simplify this part of the example. This is a subtle issue that can easily confuse people at the early stages of familiarizing with the language. (As I got confused by it. :))
2015-11-30 18:02:21 -05:00
Steve Klabnik
5000bd25d9 Rollup merge of #30114 - sourcefrog:doc-casts2, r=Manishearth 2015-11-30 18:02:21 -05:00
Steve Klabnik
e4ab0398ff Rollup merge of #30108 - bhargavrpatel:master, r=steveklabnik 2015-11-30 18:02:21 -05:00
Steve Klabnik
23fb9743d3 Document std::string::ParseError
Part of #29376
2015-11-30 16:21:03 -05:00
bors
7269f0e9f3 Auto merge of #30080 - durka:patch-10, r=alexcrichton
Fixes #30073. The input to `cfg!` is a meta attribute, but not _any_ meta attribute (e.g. `cfg!(allow(dead_code))` doesn't compile). But the macro_rules syntax can't quite express this, so I added a note to the doc.
2015-11-30 21:15:56 +00:00
Steve Klabnik
7b30f5c256 Better docs for the str primitive
Part of #29338
2015-11-30 16:10:47 -05:00