Commit graph

41977 commits

Author SHA1 Message Date
Steve Klabnik
585c7e2a0a Fix broken links in the book. 2015-04-30 16:00:44 -04:00
Steve Klabnik
8c38dfd537 Describe (a,) vs (a) in docs
Fixes #24730
2015-04-30 15:10:58 -04:00
bors
e962870420 Auto merge of #24975 - michaelsproul:enum-diagnostics, r=pnkfelix
Explanations for E0079, E0080, E0081, E0082, E0083 and E0084 as part of #24407.

All the errors concern the use of `#[repr(X)]` with enum types.

I also updated the short description for E0079 so that it takes sign into account.
2015-04-30 18:59:11 +00:00
Steve Klabnik
0b06fd70c8 Fix code sample, remove unstable code
Fixes #24977
2015-04-30 14:17:56 -04:00
Steve Klabnik
91e5481218 Fix two issues with TRPL: unsized types
First, a link was broken.

Second, the wording was a bit unclear, so I fixed it up.

Fixes #24852
2015-04-30 13:41:26 -04:00
Ariel Ben-Yehuda
30a5448d25 address review comments 2015-04-30 20:35:10 +03:00
bors
2568a4d8c5 Auto merge of #24924 - carols10cents:grammar-improvements, r=pnkfelix
I'm interested in helping out with #16676 but more in the grammar than the reference-- here's my first chunk, more to come!! 🎉 

I did pull a bit *out* of the reference, though, that was more relevant to the grammar but wasn't moved over as part of #24729.

I'm looking at, e.g. https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs, as the source of truth, please let me know if I should be checking against something else instead/in addition.

r? @steveklabnik
2015-04-30 17:07:14 +00:00
Alex Crichton
543b910f9b rustdoc: Fix rendering associated constants
Associated constants were now showing up for traits and would panic if they were
found on an inherent impl. This commit unblocks the nighly builders.
2015-04-30 09:37:13 -07:00
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
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
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
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
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
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
Alex Crichton
b0f920ace4 rollup merge of #24904: steveklabnik/remove_std_net_warning
This is served by stability markers.
2015-04-29 15:45:45 -07:00
Alex Crichton
91dfc38979 rollup merge of #24903: pnkfelix/fsk-enum-swapindrop
rename `schedule_drop_{enum,adt}_contents`.

addresses review nit from #24765 (it was my mistake for not doing this earlier before it landed).
2015-04-29 15:45:44 -07:00
Alex Crichton
4ff558cdba rollup merge of #24894: bguiz/diagnostic-E0267
This error indicates that a constant references itself.
All constants need to resolve to a value in an acyclic manner.

For example, neither of the following can be sensibly compiled:

```
const X: u32 = X;
```

```
const X: u32 = Y;
const Y: u32 = X;
```
2015-04-29 15:45:43 -07:00