Commit Graph

42605 Commits

Author SHA1 Message Date
Sébastien Marie
27bcd2ebc7 remove denied unused import: pid_t in raw
- unbreak the build under openbsd
- while here, apply same modification to dragonfly, freebsd, ios (pid_t
  imported, but not used in raw.rs)
2015-04-30 17:26:53 +02:00
bors
2f613bfaeb Auto merge of #24902 - bombless:configure, r=pnkfelix
Closes #24840
2015-04-30 15:16:24 +00:00
Valerii Hiora
e50df770cc Fixed iOS build 2015-04-30 16:44:48 +03:00
York Xiang
98b7aaf3ef Mention --enable-optimize for --enable-debug 2015-04-30 21:39:52 +08:00
Poga Po
8a20b994ea remove newline within link tag 2015-04-30 21:28:49 +08:00
Felix S. Klock II
f40d9d9ea0 Regression tests for #24805.
The new functionality being tested here is that a drop impl bounded by
`UserDefined` does not cause dropck to inject its conservative
constraints on region inference.
2015-04-30 14:27:53 +02:00
Felix S. Klock II
db88e5a498 dropck: Rejectways trait bounds can indirectly access borrowed data.
Namely, we need to catch cases like `trait Child : Parent { }` where
`Parent` itself defines methods.
2015-04-30 14:27:53 +02:00
Felix S. Klock II
c76d66e923 Generalize dropck to ignore item-less traits.
Fix #24805

(see follow-on commit for test.)
2015-04-30 14:27:53 +02:00
Ariel Ben-Yehuda
7ae4a8e9f3 Use hash-tables in trait selection
Puts implementations in bins hashed by the fast-reject key, and
only looks up the relevant impls, reducing O(n^2)-ishness

Before: 688.92user 5.08system 8:56.70elapsed 129%CPU (0avgtext+0avgdata 1208164maxresident)k, LLVM 379.142s
After: 637.78user 5.11system 8:17.48elapsed 129%CPU (0avgtext+0avgdata 1201448maxresident)k LLVM 375.552s

Performance increase is +7%-ish
2015-04-30 15:10:52 +03:00
Ariel Ben-Yehuda
bd1f73420a Stop using Rc in TraitRef and TraitDef
The former stopped making sense when we started interning substs and made
TraitRef a 2-word copy type, and I'm moving the latter into an arena as
they live as long as the type context.
2015-04-30 15:09:11 +03:00
bors
f9ecc6e888 Auto merge of #24892 - robinst:issue-24407-E0010, r=pnkfelix
Part of #24407.
2015-04-30 12:01:44 +00:00
Nick Cameron
b2ddd937b2 Merge branch 'master' into mulit-decor 2015-04-30 22:30:50 +12:00
Johannes Oertel
3e83f2bc78 Add regression test for #22468
Closes #22468.
2015-04-30 12:24:56 +02:00
Michael Sproul
63e63218a1 Add long diagnostics for enum repr errors. 2015-04-30 20:24:30 +10:00
Johannes Oertel
19717cbf46 Add regression test for #24446
Closes #24446.
2015-04-30 12:16:21 +02:00
bors
42bfeec53c Auto merge of #24842 - GBGamer:patch-3, r=steveklabnik
They now use the currently working syntax.

Also, I added two examples.
2015-04-30 10:13:05 +00:00
Ruud van Asseldonk
414dfb13df rustc: Improve long diagnostics for E0282
The new example uses a `char` iterator instead of `i32`, to avoid interplay
between type inference and the default type for integer literals.
2015-04-30 11:51:40 +02:00
Nick Cameron
c0a42aecbc WIP refactor expansion of decorators and move derive to MultiDecorator 2015-04-30 20:29:45 +12:00
bors
b594036069 Auto merge of #24970 - Hech:master, r=steveklabnik 2015-04-30 07:12:25 +00:00
bors
f0bd14f7b1 Auto merge of #24960 - tynopex:patch-doc, r=alexcrichton
- Removed misleading comments about now-defunct CreatePipe
- Actually use std::process::Child in it's example
- Minor cleanups
2015-04-30 04:44:47 +00:00
Rory O’Kane
6ce05ae6bb Fix style warning, “line longer than 100 chars”
Error was noted at https://travis-ci.org/rust-lang/rust/builds/60643081#L371

