Commit Graph

43547 Commits

Author SHA1 Message Date
Eduard Burtescu
76eaed44d9 syntax: move ast_map to librustc. 2015-06-10 02:40:45 +03:00
bors
2228ce10c6 Auto merge of #25836 - steveklabnik:gh25305, r=alexcrichton
Fixes #25794
2015-06-09 23:11:25 +00:00
Björn Steinbrink
96bc00f30e Use the correct type of undef value for ignored return values in trans_named_tuple_constructor
Fixes #26127
2015-06-10 00:07:47 +02:00
marcell
c5d0e2a073 Add missing #[inline] to methods related to char. 2015-06-09 23:58:00 +02:00
bors
ac67354392 Auto merge of #26150 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #26111, #26125, #26129, #26131, #26132, #26133, #26134, #26136, #26140, #26144
- Failed merges:
2015-06-09 21:36:03 +00:00
Steve Klabnik
6b6b380fd1 Rollup merge of #26144 - steveklabnik:static_doc_fix, r=alexcrichton
Fixes #25851

I am 99% sure this is true for all `static`s and not just `static mut`, yes?
2015-06-09 17:24:45 -04:00
Steve Klabnik
9bcae312a3 Rollup merge of #26140 - steveklabnik:gh25803, r=alexcrichton
As this example got changed, we stopped showing how to return self as
the first example, so this text is outdated.

Fixes #25803
2015-06-09 17:24:45 -04:00
Steve Klabnik
b38e9a73d4 Rollup merge of #26136 - steveklabnik:gh25597, r=alexcrichton
Fixes #25597
2015-06-09 17:24:44 -04:00
Steve Klabnik
d16906283a Rollup merge of #26134 - steveklabnik:gh25586, r=alexcrichton
After talking with @graydon on #rust-internals, this is hopefully clarifying.

Fixes #25586

@mkpankov, what do you think?
2015-06-09 17:24:44 -04:00
Steve Klabnik
496fe4d51a Rollup merge of #26133 - steveklabnik:gh25573, r=alexcrichton
This obscures more than it helps.

Fixes #25573
2015-06-09 17:24:44 -04:00
Steve Klabnik
8a55e5399f Rollup merge of #26132 - astraw:fix-demangle-comment, r=alexcrichton
Hi, I think the second example fails rule 3 described immediately above. This PR fixes that.
2015-06-09 17:24:44 -04:00
Steve Klabnik
91a9f82596 Rollup merge of #26131 - astraw:fix-trait-comment, r=alexcrichton
Hi, I think the comments are wrong in the example and this PR offers my suggested fix.
2015-06-09 17:24:43 -04:00
Steve Klabnik
67bb4e9356 Rollup merge of #26129 - steveklabnik:gh26012, r=brson
Fixes #26012
2015-06-09 17:24:43 -04:00
Steve Klabnik
c7de6aa342 Rollup merge of #26125 - nsimplex:master, r=steveklabnik
The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
2015-06-09 17:24:43 -04:00
Steve Klabnik
32c6deec07 Rollup merge of #26111 - tshepang:consistency, r=brson 2015-06-09 17:24:42 -04:00
Steve Klabnik
2c75256c15 Exise 'unsafe pointer' in favor of 'raw pointer'
Using two terms for one thing is confusing, these are called 'raw pointers' today.
2015-06-09 16:49:24 -04:00
Steve Klabnik
34e5c24c5d make note of slicing syntax in TRPL: strings
Fixes #25853
2015-06-09 16:37:47 -04:00
Steve Klabnik
9db9449836 Make note about static and dtors
Fixes #25851
2015-06-09 16:30:39 -04:00
Steve Klabnik
a3cd5eb1bd Exise 'owned pointer' from the codebase
Still some references left to this old term, I've updated them to say boxes.

