Commit graph

97557 commits

Author SHA1 Message Date
Felix S. Klock II
f3ebfab067 Make fn ptr always structural match, regardless of whether formal types are.
Fix #63479.
2019-09-21 12:26:45 -04:00
Erin Power
d8052d8ee5 Updated RELEASES.md for 1.38.0 2019-09-21 12:26:16 -04:00
bors
fdd48565d0 Auto merge of #64438 - cuviper:beta-rollup, r=Mark-Simulacrum
[beta] Rollup backports

Cherry-picked:

- Permit unwinding through FFI by default #62603
- pprust: Do not print spaces before some tokens #63897
- Account for doc comments coming from proc macros without spans #63930
- Support "soft" feature-gating using a lint #64066
- Update xLTO compatibility table in rustc book. #64092
- Include compiler-rt in the source tarball #64240
- Update LLVM submodule #64317

r? @Mark-Simulacrum
2019-09-14 02:19:28 +00:00
Nikita Popov
e0862784a1 Update LLVM submodule 2019-09-13 10:29:55 -07:00
Matthew Maurer
29e4a428fa Include compiler-rt in the source tarball
In #60981 we switched to using src/llvm-project/compiler-rt inside
compiler-builtins rather than a separate copy of it.
In order to have the "c" feature turn on in builds from the source
tarball, we need to include that path in its creation.

fixes #64239
2019-09-13 10:29:42 -07:00
Michael Woerister
2fe39b6d45 Update xLTO compatibility table in rustc book. 2019-09-13 10:29:31 -07:00
Vadim Petrochenkov
0c044190d4 Turn soft_unstable into a future-compatibility lint 2019-09-13 10:29:18 -07:00
Vadim Petrochenkov
852014a012 Support "soft" feature-gating using a lint
Use it for feature-gating `#[bench]`
2019-09-13 10:29:18 -07:00
Esteban Küber
ee6de6cf44 add regression test 2019-09-13 10:29:02 -07:00
Esteban Küber
3a93713dc3 Account for doc comments coming from proc macros without spans 2019-09-13 10:29:02 -07:00
Vadim Petrochenkov
31b4b771c9 pprust: Do not print spaces before some tokens 2019-09-13 10:28:46 -07:00
Josh Stone
46049e70f6 Force #[unwind(aborts)] in test/codegen/c-variadic.rs 2019-09-13 10:04:46 -07:00
Josh Stone
ceaf4dd3fa Revert "Allow a dirty MirBuilt for make_extern and make_method_extern"
This reverts commit b4a6f59793.
2019-09-13 10:04:46 -07:00
Mark Rousskov
946fb894a6 Permit unwinding through FFI by default
See #58794 for context.
2019-09-13 10:04:46 -07:00
bors
d097af1055 Auto merge of #64097 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports

Rolled up:

* [beta] Utilize released stable over dev-static #64046

Cherry picked:

* Update rust-installer to limit memory use #63984
* debuginfo: give unique names to closure and generator types #63875
* ci: move libc mirrors to the rust-lang-ci-mirrors bucket #63772
* Fix nested eager expansions in arguments of `format_args` #63717

r? @ghost
2019-09-03 19:17:28 +00:00
Pietro Albini
5f51210cc0
bump clippy 2019-09-03 20:21:19 +02:00
Pietro Albini
02c4da1699
Rollup merge of #64046 - Mark-Simulacrum:beta-next, r=pietroalbini 2019-09-02 17:32:31 +02:00
Vadim Petrochenkov
f2e3031859
expand: Do not do questionable span adjustment before eagerly expanding an expression
Maybe it made sense when it was introduced, but now it's doing something incorrect.
2019-09-02 17:31:09 +02:00
Vadim Petrochenkov
3d95d17937
expand: Keep the correct current expansion ID for eager expansions
Solve the problem of `ParentScope` entries for eager expansions not exising in the resolver map by creating them on demand.
2019-09-02 17:31:05 +02:00
Vadim Petrochenkov
1e77ef86b3
Add a regression test for issue #63460 2019-09-02 17:31:01 +02:00
Vadim Petrochenkov
29fe07641f
Add a test for an opaque macro eagerly expanding its arguments 2019-09-02 17:30:56 +02:00
Pietro Albini
57f845c533
ci: move libc mirrors to the rust-lang-ci-mirrors bucket 2019-09-02 17:27:02 +02:00
Philip Craig
981dea5d9f
debuginfo: always include disambiguator in type names 2019-09-02 17:26:56 +02:00
Philip Craig
7014774fd0
debuginfo: give unique names to closure and generator types
Closure types have been moved to the namespace where they
are defined, and both closure and generator type names now
include the disambiguator.

