]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRemove interior mutability from TraitDef by turning fields into queries.
Michael Woerister [Thu, 11 May 2017 14:01:19 +0000 (16:01 +0200)]
Remove interior mutability from TraitDef by turning fields into queries.

7 years agoFix instability in GlobalMetadata::Impls ICH.
Michael Woerister [Thu, 11 May 2017 13:47:15 +0000 (15:47 +0200)]
Fix instability in GlobalMetadata::Impls ICH.

7 years agoMake incr. comp. test case dependent on specific ICH instead of SVH
Michael Woerister [Thu, 11 May 2017 13:46:22 +0000 (15:46 +0200)]
Make incr. comp. test case dependent on specific ICH instead of SVH

7 years agoICH: Hash lists of local trait impls as part of the HIR.
Michael Woerister [Mon, 8 May 2017 21:36:37 +0000 (23:36 +0200)]
ICH: Hash lists of local trait impls as part of the HIR.

7 years agoAuto merge of #41859 - froydnj:align-float-parts, r=sfackler
bors [Mon, 15 May 2017 08:42:10 +0000 (08:42 +0000)]
Auto merge of #41859 - froydnj:align-float-parts, r=sfackler

fix confusion about parts required for float formatting

The documentation for flt2dec doesn't match up with the actual
implementation, so fix the documentation to align with reality.
Presumably due to the mismatch, the formatting code for floats in
std::fmt can use correspondingly shorter arrays in some places, so fix
those places up as well.

Fixes #41304.

7 years agoAuto merge of #41978 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Sun, 14 May 2017 16:16:17 +0000 (16:16 +0000)]
Auto merge of #41978 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update the Cargo submodule

Brings some nice updates like faster index clones/updates, retries on 500 from
crates.io, etc.

7 years agoAuto merge of #41969 - Enet4:update-rls-313, r=Mark-Simulacrum
bors [Sun, 14 May 2017 05:57:38 +0000 (05:57 +0000)]
Auto merge of #41969 - Enet4:update-rls-313, r=Mark-Simulacrum

Update RLS to solve serious crash

As a follow-up to rust-lang-nursery/rls#312, this PR contains the fix to the latest experienced RLS crashes, which should hopefully reach the nightly release as soon as possible.

7 years agoAuto merge of #41987 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sun, 14 May 2017 03:00:34 +0000 (03:00 +0000)]
Auto merge of #41987 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 7 pull requests

- Successful merges: #41612, #41826, #41939, #41946, #41950, #41975, #41979
- Failed merges:

7 years agoRollup merge of #41979 - pftbest:msp430_libcalls, r=alexcrichton
Mark Simulacrum [Sun, 14 May 2017 02:55:13 +0000 (20:55 -0600)]
Rollup merge of #41979 - pftbest:msp430_libcalls, r=alexcrichton

LLVM: Add support for EABI-compliant libcalls on MSP430.

This change will allow rust code to have proper support for division
and multiplication using libgcc.

r? @alexcrichton
cc @awygle

7 years agoRollup merge of #41975 - liranringel:pass-static-crt-to-llvm-cmake-config, r=alexcrichton
Mark Simulacrum [Sun, 14 May 2017 02:55:13 +0000 (20:55 -0600)]
Rollup merge of #41975 - liranringel:pass-static-crt-to-llvm-cmake-config, r=alexcrichton

Pass static crt to llvm cmake configuration

Solves https://github.com/rust-lang/rust/issues/40246

7 years agoRollup merge of #41950 - GuillaumeGomez:rustdoc-links, r=frewsxcv
Mark Simulacrum [Sun, 14 May 2017 02:55:12 +0000 (20:55 -0600)]
Rollup merge of #41950 - GuillaumeGomez:rustdoc-links, r=frewsxcv

Fix anchor invalid redirection to search

Fixes #41933.

r? @rust-lang/docs

7 years agoRollup merge of #41946 - qnighy:disallow-dot-underscore-in-float, r=petrochenkov
Mark Simulacrum [Sun, 14 May 2017 02:55:11 +0000 (20:55 -0600)]
Rollup merge of #41946 - qnighy:disallow-dot-underscore-in-float, r=petrochenkov

Disallow ._ in float literal.

This patch makes lexer stop parsing number literals before `._`, as well as before `.a`. Underscore itself is still allowed like in `4_000_000.000_000_`.

