Commit Graph

64033 Commits

Author SHA1 Message Date
Mark Simulacrum
6e29059c3e Rollup merge of #41940 - est31:master, r=eddyb
config.toml.example: point out that optimize = false won't speed up a full bootstrap

Originally I've learned about this by @eddyb pointing this out to me over IRC, and after having told someone today the same over IRC I've thought that this is a common mistake and should be prevented by a note in config.toml.example

r? @eddyb
2017-05-12 18:57:36 -06:00
Mark Simulacrum
ac02b64bc5 Rollup merge of #41935 - iKevinY:detect-empty-files, r=Mark-Simulacrum
Add tidy check to detect empty files

Addresses #18439.
2017-05-12 18:57:35 -06:00
Mark Simulacrum
f6bf99af5c Rollup merge of #41934 - est31:remove_unused_macros, r=nagisa
Remove unused macros from the codebase

Thanks to the lint I've implemented in #41907 I've found some unused macros inside the rustc codebase.
2017-05-12 18:57:34 -06:00
Mark Simulacrum
cf4fac6ec5 Rollup merge of #41923 - eddyb:issue-41744, r=arielb1
rustc_trans: do not attempt to truncate an i1 const to i1.

Fixes #41744 by skipping the truncation when it'd be a noop anyway.
2017-05-12 18:57:33 -06:00
Mark Simulacrum
ee1c102cac Rollup merge of #41921 - GuillaumeGomez:fix-search-style, r=steveklabnik
Fix search when looking to sources

Before:

<img width="1440" alt="screen shot 2017-05-11 at 22 33 28" src="https://cloud.githubusercontent.com/assets/3050060/25970761/03fd2ade-369a-11e7-9fd6-783c23455589.png">

After:

<img width="1440" alt="screen shot 2017-05-11 at 22 34 05" src="https://cloud.githubusercontent.com/assets/3050060/25970770/09ac71ce-369a-11e7-9038-559f414e07b5.png">

r? @rust-lang/docs
2017-05-12 18:57:32 -06:00
Mark Simulacrum
cde12ee198 Rollup merge of #41918 - brson:lic, r=alexcrichton
Annotate the license exceptions
2017-05-12 18:57:32 -06:00
Mark Simulacrum
82c3163461 Rollup merge of #41916 - mglagla:typo, r=sfackler
Fix typo in Iterator::size_hint example comment
2017-05-12 18:57:31 -06:00
Mark Simulacrum
8b62560393 Rollup merge of #41912 - oli-obk:patch-3, r=eddyb
Upgrade some comments to doc comments
2017-05-12 18:57:30 -06:00
Mark Simulacrum
605d727bb3 Rollup merge of #41896 - tshepang:too-long, r=steveklabnik
doc: break into 2 sentences
2017-05-12 18:57:29 -06:00
Mark Simulacrum
1f7266205f Rollup merge of #41876 - oli-obk:diagnosing_diagnostics, r=nagisa
Refactor suggestion diagnostic API to allow for multiple suggestions

r? @jonathandturner

cc @nrc @petrochenkov
2017-05-12 18:57:28 -06:00
Mark Simulacrum
2519e90f95 Rollup merge of #41860 - mbrubeck:docs, r=nagisa
Remove wrong or outdated info from CString docs.

None
2017-05-12 18:57:27 -06:00
Mark Simulacrum
88a5af73ae Rollup merge of #41820 - devurandom:patch-1, r=alexcrichton
bootstrap: Output name of failed config in case of errors
2017-05-12 18:57:26 -06:00
bors
e17a1227ac Auto merge of #41926 - arielb1:box-mir, r=eddyb
box large variants in MIR

Operand: 72 -> 24 B
Statement: 192 -> 96 B
Terminator: 256 -> 112 B
librustc translation memory usage: 1795 -> 1669 MB

next step would be interning lvalues, I suppose?

cc #36799 (@urschrei - does ostn15_phf compile with this PR?)

r? @eddyb
2017-05-12 17:34:39 +00:00
Kevin Yap
99bca6e8c9 Add tidy check to detect empty files
Addresses #18439.
2017-05-12 09:57:31 -07:00
est31
b47aa1b34d config.toml.example: add note that optimize = false won't speed up a full bootstrap 2017-05-12 13:33:38 +02:00
Oliver Schneider
3f2bbe3f4f Don't use a DUMMY_SP for reporting issues with crate imports 2017-05-12 11:21:34 +02:00
Oliver Schneider
a54bbf2cb3 Weave the span of an import through the resolve code 2017-05-12 11:21:11 +02:00
est31
80891f6e47 Remove some unused macros from the rust codebase
Removes unused macros from:
  * libcore
  * libcollections
    The last use of these two macros was removed in commit
    b64c9d5670
    when the char_range_at_reverse function was been removed.
  * librustc_errors
    Their last use was removed by commits
    2f2c3e1783
    and 11dc974a38.
  * libsyntax_ext
  * librustc_trans
    Also, put the otry macro in back/msvc/mod.rs under the
    same cfg argument as the places that use it.