I didn’t just put the content of the node on another line, because that would add spaces around the element content, messing up the JavaScript that checks what the content is.
2015-04-30 00:25:37 -04:00
Rory O’Kane
fc9bddd105 Change docs toggle href from # to javascript:
So that when you click the link, the URL doesn’t get # appended to it.

The non-page-global docs toggle link, which is created in `main.js`, already uses this `href` value.
2015-04-30 00:09:46 -04:00
Rory O’Kane
2258aef74f Fix doc [−] button bug by escaping differently
The cause of the problem is described here: https://github.com/rust-lang/rust/pull/24797#issuecomment-97049765 .

I tested this new `main.js` by changing the `main.js` content of a rendered docs page to this new content. The [−] button worked again.
2015-04-30 00:07:42 -04:00
Carol Nichols
2fdd1b0198 Remove priv from tests that aren't testing deprecated priv 2015-04-29 22:53:22 -04:00
Carol Nichols
31b7001b49 Remove mention of 'priv'; visibility is either PUB or nothing 2015-04-29 22:47:10 -04:00
Carol Nichols
899d4180ef Remove lingering mention of 'priv' in the reference 2015-04-29 22:43:26 -04:00
bors
ac5f595d0a Auto merge of #24884 - michaelsproul:extended-errors, r=nrc
I've been working on improving the diagnostic registration system so that it can:

* Check uniqueness of error codes *across the whole compiler*. The current method using `errorck.py` is prone to failure as it relies on simple text search - I found that it breaks when referencing an error's ident within a string (e.g. `"See also E0303"`).
* Provide JSON output of error metadata, to eventually facilitate HTML output, as well as tracking of which errors need descriptions. The current schema is:

```
<error code>: {
    "description": <long description>,
    "use_site": {
        "filename": <filename where error is used>,
        "line": <line in file where error is used>
    }
}
```