Fixes a half part of #41723. The other is `""_`.

7 years agoRollup merge of #41939 - eddyb:trait-assoc-const-default, r=petrochenkov
Mark Simulacrum [Sun, 14 May 2017 02:55:10 +0000 (20:55 -0600)]
Rollup merge of #41939 - eddyb:trait-assoc-const-default, r=petrochenkov

rustc_resolve: don't deny outer type parameters in embedded constants.

This solves a problem noted at https://github.com/rust-lang/rust/issues/29646#issuecomment-300929548, where an associated const default in a trait couldn't refer to `Self` or type parameters, due to inaccuracies in lexical scoping.

I've also allowed "embedded expressions" (`[T; expr]`,  `[x; expr]`, `typeof expr`) to refer to type parameters in scope. *However*, the typesystem still doesn't handle #34344.
Fully resolving that issue requires breaking cycles more aggressively (e.g. lazy evaluation), *even* in when the expression doesn't depend on type parameters, to type-check it at all, and then also type-level "constant projections" (in the vein of `{expr}` from const generics).

7 years agoRollup merge of #41826 - GuillaumeGomez:add-markdown-content, r=frewsxcv
Mark Simulacrum [Sun, 14 May 2017 02:55:09 +0000 (20:55 -0600)]
Rollup merge of #41826 - GuillaumeGomez:add-markdown-content, r=frewsxcv

Add markdown-[before|after]-content options

cc @nical

r? @rust-lang/docs

7 years agoRollup merge of #41612 - mandeep:add-ops-generics, r=GuillaumeGomez,frewsxcv
Mark Simulacrum [Sun, 14 May 2017 02:55:08 +0000 (20:55 -0600)]
Rollup merge of #41612 - mandeep:add-ops-generics, r=GuillaumeGomez,frewsxcv

Added generic example of std::ops::Add in doc comments

We discussed on IRC how the std::ops examples were potentially missing examples using generics. This PR adds an example to std::ops::Add that shows the use of a generic type T. I'm not sure this is ready for merge as I think the two examples now make the documentation a bit verbose, but I think it's a good starting point. I'd love to hear others thoughts on this. This is in relation to the last item in issue #29365.

7 years agoUpdate rls submodule with important fixes
Eduardo Pinho [Sun, 14 May 2017 00:25:58 +0000 (01:25 +0100)]
Update rls submodule with important fixes

- Updates ls_types to "0.10.0", which prevents RLS crashes

7 years agoAuto merge of #41919 - nrc:save-crate, r=eddyb
bors [Sat, 13 May 2017 22:58:04 +0000 (22:58 +0000)]
Auto merge of #41919 - nrc:save-crate, r=eddyb

Include the crate's root module in save-analysis

r? @eddyb

7 years agoLLVM: Add support for EABI-compliant libcalls on MSP430.
Vadzim Dambrouski [Fri, 12 May 2017 22:37:43 +0000 (01:37 +0300)]
LLVM: Add support for EABI-compliant libcalls on MSP430.

This change will allow rust code to have proper support for division
and multiplication using libgcc libcalls.

7 years agoUpdate the Cargo submodule
Alex Crichton [Sat, 13 May 2017 18:07:33 +0000 (11:07 -0700)]
Update the Cargo submodule

Brings some nice updates like faster index clones/updates, retries on 500 from
crates.io, etc.

7 years agoAuto merge of #41914 - eddyb:region-refactor, r=nikomatsakis
bors [Sat, 13 May 2017 17:56:09 +0000 (17:56 +0000)]
Auto merge of #41914 - eddyb:region-refactor, r=nikomatsakis

rustc: simpler ParameterEnvironment and free regions.

The commits describe the slow transformation but the highlights are:
* `ReEarlyBound` is considered free, with a scope based on the item that defined the lifetime parameter, and the root body of the `RegionMaps` in use, removing the need for `free_substs`
* `liberate_late_bound_regions` and `implicit_region_bound` moved to typeck
* `CodeExtent` not interned at all now - ideally it would be 2 `u32` but it's small anyway

Future work building up on this could include:
* `ParameterEnvironment` becoming just the result of `predicates_of`
  * interning makes my "parent chain" scheme unnecessary
* `implicit_region_bound` could be retrieved from `RegionMaps`
* renaming `CodeExtent` to `Scope`
  * generalizing "call site" to "use site" or something better to include constants