2017-05-12 09:37:28 +02:00
bors
e19ccb71c8 Auto merge of #41757 - alexcrichton:stabilize-crt-static, r=japaric
rustc: Stabilize `-C target-feature=+crt-static`

This commit stabilizes the `crt-static` feature accepted by the compiler. Note
that this does not stabilize the `#[cfg]` attribute for `crt-static` as
that's going to be covered by #29717. This only stabilizes a few small pieces:

* The `crt-static` feature as accepted by the `-C target-feature` flag, and its
  connection with the platform-specific definition of `crt-static`.
* The semantics of `--print cfg` printing out activated `crt-static` feature, if
  available.

This should be enough to get the benefits of `crt-static` on stable Rust with
MSVC and with musl, but sidsteps the issue of stabilizing #29717 first.

Closes #37406
2017-05-12 07:33:10 +00:00
bors
141e8a6a02 Auto merge of #41716 - nikomatsakis:issue-41677, r=arielb1
enforce WF conditions after generalizing

Add a `WF(T')` obligation after generalizing `T` to `T'`, if `T'` contains an unconstrained type variable in a bivariant context.

Fixes #41677.

Beta nominating -- regression.

r? @arielb1
2017-05-12 05:02:10 +00:00
Ariel Ben-Yehuda
c85501b9c1 box large variants in MIR
Operand: 72 -> 24 B
Statement: 192 -> 96 B
Terminator: 256 -> 112 B
librustc translation memory usage: 1795 -> 1669 MB

next step would be interning lvalues, I suppose?
2017-05-12 01:43:04 +03:00
bors
39bcd6f425 Auto merge of #41684 - jethrogb:feature/ntstatus, r=alexcrichton
Windows io::Error: also format NTSTATUS error codes