[Here's][metadata-dump] a pretty-printed sample dump for `librustc`.

One thing to note is that I had to move the diagnostics arrays out of the diagnostics modules. I really wanted to be able to capture error usage information, which only becomes available as a crate is compiled. Hence all invocations of `__build_diagnostics_array!` have been moved to the ends of their respective `lib.rs` files. I tried to avoid moving the array by making a plugin that expands to nothing but couldn't invoke it in item position and gave up on hackily generating a fake item. I also briefly considered using a lint, but it seemed like it would impossible to get access to the data stored in the thread-local storage.

The next step will be to generate a web page that lists each error with its rendered description and use site. Simple mapping and filtering of the metadata files also allows us to work out which error numbers are absent, which errors are unused and which need descriptions.

[metadata-dump]: https://gist.github.com/michaelsproul/3246846ff1bea71bd049
2015-04-30 02:03:27 +00:00
Robin Stocker
95ad630187 Add error explanation for E0010 2015-04-30 11:21:04 +10:00
Hech
f8b63e867d docs: link fix 2015-04-29 17:30:46 -07:00
bors
5449f5d29e Auto merge of #24967 - alexcrichton:rollup, r=alexcrichton 2015-04-30 00:07:10 +00:00
Alex Crichton
1b34c099a6 Test fixes and rebase conflicts 2015-04-29 17:05:20 -07:00
Michael Sproul
d27230bb6d Add metadata output to the diagnostics system.
Diagnostic errors are now checked for uniqueness across the compiler and
error metadata is written to JSON files.
2015-04-30 08:59:53 +10:00
Ruud van Asseldonk
6b292cd4c4 rustc: Add long diagnostics for E0282 2015-04-30 00:58:43 +02:00
Ruud van Asseldonk
52e520e902 rustc: Improve misleading error message for E0282
The error can also occur in cases where a type annotation will not help.
2015-04-30 00:56:33 +02:00
Alex Crichton
2edb6438cb rollup merge of #24921: tamird/bitflags-associated-const
Conflicts:
	src/librustc/lib.rs
2015-04-29 15:49:07 -07:00
Alex Crichton
cc04cd4bb1 rollup merge of #24873: alexcrichton/fix-windows-stdio
Conflicts:
	src/libstd/sys/windows/fs2.rs
2015-04-29 15:48:38 -07:00
Alex Crichton
873a4e366d rollup merge of #24962: tamird/unignore-android-tests
r? @alexcrichton I've tested these locally, so they should all be good to go.
2015-04-29 15:45:58 -07:00
Alex Crichton
bc4b1932ca rollup merge of #24961: nham/net_docs_cleanup
Changes made include adding missing punctuation, adding missing words, and converting uses of "Gets" to "Returns" in libstd/net/addr.rs to make it more consistent with the other documentation.

Fixes #24925.
2015-04-29 15:45:57 -07:00
Alex Crichton
2c28348374 rollup merge of #24953: tamird/android-pie
This is OK to do given:
  - PIE is supported on Android starting with API 16.
  - The bots are running API 18.
  - API < 16 now has a 12.5% market share[0] as of 2015-04-29.

Closes #17437.

[0] https://developer.android.com/about/dashboards/index.html

r? @alexcrichton
2015-04-29 15:45:56 -07:00
Alex Crichton
50b3dce47e rollup merge of #24952: pnkfelix/put-back-missing-dash-g-in-24687-test
Add `-g` (to testcase) that I should have included in PR #24932.

Note it is safe, with respect to autobuilds, to land before #24945.

(In other words, landing this sooner won't break things for anyone any
worse than they were already broken, since there are *other* tests
that also add `-g` to their flags via `compile-flags: -g`.)
2015-04-29 15:45:55 -07:00
Alex Crichton
5d85d8d800 rollup merge of #24945: pnkfelix/fixes-for-dash-g-handling
Fixes for -g handling

First:
 * decouples our handling of `-g` for the test suite from our handling of `-g` for the rest of the compiler/stdlib building.
 * Namely, if you do `--enable-debug` or `--enable-debuginfo`, that should only affect `rustc` and the standard library crates; the tests should all continue to compile without `-g` unless:
   * you pass `--enable-debuginfo-tests`, or
   * the test itself requests the `-g` option (e.g. via a `// compile-flags: -g` embedded comment).

Second:
 * Makes `rustc` more flexible in that it now accepts multiple occurrences of `-g -g`
 * (as a drive-by, I gave `-O` the same treatment: multiple occurrences of `-O` are treated as synonymous as a single occurrence of `-O`.

Fix #24937
2015-04-29 15:45:54 -07:00
Alex Crichton
373d6202cf rollup merge of #24935: pnkfelix/lint-repr-c-drop
Lint: warn when mixing `#[repr(C)]` with Drop

Fix #24585
2015-04-29 15:45:53 -07:00
Alex Crichton
0cca57712d rollup merge of #24933: oli-obk/patch-1
compiler plugins are hosted unter "compiler-plugins.html" not "plugins.html"
2015-04-29 15:45:52 -07:00
Alex Crichton
dd12c8b46f rollup merge of #24931: jooert/patch-1
Since #24783, the style guidelines recommend that unit tests should live in a submodule `tests` rather than `test` to not clash with the possible use of libtest. This is especially important for benchmark tests as they require libtest. Fixes #24923.
2015-04-29 15:45:51 -07:00
Alex Crichton
416e4127e9 rollup merge of #24930: nrc/save-fn 2015-04-29 15:45:50 -07:00
Alex Crichton
62bd19fff2 rollup merge of #24929: tamird/unstub-some-tests
r? @alexcrichton
2015-04-29 15:45:49 -07:00
Alex Crichton
b9b1312f53 rollup merge of #24926: frewsxcv/patch-20 2015-04-29 15:45:49 -07:00
Alex Crichton
7510bfebb6 rollup merge of #24917: zecozephyr/nullptropt 2015-04-29 15:45:47 -07:00
Alex Crichton
fa661286db rollup merge of #24911: GBGamer/patch-4 2015-04-29 15:45:46 -07:00
Alex Crichton
0eaa811f4c rollup merge of #24908: inrustwetrust/once_memory_ordering
`call_once` guarantees that there is a happens-before relationship between its closure and code following it via the sequentially consistent atomic store/loads of `self.cnt`.
2015-04-29 15:45:45 -07:00