* renaming `RegionMaps` to `ScopeTree` and its API to talk about "parents" explicitly

7 years agoPass static crt to llvm cmake configuration
Liran Ringel [Sat, 13 May 2017 15:12:19 +0000 (17:12 +0200)]
Pass static crt to llvm cmake configuration

7 years agorustc_resolve: don't deny outer type parameters in embedded constants.
Eduard-Mihai Burtescu [Fri, 21 Apr 2017 14:10:22 +0000 (17:10 +0300)]
rustc_resolve: don't deny outer type parameters in embedded constants.

7 years agorustc: don't keep a second reference to the HIR map in middle::region.
Eduard-Mihai Burtescu [Thu, 11 May 2017 14:18:23 +0000 (17:18 +0300)]
rustc: don't keep a second reference to the HIR map in middle::region.

7 years agorustc: stop interning CodeExtent, it's small enough.
Eduard-Mihai Burtescu [Thu, 11 May 2017 13:10:47 +0000 (16:10 +0300)]
rustc: stop interning CodeExtent, it's small enough.

7 years agorustc: remove redundant fn_id's from CodeExtentData.
Eduard-Mihai Burtescu [Thu, 11 May 2017 12:15:36 +0000 (15:15 +0300)]
rustc: remove redundant fn_id's from CodeExtentData.

7 years agorustc: treat ReEarlyBound as free without replacing it with ReFree.
Eduard-Mihai Burtescu [Thu, 11 May 2017 12:05:00 +0000 (15:05 +0300)]
rustc: treat ReEarlyBound as free without replacing it with ReFree.

7 years agorustc_typeck: do not leak late-bound lifetimes from bounds to closures.
Eduard-Mihai Burtescu [Wed, 10 May 2017 13:59:41 +0000 (16:59 +0300)]
rustc_typeck: do not leak late-bound lifetimes from bounds to closures.

7 years agorustc: move liberate_late_bound_regions to rustc_typeck.
Eduard-Mihai Burtescu [Wed, 10 May 2017 10:40:59 +0000 (13:40 +0300)]
rustc: move liberate_late_bound_regions to rustc_typeck.

7 years agorustc: use DefId instead of CodeExtent for FreeRegion's scope.
Eduard-Mihai Burtescu [Sun, 7 May 2017 16:57:51 +0000 (19:57 +0300)]
rustc: use DefId instead of CodeExtent for FreeRegion's scope.

7 years agorustc_mir: remove unnecessary drop scope for constants.
Eduard-Mihai Burtescu [Sun, 7 May 2017 14:30:55 +0000 (17:30 +0300)]
rustc_mir: remove unnecessary drop scope for constants.

7 years agorustc: use call_site_extent for closure environment free regions.
Eduard-Mihai Burtescu [Sun, 7 May 2017 13:49:03 +0000 (16:49 +0300)]
rustc: use call_site_extent for closure environment free regions.

7 years agorustc: uniformly compute ParameterEnvironment's "free outlive scope".
Eduard-Mihai Burtescu [Sun, 7 May 2017 13:22:33 +0000 (16:22 +0300)]
rustc: uniformly compute ParameterEnvironment's "free outlive scope".

7 years agoAuto merge of #41920 - arielb1:inline-drop, r=eddyb
bors [Sat, 13 May 2017 13:59:19 +0000 (13:59 +0000)]
Auto merge of #41920 - arielb1:inline-drop, r=eddyb

remove the #[inline] attribute from drop_in_place

Apparently LLVM has exponential code growth while inlining landing pads
if that attribute is present.

Fixes #41696.

beta-nominating  because regression.
r? @eddyb

7 years agoadd min-llvm-version
Ariel Ben-Yehuda [Sat, 13 May 2017 11:38:15 +0000 (14:38 +0300)]
add min-llvm-version

7 years agoAuto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sat, 13 May 2017 11:35:59 +0000 (11:35 +0000)]
Auto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 15 pull requests

- Successful merges: #41820, #41860, #41876, #41896, #41912, #41916, #41918, #41921, #41923, #41934, #41935, #41940, #41942, #41943, #41951
- Failed merges:

7 years agoAuto merge of #41861 - arthurprs:update-jemalloc, r=alexcrichton
bors [Sat, 13 May 2017 09:12:09 +0000 (09:12 +0000)]
Auto merge of #41861 - arthurprs:update-jemalloc, r=alexcrichton

