Commit Graph

49460 Commits

Author SHA1 Message Date
Vadim Petrochenkov
ccb4b35897 Preserve struct/variant kinds in metadata
Add tests for use of empty structs in cross-crate scenarios
2016-01-15 19:57:53 +03:00
bors
1f4e317e45 Auto merge of #30929 - Manishearth:rollup, r=Manishearth
- Successful merges: #30591, #30781, #30836, #30864, #30896, #30898, #30908, #30921, #30925
- Failed merges:
2016-01-15 11:59:11 +00:00
Manish Goregaokar
4f8d584aa5 Rollup merge of #30925 - semarie:blksize_t, r=alexcrichton
make `os::raw::tests::unix` test to pass again

r? @alexcrichton
2016-01-15 17:28:29 +05:30
Manish Goregaokar
22cbdd4b89 Rollup merge of #30864 - jseyfried:no_record_exports, r=nrc 2016-01-15 17:28:29 +05:30
Manish Goregaokar
d9d902ef99 Rollup merge of #30836 - Luke-Nukem:master, r=steveklabnik
Ref issue [30825](https://github.com/rust-lang/rust/issues/30825)

This commit should suffice to add a concise introduction to the concept of crates.
My only worry, is that it is maybe too concise; but, the book seems to be written with the understanding that the new Rust user is coming from another language, and so will understand what a Library or Code Package is.
2016-01-15 17:28:28 +05:30
Manish Goregaokar
56cae9f507 Rollup merge of #30787 - nikomatsakis:future-incompatible-lint, r=brson
There is now more structure to the report, so that you can specify e.g. an RFC/PR/issue number and other explanatory details.

Example message:

```
type-parameter-invalid-lint.rs:14:8: 14:9 error: defaults for type parameters are only allowed on type definitions, like `struct` or `enum`
type-parameter-invalid-lint.rs:14 fn avg<T=i32>(_: T) {}
                                         ^
type-parameter-invalid-lint.rs:14:8: 14:9 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
type-parameter-invalid-lint.rs:14:8: 14:9 note: for more information, see PR 30742 <https://github.com/rust-lang/rust/pull/30724>
type-parameter-invalid-lint.rs:11:9: 11:28 note: lint level defined here
type-parameter-invalid-lint.rs:11 #![deny(future_incompatible)]
                                          ^~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
```

r? @brson

I would really like feedback also on the specific messages!

Fixes #30746
2016-01-15 17:28:28 +05:30
Manish Goregaokar
8637da87b6 Rollup merge of #30781 - dhuseby:add_dragonflybsd_snapshot_3391630, r=alexcrichton
@alexcrichton please upload the following snapshots:

https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-12-18-3391630-dragonfly-x86_64-e74d79488e88ac2de3bd03afd5959d2ae6e2b628.tar.bz2

thanks!
2016-01-15 17:28:28 +05:30
Manish Goregaokar
7208d25003 Rollup merge of #30776 - antonblanchard:powerpc64_merge, r=alexcrichton
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
2016-01-15 17:28:28 +05:30
Manish Goregaokar
ad83ea6a65 Rollup merge of #30591 - SimonSapin:patch-15, r=aturon
The first line (paragraph?) of a doc-comment is what rustdoc shows when listing items of a module.

What makes `Instant` and `SystemTime` different is important enough to be there. (Though feel free to bikeshed the wording.)
2016-01-15 17:28:28 +05:30
bors
a70a60a02b Auto merge of #30763 - gchp:issue/30033, r=nagisa
This is achieved by adding the scan_back method. This method looks back
through the source_text of the StringReader until it finds the target
char, returning it's offset in the source. We use this method to find
the offset of the opening single quote, and use that offset as the start
of the error.

Given this code:

```rust
fn main() {
    let _ = 'abcd';
}
```

The compiler would give a message like:

```
error: character literal may only contain one codepoint: ';
let _ = 'abcd';
             ^~
```
With this change, the message now displays:

```
error: character literal may only contain one codepoint: 'abcd';
let _ = 'abcd';
        ^~~~~~~
```

Fixes #30033
2016-01-15 06:38:26 +00:00
bors
d8869d3487 Auto merge of #30711 - nrc:json-errs, r=huonw
The compiler can emit errors and warning in JSON format. This is a more easily machine readable form then the usual error output.

Closes #10492, closes #14863.
2016-01-15 01:52:01 +00:00
Nick Cameron
82f8e5ce84 Address reviewer comments
[breaking-change]

`OptLevel` variants are no longer `pub use`ed by rust::session::config. If you are using these variants, you must change your code to prefix the variant name with `OptLevel`.
2016-01-15 14:49:25 +13:00
Luke Jones
52786de3ed Clarify what a crate is, within the "Getting Started" chapter.
* ref: Issue #30825
Small punctuation change in "Crates and Modules".
2016-01-15 14:18:50 +13:00
Jeffrey Seyfried
a353490e6f resolve: Remove record_exports, fixes #4953 2016-01-14 22:51:58 +00:00
bors
2fb0c5ebcf Auto merge of #30916 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30712, #30895, #30902, #30903, #30909, #30910, #30911, #30912, #30914
- Failed merges:
2016-01-14 22:23:59 +00:00
Nick Cameron
11dcb48c6a Add a test
And fix bustage in make check
2016-01-15 10:24:12 +13:00
Nick Cameron
b976d9e666 Implement JSON error emission
[breaking-change]

syntax::errors::Handler::new has been renamed to with_tty_emitter

Many functions which used to take a syntax::errors::ColorConfig, now take a rustc::session::config::ErrorOutputType. If you previously used ColorConfig::Auto as a default, you should now use ErrorOutputType::default().
2016-01-15 10:24:12 +13:00
Nick Cameron
fd46c78f8f Add an --output option for specifying an error emitter 2016-01-15 10:24:12 +13:00
Nick Cameron
acfccc515b Add a JSON error emitter 2016-01-15 10:20:30 +13:00
bors
c12c42de0a Auto merge of #30913 - brson:nogold, r=alexcrichton
This reverts commit 34dc0e0739.

cc #30783 #30784 #29974

r? @alexcrichton
2016-01-14 20:32:13 +00:00
Steve Klabnik
6ab39ff098 Rollup merge of #30914 - tshepang:easier-description, r=steveklabnik
This function returns the size on the stack, not that of the value
that may be allocated on the heap.
2016-01-14 14:58:35 -05:00
Steve Klabnik
9ffb84a784 Rollup merge of #30912 - tshepang:remove-distraction, r=steveklabnik 2016-01-14 14:58:35 -05:00
Steve Klabnik
9b10d0e1e5 Rollup merge of #30911 - tshepang:missing-word, r=Manishearth
Also, whitespace fixes
2016-01-14 14:58:35 -05:00
Steve Klabnik
958bff100a Rollup merge of #30910 - tshepang:improve-description, r=steveklabnik 2016-01-14 14:58:35 -05:00
Steve Klabnik
b3950b7ca5 Rollup merge of #30909 - tshepang:a-better-name, r=steveklabnik
For a moment, I got confused by thinking the summary was referring to the same `x`
2016-01-14 14:58:34 -05:00
Steve Klabnik
f1a0fd127a Rollup merge of #30903 - steveklabnik:no_std_stable, r=alexcrichton
This feature is partially stabilized, so describe each part in the appropriate place.

r? @alexcrichton @brson

It would be nice to backport this to beta, since this is the first release where this is true. I try really hard to not do doc backports, but this isn't very large, and might be worth making an exception, I dunno.
2016-01-14 14:58:34 -05:00
Steve Klabnik
72ebb193a9 Rollup merge of #30902 - tomaka:patch-1, r=steveklabnik 2016-01-14 14:58:34 -05:00
Steve Klabnik
c88574a32b Rollup merge of #30895 - gchp:contrib, r=alexcrichton
'B' labels are for blockers, not issues which belong elsewhere.

Prompted by this comment on Reddit:
https://www.reddit.com/r/rust/comments/40nzkd/contributing_to_the_rust_compiler_a_short_guide/cyxcjtd
2016-01-14 14:58:34 -05:00
Steve Klabnik
e26279db48 Rollup merge of #30712 - LawrenceWoodman:patch-3, r=steveklabnik
This also repeats the case analysis used.
2016-01-14 14:58:34 -05:00
Tshepang Lekhonkhobe
dfdbbd005a doc: this is more easy to read, and less prone mis-interpretation
This function returns the size on the stack, not that of the value
that may be allocated on the heap.
2016-01-14 21:38:18 +02:00
Brian Anderson
4bcca8bcf7 Revert "Link with ld.gold by default"
This reverts commit 34dc0e0739.
2016-01-14 19:20:11 +00:00
Sébastien Marie
b1d8554698 update blksize_t in raw to reflect libc change under openbsd 2016-01-14 20:15:19 +01:00
Tshepang Lekhonkhobe
f7fb0af729 doc: that suffix serves as mere distraction 2016-01-14 21:08:15 +02:00
Tshepang Lekhonkhobe
049b9e4e80 doc: add missing word
Also, whitespace fixes
2016-01-14 20:56:38 +02:00
Tshepang Lekhonkhobe
80d2be947e doc: "x" is used as variable name on this API, so avoid using it here 2016-01-14 20:54:49 +02:00
Tshepang Lekhonkhobe
7d446ce555 doc: "moves" has a specific meaning in Rust, so avoid using it here 2016-01-14 20:52:51 +02:00
Greg Chapple
acc9428c6a Display better snippet for invalid char literal
Given this code:

    fn main() {
        let _ = 'abcd';
    }

The compiler would give a message like:

    error: character literal may only contain one codepoint: ';
    let _ = 'abcd';
                 ^~

With this change, the message now displays:

    error: character literal may only contain one codepoint: 'abcd'
    let _ = 'abcd'
            ^~~~~~

Fixes #30033
2016-01-14 17:34:42 +00:00
tomaka
729e566020 Fix outdated comment 2016-01-14 16:47:29 +01:00
Steve Klabnik
0394418752 Move some #[no_std] info to stable book.
This feature is partially stabilized, so describe each part in the appropriate place.
2016-01-14 10:45:40 -05:00
bors
e5bab5dd00 Auto merge of #30848 - nagisa:mir-no-store-zsts, r=nikomatsakis
Fixes #30831

r? @nikomatsakis
2016-01-14 15:37:07 +00:00
bors
02fbf31fb2 Auto merge of #30897 - Manishearth:rollup, r=Manishearth
- Successful merges: #30821, #30869, #30871, #30874, #30879, #30886, #30892
- Failed merges: #30864
2016-01-14 13:42:59 +00:00
Manish Goregaokar
a964c86d45 Rollup merge of #30892 - shepmaster:box-grammar, r=alexcrichton 2016-01-14 19:12:29 +05:30
Manish Goregaokar
92aa326920 Rollup merge of #30886 - ollie27:docs_links, r=steveklabnik
r? @steveklabnik
2016-01-14 19:12:29 +05:30
Manish Goregaokar
f28a43102b Rollup merge of #30879 - durka:collections-range-tracking-issue, r=nagisa
see #27711 and #30877

r? @alexcrichton
2016-01-14 19:12:29 +05:30
Manish Goregaokar
74458cf42a Rollup merge of #30874 - dhuseby:fixing_bitrig_tests, r=alexcrichton
fixes the failing bitrig unit tests.
2016-01-14 19:12:28 +05:30
Manish Goregaokar
9cb4350e63 Rollup merge of #30871 - oli-obk:fix/reference, r=steveklabnik
r? @steveklabnik
2016-01-14 19:12:28 +05:30
Manish Goregaokar
7893031d92 Rollup merge of #30869 - D101101:patch-3, r=huonw
r? @steveklabnik
2016-01-14 19:12:28 +05:30
Manish Goregaokar
07aaca3a07 Rollup merge of #30821 - steveklabnik:gh30819, r=nikomatsakis
Fixes #30819
2016-01-14 19:12:28 +05:30
Greg Chapple
a5836fa48f Fix note about B-prefixed issue labels
'B' labels are for blockers, not issues which belong elsewhere.

Prompted by this comment on Reddit:
https://www.reddit.com/r/rust/comments/40nzkd/contributing_to_the_rust_compiler_a_short_guide/cyxcjtd
2016-01-14 10:47:04 +00:00
bors
5b3a75fe56 Auto merge of #30883 - Manishearth:rollup, r=Manishearth
- Successful merges: #30626, #30662, #30770, #30801, #30818, #30823, #30828, #30835, #30837, #30839, #30845, #30848, #30850, #30851, #30863
- Failed merges:
2016-01-14 06:45:26 +00:00