This fixes an exception when lldb prints nested closures.

Fixes #57822
2019-09-02 17:26:50 +02:00
Josh Stone
a06cba20cf
Update rust-installer to limit memory use 2019-09-02 17:26:43 +02:00
Mark Rousskov
15a07a853e Use released stable for beta 2019-08-31 16:55:47 -04:00
bors
72bfc37535 Auto merge of #63957 - ehuss:beta-update-cargo, r=alexcrichton
[BETA] Update cargo

1 commits in 3f700ec43ce72305eb5315cfc710681f3469d4b4..23ef9a4ef8a96d09b1fd67b2f4e023f416bb1ff1
2019-08-19 22:43:12 +0000 to 2019-08-20 10:39:12 -0700
- [beta] Fix old lockfile encoding wrt newlines (rust-lang/cargo#7274)
2019-08-27 20:08:41 +00:00
Eric Huss
2f7efeff81 [BETA] Update cargo 2019-08-27 12:45:44 -07:00
bors
641586c1a5 Auto merge of #63771 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports

Cherry-picked:

*  RELEASES.md: ? is one of three Kleene operators #63529
*  Do not ICE when synthesizing spans falling inside unicode chars #63508
*  ci: move mirrors to their standalone bucket #63485

r? @ghost
2019-08-21 07:44:59 +00:00
Pietro Albini
3288766db1
ci: move mirrors to their standalone bucket
Currently mirrors are stored in the rust-lang-ci2 S3 bucket along with
CI toolchains. This is problematic for multiple reasons:

- CI IAM credentials are allowed to both edit and delete those files.
  A malicious user gaining access to those credentials would be able to
  change our mirrored dependencies, possibly backdooring the compiler.

- Contents of the rust-lang-ci2 bucket are disposable except for the
  mirrors' content. When we implement backups for S3 buckets we'd have
  to replicate just that part of the bucket, complicating the backup
  logic and increasing the chance of mistakes. A standalone bucket will
  be way easier to backup.

This commit switches our CI to use the new rust-lang-ci-mirrors bucket.
2019-08-21 08:51:19 +02:00
Esteban Küber
2d2448b9ba
review comments 2019-08-21 08:51:10 +02:00
Esteban Küber
bcd353c835
review comment: remove unecessary error in test 2019-08-21 08:51:05 +02:00
Esteban Küber
10d652107b
Do not ICE when synthesizing spans falling inside unicode chars 2019-08-21 08:51:01 +02:00
Anders Kaseorg
539db8154e
RELEASES.md: ? is one of three Kleene operators
The slash and quotes in ?/“Kleene” appeared to define “Kleene” as the
name for the ? operator, which is not the case.  Rust has three Kleene
operators *, +, ?.

(Pointed out by /u/Sharlinator on Reddit.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-08-21 08:50:52 +02:00
bors
e450539c2a Auto merge of #63524 - pietroalbini:beta-next, r=Mark-Simulacrum
Prepare beta for Rust 1.38.0

r? @Mark-Simulacrum
2019-08-13 16:11:59 +00:00
Pietro Albini
211c04dd9b
prepare beta for rust 1.38.0 2019-08-13 18:06:40 +02:00
bors
60960a260f Auto merge of #63483 - RalfJung:invalid-value, r=Centril
Improve invalid_value lint message

The lint now explains which type is involved and why it cannot be initialized this way. It also points at the innermost struct/enum field that has an offending type, if any.

See https://github.com/erlepereira/x11-rs/issues/99#issuecomment-520311911 for how this helps in some real-world code hitting this lint.
2019-08-12 12:43:33 +00:00
Ralf Jung
0499923b18 more informative error message from invalid_value lint 2019-08-12 11:23:56 +02:00
bors
c01be67ea4 Auto merge of #63489 - Centril:rollup-uuf6z1s, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #62108 (Use sharded maps for queries)
 - #63297 (Improve pointer offset method docs)
 - #63406 (Suggest using a qualified path in patterns with inconsistent bindings)
 - #63431 (Revert "Simplify MIR generation for logical ops")
 - #63449 (resolve: Remove remaining special cases from built-in macros)
 - #63461 (docs: add stdlib env::var(_os) panic)
 - #63473 (Regression test for #56870)
 - #63474 (Add tests for issue #53598 and #57700)
 - #63480 (Fixes #63477)

Failed merges:

r? @ghost
2019-08-12 08:58:48 +00:00
Mazdak Farrokhzad
9d297190c8
Rollup merge of #63480 - OptimisticPeach:patch-1, r=Centril
Fixes #63477

Adds a closing parenthesis.
2019-08-12 10:58:24 +02:00
Mazdak Farrokhzad
7bdff66d35
Rollup merge of #63474 - adamAndMath:master, r=Centril
Add tests for issue #53598 and #57700

Closes #53598 and #57700
2019-08-12 10:58:22 +02:00
Mazdak Farrokhzad
58ac2b2b6b
Rollup merge of #63473 - adrian-budau:master, r=Centril
Regression test for #56870

Closes #56870.
2019-08-12 10:58:21 +02:00
Mazdak Farrokhzad
4d27aaccf1
Rollup merge of #63461 - tommilligan:doc-var-panic, r=joshtriplett
docs: add stdlib env::var(_os) panic

Closes #63456
2019-08-12 10:58:19 +02:00
Mazdak Farrokhzad
33f53d699c
Rollup merge of #63449 - petrochenkov:builtinagain, r=eddyb
resolve: Remove remaining special cases from built-in macros

Edition and definition sites of the macros are now also taken from the `#[rustc_builtin_macro]` definitions in `libcore`.

---
The edition switch may be a breaking change for `Rustc{Encodable,Decodable}` derives if they are used in combination with the unstable crate `serialize` from sysroot like this
```rust
extern crate serialize;
use serialize as rustc_serialize;

#[derive(RustcEncodable)]
struct S;
```
(see the updated `ui-fulldeps` tests).
2019-08-12 10:58:18 +02:00
Mazdak Farrokhzad
e19ce5d16a
Rollup merge of #63431 - andjo403:revert_mir_simplification, r=matthewjasper
Revert "Simplify MIR generation for logical ops"

This reverts commit e38e954a0d.

llvm were not able to optimize the code that well with the simplified mir.

Closes: #62993
2019-08-12 10:58:16 +02:00
Mazdak Farrokhzad
ab2d7e9a50
Rollup merge of #63406 - jakubadamw:resolve-inconsistent-names-suggest-qualified-path, r=petrochenkov
Suggest using a qualified path in patterns with inconsistent bindings

A program like the following one:

```rust
enum E { A, B, C }
fn f(x: E) -> bool {
    match x {
        A | B => false,
        C => true
    }
}
```

is rejected by the compiler due to `E` variant paths not being in scope.
In this case `A`, `B` are resolved as pattern bindings and consequently
the pattern is considered invalid as the inner or-patterns do not bind
to the same set of identifiers.

This is expected but the compiler errors that follow could be surprising
or confusing to some users. This commit adds a help note explaining that
if the user desired to match against variants or consts, they should use
a qualified path. The help note is restricted to cases where the identifier
starts with an upper-case sequence so as to reduce the false negatives.

Since this happens during resolution, there's no clean way to check what
it is the patterns match against. The syntactic criterium, however, is in line
with the convention that's assumed by the `non-camel-case-types` lint.

Fixes #50831.
2019-08-12 10:58:15 +02:00
Mazdak Farrokhzad
e9615f2487
Rollup merge of #63297 - RalfJung:ptr_offset, r=dtolnay
Improve pointer offset method docs

Cc @rkruppe @gnzlbg
2019-08-12 10:58:13 +02:00
Mazdak Farrokhzad
0b4823de23
Rollup merge of #62108 - Zoxc:sharded-queries, r=oli-obk
Use sharded maps for queries

Based on https://github.com/rust-lang/rust/pull/61779.

r? @Gankro
2019-08-12 10:58:12 +02:00
OptimisticPeach
3d38187afd
Fixes #63477
Adds a closing parenthesis.
2019-08-12 00:15:14 -04:00
bors
72f8043d44 Auto merge of #63469 - Centril:refactor-parser, r=petrochenkov
libsyntax: Refactor `parser.rs` into reasonably sized logical units

Here we split `parser.rs` (~7.9 KLOC) into more reasonably sized files (all < 1.8 KLOC):

- `./src/libsyntax/parse/`
   - `parser.rs`
   - `parser/`
      - `pat.rs`
      - `expr.rs`
      - `stmt.rs`
      - `ty.rs`
      - `path.rs`
      - `generics.rs`
      - `item.rs`
      - `module.rs`

Closes https://github.com/rust-lang/rust/issues/60015.

r? @petrochenkov
2019-08-12 02:35:55 +00:00