Update jemalloc to 4.5.0

* pointing jemalloc submodule to the 4.5.0 HEAD + generated configure script
* removed the now unnecessary extra config for windows. jemalloc is now much better at configuring itself overall.

Let's see what the CI think.

7 years agoAuto merge of #41847 - alexcrichton:less-unstable-annotations, r=eddyb
bors [Sat, 13 May 2017 05:22:08 +0000 (05:22 +0000)]
Auto merge of #41847 - alexcrichton:less-unstable-annotations, r=eddyb

rustc: Add a new `-Z force-unstable-if-unmarked` flag

This commit adds a new `-Z` flag to the compiler for use when bootstrapping the
compiler itself. We want to be able to use crates.io crates, but we also want
the usage of such crates to be as ergonomic as possible! To that end compiler
crates are a little tricky in that the crates.io crates are not annotated as
unstable, nor do they expect to pull in unstable dependencies.

To cover all these situations it's intended that the compiler will forever now
bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose
of forcing crates.io crates to themselves be unstable while also allowing them
to use other "unstable" crates.io crates. This should mean that adding a
dependency to compiler no longer requires upstream modification with
unstable/staged_api attributes for inclusion!

7 years agoRollup merge of #41951 - Eijebong:master, r=GuillaumeGomez
Mark Simulacrum [Sat, 13 May 2017 00:57:38 +0000 (18:57 -0600)]
Rollup merge of #41951 - Eijebong:master, r=GuillaumeGomez

rustdoc: Break words in the location box of the sidebar.

This prevents long names from overflowing.

