Commit Graph

64176 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
2da080e779 rustc: treat ReEarlyBound as free without replacing it with ReFree. 2017-05-13 17:42:59 +03:00
Eduard-Mihai Burtescu
dbae169ac1 rustc_typeck: do not leak late-bound lifetimes from bounds to closures. 2017-05-13 17:42:59 +03:00
Eduard-Mihai Burtescu
74c6788d9c rustc: move liberate_late_bound_regions to rustc_typeck. 2017-05-13 17:42:59 +03:00
Eduard-Mihai Burtescu
6d4c2141b5 rustc: use DefId instead of CodeExtent for FreeRegion's scope. 2017-05-13 17:42:59 +03:00
Eduard-Mihai Burtescu
72aab7ade4 rustc_mir: remove unnecessary drop scope for constants. 2017-05-13 17:42:59 +03:00
Eduard-Mihai Burtescu
9809fe0d02 rustc: use call_site_extent for closure environment free regions. 2017-05-13 17:42:59 +03:00
Eduard-Mihai Burtescu
bd8246be74 rustc: uniformly compute ParameterEnvironment's "free outlive scope". 2017-05-13 17:42:59 +03:00
est31
b36d23c8af Add test, and fix the other tests 2017-05-13 16:02:29 +02:00
est31
ba0601d4b6 libcore: #[allow] some unused macros 2017-05-13 16:02:29 +02:00
est31
d14d194f61 Support #[allow] etc logic on a per macro level
This commit extends the current unused macro linter
to support directives like #[allow(unused_macros)]
or #[deny(unused_macros)] directly next to the macro
definition, or in one of the modules the macro is
inside. Before, we only supported such directives
at a per crate level, due to the crate's NodeId
being passed to session.add_lint.

We also had to implement handling of the macro's
NodeId in the lint visitor.
2017-05-13 16:02:29 +02:00
est31
db82c57cb7 Extend the libsyntax visitor to work over macro defs 2017-05-13 16:02:29 +02:00
est31
df188b8f97 Add lint for unused macros 2017-05-13 16:02:29 +02:00
bors
77f1bec6f5 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
2017-05-13 13:59:19 +00:00
kennytm
115854e19c
Fix #35829 (syntax extension's quote_expr!() does not handle b"…")
* Handles `b"…"`, `br#"…"#` and `...` for `quote_expr!()`.
* Refactored the match statement to allow it to complain loudly on any
  unhandled token.
* Similarly, proc_macro's `quote!()` did not handle `br#"…"#` or `r#"…"#`,
  so this commit fixes it too.
2017-05-13 21:41:25 +08:00
Ariel Ben-Yehuda
237dbe939a add min-llvm-version 2017-05-13 14:38:15 +03:00
bors
ef3ec5ece5 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:
2017-05-13 11:35:59 +00:00
bors
453cad6e65 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.
2017-05-13 09:12:09 +00:00
bors
4f3886abf1 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!
2017-05-13 05:22:08 +00:00
Mark Simulacrum
f28e3cdf54 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)
2017-05-12 18:57:38 -06:00
Mark Simulacrum
7b1e51d798 Rollup merge of #41943 - malbarbo:android-openssl, r=alexcrichton
bootstrap: openssl android support
2017-05-12 18:57:37 -06:00
Mark Simulacrum
c17811cce3 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
2017-05-12 18:57:37 -06:00
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
d5f1cfd0fe 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
2017-05-13 00:49:06 +00:00
Guillaume Gomez
b09a19b7c7 Fix anchor invalid redirection to search 2017-05-12 23:09:25 +02:00
Andre Bogus
a9c163ebe9 Fix some clippy warnings in libsyntax
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-12 20:05:39 +02: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
Alex Crichton
c30e007b86 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
2017-05-12 09:07:10 -07:00
Bastien Orivel
26e7e491b4 rustdoc: Break words in the location box of the sidebar.
This prevents long names from overflowing.
2017-05-12 15:42:54 +02:00
Masaki Hara
7b535e1096
Disallow ._ in float literal. 2017-05-12 22:00:06 +09:00
Tommy Ip
7a03b4c75a 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.
2017-05-12 12:54:20 +01: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
Alex Crichton
ab54f4b226 rustc: Remove #![unstable] annotation
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-11 16:03:05 -07:00
Alex Crichton
af0e16c852 rustbuild: Use -Z force-unstable-if-unmarked 2017-05-11 16:03:05 -07:00