Commit Graph

42527 Commits

Author SHA1 Message Date
Björn Steinbrink
02603334ae Fix major compile time regression
The assume intrinsic has a strong, negative impact on compile times, so
we're currently only using it in places where LLVM can simplify it to
nonnull metadata on a load intruction. Unfortunately a recent change
that fixed invalid assume calls introduce new assume calls for which
this simplification can not happen, leading to a massive regression in
compile times in certain cases.

Moving the assumptions from the middle of the function to the beginning
allows the simplification to happen again, bringing compile times back
to their old levels.

Fixes #25393
2015-05-15 03:31:53 +02:00
bors
b1bd3a3c51 Auto merge of #25338 - tamird:unignore-stage-tests, r=alexcrichton
We don't have any pending snapshot-requiring changes. Closes #20184.

Works toward #3965.
2015-05-14 09:04:45 +00:00
bors
0a1a53d693 Auto merge of #24741 - cgwalters:note-setenv-and-unsetenv-are-not-threadsafe, r=alexcrichton
See:
https://sourceware.org/bugzilla/show_bug.cgi?id=4887#c9
https://bugs.freedesktop.org/show_bug.cgi?id=65681

I just noticed this while talking to someone who was using
`os.environ['FOO'] = 'BAR'` in Python and since I'm learning Rust, I
was curious if it did anything special here (and the answer appears to
be no).

Java got this right by disallowing `setenv()` from the start.
2015-05-14 07:15:51 +00:00
bors
e77b03d783 Auto merge of #25238 - alexcrichton:fix-archive-with-slashes, r=brson
I've been working with some archives generated by MSVC's `lib.exe` tool lately,
and it looks like the embedded name of the members in those archives sometimes
have slahes in the name (e.g. `foo/bar/baz.obj`). Currently the compiler chokes
on these paths as it assumes that each file in the archive is only the filename
(which is what unix does).

This commit interprets the name of each file in all archives as a path and then
only uses the `file_name` portion of the path to extract the file to a separate
location and then reassemble it back into a new archive later. Note that
duplicate filenames are already handled, so this won't introduce any conflicts.
2015-05-14 05:25:43 +00:00
bors
1b5b6390ba Auto merge of #25065 - quantheory:fix_associated_const_ambiguity_message, r=nikomatsakis
This fixes #24922 and #25017, and reduces the number of error messages that talk about "methods" when associated constants rather than methods are involved.

I will admit that I haven't thought very carefully about the error messages. My goal has been to make more of the messages technically correct in all situations, and to avoid ICEs. But in some cases we could probably talk specifically about "methods" rather than "items".
2015-05-14 03:36:37 +00:00
Colin Walters
44a5bf1b7d libstd/env: Add non-Rust synchronization warnings for setenv()
See:
https://sourceware.org/bugzilla/show_bug.cgi?id=4887#c9
https://bugs.freedesktop.org/show_bug.cgi?id=65681

I just noticed this while talking to someone who was using
`os.environ['FOO'] = 'BAR'` in Python and since I'm learning Rust, I
was curious if it did anything special here.  It looks like Rust has
an internal mutex, which helps for apps that are pure Rust, but it
will be an evil trap for someone later adding in native code (apps
like Servo and games will be at risk).

Java got this right by disallowing `setenv()` from the start.

I suggest Rust program authors only use `setenv()` early in main.
2015-05-13 21:14:15 -04:00
bors
e5394240a2 Auto merge of #25208 - lfairy:version-hash, r=brson
The code takes a prefix of the MD5 hash of the version string.

Since the hash command differs across GNU and BSD platforms, we scan for
the right one in the configure script.