Before:
![before](https://img.bananium.fr/eijebong/afcfe18b-393e-4d3b-bc11-fe3def6659b9.png)

After:
![after](https://img.bananium.fr/eijebong/9483466b-3b6c-4509-ab0f-fd0c6572ef27.png)

7 years agoRollup merge of #41943 - malbarbo:android-openssl, r=alexcrichton
Mark Simulacrum [Sat, 13 May 2017 00:57:37 +0000 (18:57 -0600)]
Rollup merge of #41943 - malbarbo:android-openssl, r=alexcrichton

bootstrap: openssl android support

7 years agoRollup merge of #41942 - tommyip:master, r=Mark-Simulacrum
Mark Simulacrum [Sat, 13 May 2017 00:57:37 +0000 (18:57 -0600)]
Rollup merge of #41942 - tommyip:master, r=Mark-Simulacrum

Fix unexpected panic with the -Z treat-err-as-bug option

This fix an issue where the compiler panics even if there is no error when passed with the `-Z treat-err-as-bug` option.

Fixes #35886.

r? @Mark-Simulacrum

7 years agoRollup merge of #41940 - est31:master, r=eddyb
Mark Simulacrum [Sat, 13 May 2017 00:57:36 +0000 (18:57 -0600)]
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

7 years agoRollup merge of #41935 - iKevinY:detect-empty-files, r=Mark-Simulacrum
Mark Simulacrum [Sat, 13 May 2017 00:57:35 +0000 (18:57 -0600)]
Rollup merge of #41935 - iKevinY:detect-empty-files, r=Mark-Simulacrum

Add tidy check to detect empty files

Addresses #18439.

7 years agoRollup merge of #41934 - est31:remove_unused_macros, r=nagisa
Mark Simulacrum [Sat, 13 May 2017 00:57:34 +0000 (18:57 -0600)]
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.

7 years agoRollup merge of #41923 - eddyb:issue-41744, r=arielb1
Mark Simulacrum [Sat, 13 May 2017 00:57:33 +0000 (18:57 -0600)]
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.

7 years agoRollup merge of #41921 - GuillaumeGomez:fix-search-style, r=steveklabnik
Mark Simulacrum [Sat, 13 May 2017 00:57:32 +0000 (18:57 -0600)]
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

7 years agoRollup merge of #41918 - brson:lic, r=alexcrichton
Mark Simulacrum [Sat, 13 May 2017 00:57:32 +0000 (18:57 -0600)]
Rollup merge of #41918 - brson:lic, r=alexcrichton

Annotate the license exceptions

7 years agoRollup merge of #41916 - mglagla:typo, r=sfackler
Mark Simulacrum [Sat, 13 May 2017 00:57:31 +0000 (18:57 -0600)]
Rollup merge of #41916 - mglagla:typo, r=sfackler

Fix typo in Iterator::size_hint example comment

7 years agoRollup merge of #41912 - oli-obk:patch-3, r=eddyb
Mark Simulacrum [Sat, 13 May 2017 00:57:30 +0000 (18:57 -0600)]
Rollup merge of #41912 - oli-obk:patch-3, r=eddyb

Upgrade some comments to doc comments

7 years agoRollup merge of #41896 - tshepang:too-long, r=steveklabnik
Mark Simulacrum [Sat, 13 May 2017 00:57:29 +0000 (18:57 -0600)]
Rollup merge of #41896 - tshepang:too-long, r=steveklabnik

doc: break into 2 sentences

7 years agoRollup merge of #41876 - oli-obk:diagnosing_diagnostics, r=nagisa
Mark Simulacrum [Sat, 13 May 2017 00:57:28 +0000 (18:57 -0600)]
Rollup merge of #41876 - oli-obk:diagnosing_diagnostics, r=nagisa

Refactor suggestion diagnostic API to allow for multiple suggestions

r? @jonathandturner

cc @nrc @petrochenkov

7 years agoRollup merge of #41860 - mbrubeck:docs, r=nagisa
Mark Simulacrum [Sat, 13 May 2017 00:57:27 +0000 (18:57 -0600)]
Rollup merge of #41860 - mbrubeck:docs, r=nagisa

Remove wrong or outdated info from CString docs.

None

7 years agoRollup merge of #41820 - devurandom:patch-1, r=alexcrichton
Mark Simulacrum [Sat, 13 May 2017 00:57:26 +0000 (18:57 -0600)]
Rollup merge of #41820 - devurandom:patch-1, r=alexcrichton

bootstrap: Output name of failed config in case of errors

7 years agoAuto merge of #41955 - alexcrichton:update-sccache, r=eddyb
bors [Sat, 13 May 2017 00:49:06 +0000 (00:49 +0000)]
Auto merge of #41955 - alexcrichton:update-sccache, r=eddyb

Update sccache binaries to mozilla/sccache@d3627d766

This commit updates the sccache binaries to fix a cache load failure seen
on #41926, fixed by mozilla/sccache#119

7 years agoFix anchor invalid redirection to search
Guillaume Gomez [Fri, 12 May 2017 13:31:43 +0000 (15:31 +0200)]
Fix anchor invalid redirection to search

7 years agoAuto merge of #41926 - arielb1:box-mir, r=eddyb
bors [Fri, 12 May 2017 17:34:39 +0000 (17:34 +0000)]
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

7 years agoAdd tidy check to detect empty files
Kevin Yap [Fri, 12 May 2017 07:16:52 +0000 (00:16 -0700)]
Add tidy check to detect empty files

Addresses #18439.

7 years agoUpdate sccache binaries to mozilla/sccache@d3627d766
Alex Crichton [Fri, 12 May 2017 16:07:10 +0000 (09:07 -0700)]
Update sccache binaries to mozilla/sccache@d3627d766

This commit updates the sccache binaries to fix a cache load failure seen
on #41926, fixed by mozilla/sccache#119

7 years agorustdoc: Break words in the location box of the sidebar.
Bastien Orivel [Fri, 12 May 2017 13:39:54 +0000 (15:39 +0200)]
rustdoc: Break words in the location box of the sidebar.

This prevents long names from overflowing.

7 years agoDisallow ._ in float literal.
Masaki Hara [Fri, 12 May 2017 13:00:06 +0000 (22:00 +0900)]
Disallow ._ in float literal.

7 years agoFix unexpected panic with the -Z treat-err-as-bug option
Tommy Ip [Fri, 12 May 2017 11:48:18 +0000 (12:48 +0100)]
Fix unexpected panic with the -Z treat-err-as-bug option

This fix an issue where the compiler panics even if there is no
error when passed with the `-Z treat-err-as-bug` option.

Fixes #35886.

7 years agoconfig.toml.example: add note that optimize = false won't speed up a full bootstrap
est31 [Fri, 12 May 2017 11:29:08 +0000 (13:29 +0200)]
config.toml.example: add note that optimize = false won't speed up a full bootstrap

7 years agoDon't use a DUMMY_SP for reporting issues with crate imports
Oliver Schneider [Fri, 12 May 2017 09:21:34 +0000 (11:21 +0200)]
Don't use a DUMMY_SP for reporting issues with crate imports

7 years agoWeave the span of an import through the resolve code
Oliver Schneider [Fri, 12 May 2017 09:21:11 +0000 (11:21 +0200)]
Weave the span of an import through the resolve code

7 years agoRemove some unused macros from the rust codebase
est31 [Fri, 12 May 2017 06:21:00 +0000 (08:21 +0200)]
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
    b64c9d56700e2c41207166fe8709711ff02488ff
    when the char_range_at_reverse function was been removed.
  * librustc_errors
    Their last use was removed by commits
    2f2c3e178325dc1837badcd7573c2c0905fab979
    and 11dc974a38fd533aa692cea213305056cd3a6902.
  * 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.

7 years agoAuto merge of #41757 - alexcrichton:stabilize-crt-static, r=japaric
bors [Fri, 12 May 2017 07:33:10 +0000 (07:33 +0000)]
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

7 years agoAuto merge of #41716 - nikomatsakis:issue-41677, r=arielb1
bors [Fri, 12 May 2017 05:02:10 +0000 (05:02 +0000)]
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

7 years agorustc: Remove #![unstable] annotation
Alex Crichton [Mon, 8 May 2017 21:36:44 +0000 (14:36 -0700)]
rustc: Remove #![unstable] annotation

These are now no longer necessary with `-Z force-unstable-if-unmarked`

7 years agorustbuild: Use `-Z force-unstable-if-unmarked`
Alex Crichton [Mon, 8 May 2017 21:36:33 +0000 (14:36 -0700)]
rustbuild: Use `-Z force-unstable-if-unmarked`

7 years agobox large variants in MIR
Ariel Ben-Yehuda [Thu, 11 May 2017 22:38:26 +0000 (01:38 +0300)]
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?

7 years agoAuto merge of #41684 - jethrogb:feature/ntstatus, r=alexcrichton
bors [Thu, 11 May 2017 22:37:38 +0000 (22:37 +0000)]
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))