Related to #25851
2015-06-09 16:26:21 -04:00
Steve Klabnik
b242a86864 Mention that enum constructors are functions
Fixes #25850
2015-06-09 16:12:45 -04:00
bors
f06e026578 Auto merge of #26039 - SimonSapin:case-mapping, r=alexcrichton
* Add “complex” mappings to `char::to_lowercase` and `char::to_uppercase`, making them yield sometimes more than on `char`: #25800. `str::to_lowercase` and `str::to_uppercase` are affected as well.
* Add `char::to_titlecase`, since it’s the same algorithm (just different data). However this does **not** add `str::to_titlecase`, as that would require UAX#29 Unicode Text Segmentation which we decided not to include in of `std`: https://github.com/rust-lang/rfcs/pull/1054 I made `char::to_titlecase` immediately `#[stable]`, since it’s so similar to `char::to_uppercase` that’s already stable. Let me know if it should be `#[unstable]` for a while.
* Add a special case for upper-case Sigma in word-final position in `str::to_lowercase`: #26035. This is the only language-independent conditional mapping currently in `SpecialCasing.txt`.
* Stabilize `str::to_lowercase` and `str::to_uppercase`. The `&self -> String` on `str` signature seems straightforward enough, and the only relevant issue I’ve found is #24536 about naming. But `char` already has stable methods with the same name, and deprecating them for a rename doesn’t seem worth it.

r? @alexcrichton
2015-06-09 20:00:32 +00:00
Steve Klabnik
a95b48c2dd Fix some copyediting in TRPL: method-syntax
As this example got changed, we stopped showing how to return self as
the first example, so this text is outdated.

Fixes #25803
2015-06-09 15:49:57 -04:00
Steve Klabnik
6c452bebc5 Remove numbers all together from not_found.html 2015-06-09 15:47:48 -04:00
Steve Klabnik
a0b08f387b Explain interaction with if and | in patterns
Fixes #26012
2015-06-09 15:40:09 -04:00
Steve Klabnik
6bddfc9650 Fix up macro grammar
Fixes #25623
2015-06-09 15:26:51 -04:00
Steve Klabnik
e12c420522 Expand a bit on clone() in Dining Philosophers
Fixes #25597
2015-06-09 15:24:44 -04:00
Steve Klabnik
a9899a7353 Clarify confusing sentence in TRPL: FFI
After talking with @graydon on #rust-internals, this is hopefully clarifying.

Fixes #25586
2015-06-09 15:17:30 -04:00
Steve Klabnik
f62ad7d7df remove stuff about #define
This obscures more than it helps.

Fixes #25573
2015-06-09 14:59:25 -04:00
Andrew Straw
1fff553fe7 fix comments in example about types 2015-06-09 20:49:52 +02:00
Andrew Straw
24c596c650 fix example in comments about demangling 2015-06-09 20:47:51 +02:00
Steve Klabnik
96c7a6b8fe Document str::split behavior with contiguous separators
This can be confusing when whitespace is the separator

Fixes #25986
2015-06-09 14:42:55 -04:00
bors
8a3f5af8c9 Auto merge of #25995 - alexcrichton:msvc-md, r=brson
On MSVC there are two ways that the CRT can be linked, either statically or
dynamically. Each object file produced by the compiler is compiled against
msvcrt (a dll) or libcmt (a static library). When the linker is dealing with
more than one object file, it requires that all object files link to the same
CRT, or else the linker will spit out some errors.

For now, compile code with `-MD` as it seems to appear more often in C libraries
so we'll stick with the same trend.
2015-06-09 18:26:26 +00:00
simplex
0a70c94d68 Semantic accuracy in borrow scope rules.
The text claimed 'any borrow must last for a _smaller_ scope than the
owner', however the accurate way of describing the comparison is
inclusive (i.e., 'less than or equal to' vs. 'less than').
2015-06-09 13:08:16 -03:00
Ulrik Sverdrup
4fdb4cfa89 Implement Borrow<T> and BorrowMut<T> for Box<T: ?Sized> 2015-06-09 16:15:38 +02:00
Marvin Löbel
d6b7ca041a Made ref pattern bindings correctly pick Deref or DerefMut
Added LvaluePreference::from_mutbl

Closes #15609
2015-06-09 16:02:00 +02:00
Simon Sapin
6369dcbad8 Move collectionstest::char into coretest::char 2015-06-09 13:08:29 +02:00
Simon Sapin
c6a8d5e733 Fix coretest::char::test_to_uppercase for complex mapping 2015-06-09 13:08:22 +02:00
bors
7b0f2af27f Auto merge of #26102 - retep998:openoptionsext, r=alexcrichton
r? @alexcrichton
2015-06-09 10:55:04 +00:00
bors
a9f50bdc16 Auto merge of #26068 - bluss:bench-sigfigs, r=huonw
test: Display benchmark results with thousands separators