Closes #25007
2015-05-14 00:42:32 +00:00
Sean Patrick Santos
b4bbf3a88d Fix ICE that occurs when an associated const is ambiguous.
Also change several error messages to refer to "items" rather than
"methods", since associated items that require resolution during type
checking are not always methods.
2015-05-13 18:10:01 -06:00
Tamir Duberstein
f548a05542 Unignore some tests in stage1
We don't have any pending snapshot-requiring changes. Tests which
continue to be ignored are those that are broken by codegen changes.
2015-05-13 19:58:49 -04:00
Sean Patrick Santos
4774d5d9a1 Allow T::C syntax in match patterns to refer to trait-assosociated constants. 2015-05-13 17:39:16 -06:00
bors
5a341ecfc9 Auto merge of #25384 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25308, #25360, #25363, #25365, #25371, #25372, #25376, #25379, #25382
- Failed merges:
2015-05-13 21:56:56 +00:00
Steve Klabnik
87c903a95c Fix test failure in the reference 2015-05-13 17:53:57 -04:00
Steve Klabnik
a93c8b655f Rollup merge of #25382 - steveklabnik:typo_fix, r=alexcrichton
Thanks apdapreturns
2015-05-13 16:51:30 -04:00
Steve Klabnik
63f39a621b Rollup merge of #25379 - mpark:trpl, r=alexcrichton 2015-05-13 16:51:29 -04:00
Steve Klabnik
a96f09bf52 Rollup merge of #25376 - swaroopch:patch-2, r=steveklabnik
I don't recall reading about this `Debug` trait so far in the book. Please ignore this PR if I have missed that part.

r? @steveklabnik
2015-05-13 16:51:29 -04:00
Steve Klabnik
4c6527e807 Rollup merge of #25372 - steveklabnik:gh25355, r=alexcrichton
Fixes #25355
2015-05-13 16:51:29 -04:00
Steve Klabnik
1b0035ab84 Rollup merge of #25371 - steveklabnik:vec_macro_doc, r=alexcrichton
Add the repeating form of the vec macro

Remove unneeded literal annotations.

Use more conventional variable names.
2015-05-13 16:51:29 -04:00
Steve Klabnik
af447dd05f Rollup merge of #25365 - meqif:error-markdown, r=huonw
Reading through the rendered error explanations in http://doc.rust-lang.org/error-index.html, I noticed a few opportunities to improve the output.
2015-05-13 16:51:29 -04:00
Steve Klabnik
5ce5cf597e Rollup merge of #25363 - nham:E0106_E0107_fix, r=alexcrichton
cc #25328
2015-05-13 16:51:28 -04:00
Steve Klabnik
12c93aa278 Rollup merge of #25360 - steveklabnik:typo, r=alexcrichton
Thanks @quantheory!
2015-05-13 16:51:28 -04:00
Steve Klabnik
522ee203e0 Rollup merge of #25308 - nham:audit_ref_traits, r=alexcrichton
cc #16676
2015-05-13 16:51:28 -04:00
Steve Klabnik
22eb466dfd Fix typo
Thanks apdapreturns
2015-05-13 16:43:39 -04:00
Swaroop C H
f6e5369e53 trpl/error-handling - fix typo 2015-05-13 13:23:10 -07:00
Tamir Duberstein
cce30b2ae6 Remove errant line 2015-05-13 15:55:42 -04:00
Michael Park
ee57f28f49 TRPL: Fix a broken link to 'move semantics' 2015-05-13 11:41:25 -07:00
Swaroop C H
baef1327f4 Add link to Debug trait
I don't recall reading about this `Debug` trait so far in the book.
2015-05-13 09:49:11 -07:00
bors
222cd73b8a Auto merge of #25344 - arielb1:fresh-float, r=nikomatsakis
There is no subtyping relationship between the types (or their non-freshened
variants), so they can not be merged.

Fixes #22645
Fixes #24352
Fixes #23825

Should fix #25235 (no test in issue).
Should fix #19976 (test is outdated).
2015-05-13 15:42:45 +00:00
Steve Klabnik
378868ed4f Writer -> Write in macro docs
Fixes #25355
2015-05-13 10:47:33 -04:00
Steve Klabnik
96a3443712 Small cleanup to vec docs
Add the repeating form of the vec macro

Remove unneeded literal annotations.

Use more conventional variable names.
2015-05-13 10:44:37 -04:00
bors
af41097b49 Auto merge of #25333 - GSam:master, r=nrc
As it is, save-analysis appears to return the span for the 'mut' in a declaration 'static mut identifier...' instead of the identifier. This minor change appears to fix the problem, by skipping the mut when it is present.
2015-05-13 13:54:48 +00:00
bors
eb4cb6d16d Auto merge of #25318 - nrc:for-expn, r=sfackler
r? @sfackler
2015-05-13 12:07:11 +00:00
Ricardo Martins
06b084fc9f Markdown formatting for error explanations. 2015-05-13 12:12:19 +01:00
bors
67433c1a30 Auto merge of #25253 - robertfoss:master, r=brson 2015-05-13 10:19:12 +00:00
Nick Hamann
5ac262f86c Remove comment description of E0234.
This error code has been removed.
2015-05-13 04:22:17 -05:00
Nick Hamann
ba534f63c9 Add error explanations for E0049, E0050, E0106, E0107, E0166, E0201, E0322. 2015-05-13 04:22:07 -05:00
bors
dd9dcc1e28 Auto merge of #25024 - nrc:mulit-decor, r=sfackler 2015-05-13 08:31:17 +00:00
Steve Klabnik
4b5b9668e0 Fix a typo
Thanks @quantheory
2015-05-13 02:46:23 -04:00
bors
fa43387527 Auto merge of #24619 - nrc:rc-coerce, r=nikomatsakis
r? @nikomatsakis (note a few TODOs left in the code where I wasn't sure about stuff).
2015-05-13 06:43:05 +00:00
bors
30a42faa1c Auto merge of #25357 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25224, #25317, #25321, #25324, #25348
- Failed merges: #25174, #25334, #25341
2015-05-13 04:55:31 +00:00
Steve Klabnik
11f945cd00 Merge branch 'trpl_embedding' into rollup 2015-05-13 00:55:18 -04:00
Steve Klabnik
704fb9c2c9 Merge branch 'doc-fixes' of https://github.com/wheals/rust into rollup 2015-05-13 00:54:55 -04:00
Steve Klabnik
f26a2a6e89 Merge branch 'doc_release_channels' into rollup 2015-05-13 00:53:32 -04:00
Steve Klabnik
dd11c7f047 Rollup merge of #25348 - geofft:trpl-fix-enums, r=steveklabnik
The enums chapter at the moment is ... weird. The examples aren't about enums, they're about structs, and most of the chapter talks about how enums don't support comparison operators by default (which is also true of other compound data types.) I think there was a story here once, but some coherency got lost in refactoring.

There are two preliminary patches here, one to combine the struct and tuple-struct chapters, and one to document unit-like structs, because enum syntax is easier to explain once you have those three. The final patch moves the enum chapter after the struct chapter, and rewrites most of it to talk about enums usefully (including covering matches on enums).

r? @steveklabnik
2015-05-13 00:52:49 -04:00
Steve Klabnik
e8c69e5406 Rollup merge of #25324 - richo:richo-compat, r=huonw
This makes the compatibility matrix render a little nicer on github, and also removes a note about windows support from 0.12 (Which is immaterial now that we're approaching 1.0)
2015-05-13 00:52:49 -04:00
Steve Klabnik
7964d4e512 Rollup merge of #25321 - steveklabnik:second_tutorial, r=alexcrichton
This is a little rough, and it needs squashed and section headers, but i'd like to get some eyes on it sooner rather than later.
2015-05-13 00:52:48 -04:00
Steve Klabnik
fe8a4e3dbf Rollup merge of #25317 - steveklabnik:trpl_drop, r=alexcrichton
r? @alexcrichton
2015-05-13 00:52:48 -04:00
Steve Klabnik
3dee0df025 Rollup merge of #25224 - brson:stddoc, r=steveklabnik
Attempted to organize them in a way more relevant to what newbies
would be interested in hearing.

I am not satisfied by this at all, but by virtue of deleting old links alone I think it is an improvement.

r? @steveklabnik
2015-05-13 00:52:48 -04:00
Nick Cameron
b799cd83cc Remove SNAP comments 2015-05-13 16:37:17 +12:00
Nick Hamann
b2f486feaf Improve wording for the "Trait objects" section of the reference. 2015-05-12 23:35:27 -05:00
Nick Hamann
857a12a01e Expand the "Traits" section of the reference. 2015-05-12 23:33:10 -05:00