7 years agorustc_trans: do not attempt to truncate an i1 const to i1.
Eduard-Mihai Burtescu [Thu, 11 May 2017 21:14:31 +0000 (00:14 +0300)]
rustc_trans: do not attempt to truncate an i1 const to i1.

7 years agoFix search when looking to sources
Guillaume Gomez [Thu, 11 May 2017 20:28:13 +0000 (22:28 +0200)]
Fix search when looking to sources

7 years agoremove the #[inline] attribute from drop_in_place
Ariel Ben-Yehuda [Thu, 11 May 2017 20:09:31 +0000 (23:09 +0300)]
remove the #[inline] attribute from drop_in_place

Apparently LLVM has exponential code growth while inlining landing pads
if that attribute is present.

Fixes #41696.

7 years agoAnnotate the license exceptions
Brian Anderson [Thu, 11 May 2017 19:19:21 +0000 (19:19 +0000)]
Annotate the license exceptions

7 years agoPass crate attributes in visit.rs
Nick Cameron [Thu, 11 May 2017 19:15:29 +0000 (07:15 +1200)]
Pass crate attributes in visit.rs

7 years agocorrect various error messages that changed
Niko Matsakis [Wed, 3 May 2017 01:25:15 +0000 (21:25 -0400)]
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.

7 years agoadd a WF obligation if a type variable appears in bivariant position
Niko Matsakis [Tue, 2 May 2017 21:34:31 +0000 (17:34 -0400)]
add a WF obligation if a type variable appears in bivariant position

7 years agoreplace the type generalizer with one based on variance
Niko Matsakis [Tue, 2 May 2017 19:03:34 +0000 (15:03 -0400)]
replace the type generalizer with one based on variance

7 years agoFix typo in size_hint example comment
Martin Glagla [Thu, 11 May 2017 18:38:15 +0000 (20:38 +0200)]
Fix typo in size_hint example comment

7 years agoAuto merge of #41913 - nikomatsakis:issue-41849-variance-cycle, r=eddyb
bors [Thu, 11 May 2017 16:56:17 +0000 (16:56 +0000)]
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

7 years agoAdd test
Jethro Beekman [Wed, 3 May 2017 17:24:49 +0000 (10:24 -0700)]
Add test