Example display:

```
running 9 tests
test a ... bench:           0 ns/iter (+/- 0)
test b ... bench:          52 ns/iter (+/- 0)
test c ... bench:          88 ns/iter (+/- 0)
test d ... bench:         618 ns/iter (+/- 111)
test e ... bench:       5,933 ns/iter (+/- 87)
test f ... bench:      59,280 ns/iter (+/- 1,052)
test g ... bench:     588,672 ns/iter (+/- 3,381)
test h ... bench:   5,894,227 ns/iter (+/- 303,489)
test i ... bench:  59,112,382 ns/iter (+/- 1,500,110)
```

Fixes #10953
Fixes #26109
2015-06-09 09:12:09 +00:00
bors
6daf1dcb80 Auto merge of #26098 - russellmcc:add-ar-tool-flexible-target-spec, r=alexcrichton
Looks like this was missed from af56e2efde.

This will help with defining cross-compile workflows for rust.
2015-06-09 06:03:17 +00:00
bors
71a8d313c8 Auto merge of #25627 - murarth:execution-engine-fix, r=nrc
* Removes `RustJITMemoryManager` from public API.
  This was really sort of an implementation detail to begin with.
* `__morestack` is linked to C++ wrapper code and this pointer
  is used when resolving the symbol for `ExecutionEngine` code.
* `__morestack_addr` is also resolved for `ExecutionEngine` code.
  This function is sometimes referenced in LLVM-generated code,
  but was not able to be resolved on Mac OS systems.
* Added Windows support to `ExecutionEngine` API.
* Added a test for basic `ExecutionEngine` functionality.
2015-06-09 04:28:57 +00:00
bors
a35ea4d358 Auto merge of #26117 - Manishearth:rollup, r=Manishearth
- Successful merges: #25898, #25909, #25948, #25968, #26073, #26078, #26099, #26104, #26105, #26112, #26113
- Failed merges:
2015-06-09 01:34:24 +00:00
Ulrik Sverdrup
2b50c157d6 test: Display benchmark results with thousands separators
Example display:

```
running 9 tests
test a ... bench:           0 ns/iter (+/- 0)
test b ... bench:          52 ns/iter (+/- 0)
test c ... bench:          88 ns/iter (+/- 0)
test d ... bench:         618 ns/iter (+/- 111)
test e ... bench:       5,933 ns/iter (+/- 87)
test f ... bench:      59,280 ns/iter (+/- 1,052)
test g ... bench:     588,672 ns/iter (+/- 3,381)
test h ... bench:   5,894,227 ns/iter (+/- 303,489)
test i ... bench:  59,112,382 ns/iter (+/- 1,500,110)
```

Fixes #10953
Fixes #26109
2015-06-09 02:50:42 +02:00
Tshepang Lekhonkhobe
e2a1afa1c2 book: define trait 2015-06-09 02:32:29 +02:00
Manish Goregaokar
fd2c76cd94 Rollup merge of #26113 - tshepang:avoid-abbreviations, r=steveklabnik 2015-06-09 05:42:29 +05:30
Manish Goregaokar
38a606ac67 Rollup merge of #26112 - tshepang:readability, r=steveklabnik 2015-06-09 05:42:28 +05:30
Manish Goregaokar
0d6f11b09b Rollup merge of #26105 - tshepang:sentence-not-clear, r=steveklabnik 2015-06-09 05:42:28 +05:30
Manish Goregaokar
65eb6c072b Rollup merge of #26104 - saml:patch-1, r=steveklabnik
Cargo expects `lib` to be table, not an array of tables (only single lib per project).
2015-06-09 05:42:28 +05:30
Manish Goregaokar
4b5ac524f3 Rollup merge of #26099 - TheNeikos:fix-old_array_syntax_in_comments, r=alexcrichton
As per RFC#520 the syntax for arrays has changed,
this changes the remaining comments to reflect
the new syntax.

I checked for existing occurences of this with the following command:

`ag "\[., \.\..\]"` which by now should only return a single occurence.
2015-06-09 05:42:28 +05:30
Manish Goregaokar
c95da07eb0 Rollup merge of #26078 - diwic:patch-2, r=alexcrichton
It was determined that no leaks were unsafe, make the language reference clear about this.
2015-06-09 05:42:27 +05:30