`NTSTATUS` errors may be encoded as `HRESULT`, see [[MS-ERREF]](https://msdn.microsoft.com/en-us/library/cc231198.aspx). These error codes can still be formatted using `FormatMessageW` but require some different parameters to be passed in.

I wasn't sure if this needed a test and if so, how to test it. Presumably we wouldn't want to make our tests dependent on localization-dependent strings returned from `FormatMessageW`.

Users that get an `err: NTSTATUS` will need to do `io::Error::from_raw_os_error(err|0x1000_0000)` (the equivalent of [`HRESULT_FROM_NT`](https://msdn.microsoft.com/en-us/library/ms693780(VS.85).aspx))
2017-05-11 22:37:38 +00:00
Eduard-Mihai Burtescu
68c1ce9170 rustc_trans: do not attempt to truncate an i1 const to i1. 2017-05-12 00:14:31 +03:00
Guillaume Gomez
75b69c453b Fix search when looking to sources 2017-05-11 22:28:13 +02:00
Brian Anderson
084b67f56a Annotate the license exceptions 2017-05-11 19:19:21 +00:00
Niko Matsakis
2490ee5080 correct various error messages that changed
The new messages seem universally better. I think these result because
we recognize that we are in an invariant context more often.
2017-05-11 14:52:26 -04:00
Niko Matsakis
a4151ff3c4 add a WF obligation if a type variable appears in bivariant position 2017-05-11 14:52:26 -04:00
Niko Matsakis
a950c37394 replace the type generalizer with one based on variance 2017-05-11 14:52:25 -04:00
Martin Glagla
641d05353a Fix typo in size_hint example comment 2017-05-11 20:38:15 +02:00
bors
e40beb3af1 Auto merge of #41913 - nikomatsakis:issue-41849-variance-cycle, r=eddyb
do not fetch variance for items when equating

Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)

r? @eddyb
2017-05-11 16:56:17 +00:00
Jethro Beekman
71de9dbe5b Add test 2017-05-11 09:47:02 -07:00
Oliver Schneider
43349e649d Upgrade some comments to doc comments 2017-05-11 16:57:45 +02:00
Niko Matsakis
d22d1feae1 do not fetch variance for items when equating
Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)
2017-05-11 10:54:19 -04:00
bors
2cc3358e4f Auto merge of #41864 - malbarbo:android-docker, r=alexcrichton
Add disabled android host builders

Introduce the concept of disabled builder. A disabled builder is one that is not run by travis. It is intended to be run by the user who wants a rustc for a tier 2 or 3 platform. Off corse, there is no guarantee that it will work.
2017-05-11 14:05:37 +00:00
Oliver Schneider
644ce5e535 Address PR reviews 2017-05-11 15:26:22 +02:00
bors
fb6f845f33 Auto merge of #41863 - malbarbo:update-android-builder, r=alexcrichton
ci: Update android ndk and sdk

Make install-sdk.sh and install-ndk.sh more generic so future updates can be made directly on Dockerfile. Update ndk to r13b, which will be necessary to make host builds for android (in the future). Update sdk to r25.2.5 (maybe some emulator performance improvement).
2017-05-11 11:27:43 +00:00
bors
24ea08e9b7 Auto merge of #41905 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #41192, #41724, #41873, #41877, #41889
- Failed merges:
2017-05-11 07:06:58 +00:00
Tshepang Lekhonkhobe
e42875ce6d doc: break into 2 sentences 2017-05-11 06:27:01 +02:00
Corey Farwell
00f6e3918d Rollup merge of #41889 - est31:master, r=estebank
Remove debug message

It was added by me in #41293. Sorry about that!

Thanks goes to @alexbool for finding it.
2017-05-11 00:21:28 -04:00
Corey Farwell
607320239f Rollup merge of #41877 - eddyb:gdb-force-rust, r=michaelwoerister
compiletest: force GDB to print values in the Rust format.

Based on @nodakai's https://github.com/rust-lang/rust/issues/40557#issuecomment-294368330 and @infinity0's https://github.com/rust-lang/rust/issues/40557#issuecomment-300133591.
Fixes #40557.
2017-05-11 00:21:27 -04:00
Corey Farwell
4ad75b317f Rollup merge of #41873 - michaelwoerister:fix-filemap-hash-lookup, r=nikomatsakis
ICH: Handle case of removed FileMaps.

This PR fixes a bug introduced in #41709 where removing a source file between compilation sessions would cause an ICE:
https://travis-ci.org/rust-icci/crossbeam/jobs/230582234#L633

r? @nikomatsakis
2017-05-11 00:21:26 -04:00
Corey Farwell
183dd9e3c2 Rollup merge of #41724 - achernyak:master, r=nikomatsakis
More Queries for Crate Metadata

This covers a little bit of clean up and the following parts of #41417:
* `fn item_attrs(&self, def_id: DefId) -> Vec<ast::Attribute>;`
* `fn fn_arg_names(&self, did: DefId) -> Vec<ast::Name>;`
* `fn trait_of_item(&self, def_id: DefId) -> Option<DefId>;`
* `fn impl_parent(&self, impl_def_id: DefId) -> Option<DefId>;`
* ` fn is_foreign_item(&self, did: DefId) -> bool;`
* `fn is_exported_symbol(&self, def_id: DefId) -> bool;`

r? @nikomatsakis
2017-05-11 00:21:25 -04:00
Corey Farwell
a00e182053 Rollup merge of #41192 - zackw:eprintln, r=alexcrichton
Add `eprint!` and `eprintln!` macros to the prelude.

These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout.  Issues #39228 and #40528; previous PR #39229; accepted RFC rust-lang/rfcs#1869; proposed revision to The Book rust-lang/book#615.

I have _not_ revised this any since the original submission; I will do that later this week.  I wanted to get this PR in place since it's been quite a while since the RFC was merged.

Known outstanding review comments:

* [x] @steveklabnik requested a new chapter for the unstable version of The Book -- please see if the proposed revisions to the second edition cover it.
* [x] @nodakai asked if it were possible to merge the internal methods `_print` and `_eprint` - not completely, since they both refer to different internal globals which we don't want to expose, but I will see if some duplication can be factored out.

Please let me know if I missed anything.
2017-05-11 00:21:24 -04:00
bors
1d468400f5 Auto merge of #41900 - nrc:update-rls, r=Mark-Simulacrum
Update RLS

Pulls in crucial dependency updates which fix a serious RLS bug
2017-05-11 04:14:34 +00:00
Nick Cameron
1ffa6b731e Update RLS
Pulls in crucial dependency updates which fix a serious RLS bug
2017-05-11 11:12:28 +12:00
bors
bb8d51c2eb Auto merge of #41862 - GuillaumeGomez:improve-e0477, r=nagisa
Improve E0477 error message

Part of #41816.

r? @nagisa
2017-05-10 21:32:33 +00:00
Zack Weinberg
72588a2b2a Skip print-stdout-eprint-stderr test on emscripten 2017-05-10 15:28:25 -04:00
bors
978d2cfee1 Auto merge of #41887 - steveklabnik:rollup, r=steveklabnik
Rollup of 5 pull requests

- Successful merges: #41531, #41536, #41809, #41854, #41886
- Failed merges:
2017-05-10 17:10:13 +00:00
est31
a06f9a66df Remove debug message 2017-05-10 18:20:23 +02:00
Steve Klabnik
19f1146ded Rollup merge of #41886 - RalfJung:unique-doc-typo, r=steveklabnik
fix typo in Unique::empty doc

Subject says it all
2017-05-10 17:18:34 +02:00