7 years agoAdded generic example of std::ops::Add in doc comments
mandeep [Fri, 28 Apr 2017 18:16:49 +0000 (13:16 -0500)]
Added generic example of std::ops::Add in doc comments

Added blank lines around example

Added comment to Add example referencing the Output type

Removed whitespace from lines 272 and 273

Removed Debug derivation from Add examples

Added Debug derivation

7 years agoUpgrade some comments to doc comments
Oliver Schneider [Thu, 11 May 2017 14:57:45 +0000 (16:57 +0200)]
Upgrade some comments to doc comments

7 years agodo not fetch variance for items when equating
Niko Matsakis [Thu, 11 May 2017 14:54:19 +0000 (10:54 -0400)]
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.)

7 years agoAuto merge of #41864 - malbarbo:android-docker, r=alexcrichton
bors [Thu, 11 May 2017 14:05:37 +0000 (14:05 +0000)]
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.

7 years agoAddress PR reviews
Oliver Schneider [Thu, 11 May 2017 13:26:22 +0000 (15:26 +0200)]
Address PR reviews

7 years agoAuto merge of #41863 - malbarbo:update-android-builder, r=alexcrichton
bors [Thu, 11 May 2017 11:27:43 +0000 (11:27 +0000)]
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).

7 years agoAuto merge of #41905 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 11 May 2017 07:06:58 +0000 (07:06 +0000)]
Auto merge of #41905 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #41192, #41724, #41873, #41877, #41889
- Failed merges:

7 years agoEnsure we walk the root module of the crate
Nick Cameron [Thu, 11 May 2017 05:45:27 +0000 (17:45 +1200)]
Ensure we walk the root module of the crate

7 years agodoc: break into 2 sentences
Tshepang Lekhonkhobe [Thu, 11 May 2017 04:27:01 +0000 (06:27 +0200)]
doc: break into 2 sentences

7 years agoRollup merge of #41889 - est31:master, r=estebank
Corey Farwell [Thu, 11 May 2017 04:21:28 +0000 (00:21 -0400)]
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.

7 years agoRollup merge of #41877 - eddyb:gdb-force-rust, r=michaelwoerister
Corey Farwell [Thu, 11 May 2017 04:21:27 +0000 (00:21 -0400)]
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.

7 years agoRollup merge of #41873 - michaelwoerister:fix-filemap-hash-lookup, r=nikomatsakis
Corey Farwell [Thu, 11 May 2017 04:21:26 +0000 (00:21 -0400)]
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

7 years agoRollup merge of #41724 - achernyak:master, r=nikomatsakis
Corey Farwell [Thu, 11 May 2017 04:21:25 +0000 (00:21 -0400)]
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

7 years agoRollup merge of #41192 - zackw:eprintln, r=alexcrichton
Corey Farwell [Thu, 11 May 2017 04:21:24 +0000 (00:21 -0400)]
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.

7 years agoAuto merge of #41900 - nrc:update-rls, r=Mark-Simulacrum
bors [Thu, 11 May 2017 04:14:34 +0000 (04:14 +0000)]
Auto merge of #41900 - nrc:update-rls, r=Mark-Simulacrum

Update RLS

Pulls in crucial dependency updates which fix a serious RLS bug

7 years agoUpdate RLS
Nick Cameron [Wed, 10 May 2017 23:12:28 +0000 (11:12 +1200)]
Update RLS

Pulls in crucial dependency updates which fix a serious RLS bug

7 years agoAuto merge of #41862 - GuillaumeGomez:improve-e0477, r=nagisa
bors [Wed, 10 May 2017 21:32:33 +0000 (21:32 +0000)]
Auto merge of #41862 - GuillaumeGomez:improve-e0477, r=nagisa

Improve E0477 error message

Part of #41816.

r? @nagisa

7 years agoSkip print-stdout-eprint-stderr test on emscripten
Zack Weinberg [Wed, 10 May 2017 19:28:25 +0000 (15:28 -0400)]
Skip print-stdout-eprint-stderr test on emscripten

7 years agoAuto merge of #41887 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 10 May 2017 17:10:13 +0000 (17:10 +0000)]
Auto merge of #41887 - steveklabnik:rollup, r=steveklabnik

Rollup of 5 pull requests

- Successful merges: #41531, #41536, #41809, #41854, #41886
- Failed merges: