Commit Graph

89664 Commits

Author SHA1 Message Date
bors
1efdda10cd Auto merge of #58125 - taiki-e:libsyntax-2018, r=Centril
libsyntax => 2018

Transitions `libsyntax` to Rust 2018; cc #58099

r? @Centril
2019-02-07 01:41:14 +00:00
Hirokazu Hata
f03704b281 Transition librustc_traits to 2018 edition 2019-02-07 10:17:48 +09:00
Patrick McCarter
d7efc76b7e tidy line length 2019-02-06 18:12:21 -05:00
Patrick McCarter
f857199073 fix saturating_sub() underflow for unsigned ints #58030 2019-02-06 18:10:08 -05:00
bors
ff9158c1f8 Auto merge of #58224 - pietroalbini:revert-appveyor-debug, r=alexcrichton
Revert appveyor debug code

r? @alexcrichton
2019-02-06 22:48:39 +00:00
Patrick McCarter
c5586ebe26 tidy line length split 2019-02-06 16:21:50 -05:00
Patrick McCarter
0efb8e4d73 Allow const assignment for int saturating_sub() for #58030 2019-02-06 16:15:17 -05:00
David Wood
6717727fcb
Lower constant patterns with ascribed types.
This commit fixes a bug introduced by #55937 which started checking user
type annotations for associated type patterns. Where lowering a
associated constant expression would previously return a
`PatternKind::Constant`, it now returns a `PatternKind::AscribeUserType`
with a `PatternKind::Constant` inside, this commit unwraps that to
access the constant pattern inside and behaves as before.
2019-02-06 21:10:43 +01:00
Michael Howell
5db385064e
Document the one TyKind that isn't documented
This is especially confusing since the name `Foreign`
and the name `extern type` are so different. I deduced
that they're the same by consulting git-blame.
2019-02-06 12:27:01 -07:00
Taiki Endo
950fe6686d librustc_errors => 2018 2019-02-07 03:53:01 +09:00
Taiki Endo
a07dc4e43c librustc_llvm => 2018 2019-02-07 03:46:54 +09:00
Taiki Endo
0d3e17864e librustc_apfloat => 2018 2019-02-07 03:04:35 +09:00
Jethro Beekman
0d2ab0b77d SGX target: simplify usercall internals
This moves logic from assembly to Rust and removes the special
case for exit/panic handling, merging it with regular usercall
handling.

Also, this fixes a bug in the exit usercall introduced in a75ae00.
The bug would make regular exits look like panics with high
probability. It would also with some probability leak information
through uncleared registers.
2019-02-06 23:24:55 +05:30
Taiki Endo
7bb082d27f libsyntax => 2018 2019-02-07 02:33:01 +09:00
Sebastian Dröge
86d8e47c11 Fix broken grammar in iter::from_fn() docs 2019-02-06 19:24:20 +02:00
Taiki Endo
edbd8a36c8 librustc_resolve => 2018 2019-02-07 02:15:23 +09:00
Taiki Endo
ba0fbd763d librustc_save_analysis => 2018 2019-02-07 01:02:00 +09:00
Taiki Endo
9f4a11c637 librustc_plugin => 2018 2019-02-06 23:56:39 +09:00
Andy Russell
4deb5959a3
display sugared return types for async functions 2019-02-06 09:24:03 -05:00
Taiki Endo
d4a60e01d1 librustc_fs_util => 2018 2019-02-06 23:18:33 +09:00
Pietro Albini
99599245a3
Revert "Auto merge of #57975 - alexcrichton:debug-exit-appveyor, r=pietroalbini"
This reverts commit d3d0bf0e9f, reversing
changes made to 40e6a0bd76.
2019-02-06 15:17:15 +01:00
Pietro Albini
4f20348fd3
Revert "Rollup merge of #58162 - pietroalbini:track-259, r=alexcrichton"
This reverts commit 4c243e2c3d, reversing
changes made to 64f0032a37.
2019-02-06 15:16:50 +01:00
Taiki Endo
ea46f5b2d0 librustc_lsan => 2018 2019-02-06 23:12:47 +09:00
Taiki Endo
44b2cc0941 librustc_allocator => 2018 2019-02-06 22:55:03 +09:00
Taiki Endo
3893b2f04e libprofiler_builtins => 2018 2019-02-06 22:46:01 +09:00
Taiki Endo
30fab05bed librustc_asan => 2018 2019-02-06 22:40:09 +09:00
Taiki Endo
fb0f0bfea6 librustc_msan => 2018 2019-02-06 22:36:25 +09:00
Taiki Endo
20022f8b91 librustc_tsan => 2018 2019-02-06 22:28:47 +09:00
Ralf Jung
a996f2c8dc add tracking issue 2019-02-06 12:55:50 +01:00
Ralf Jung
13bbba273c remove now-unneeded raw ptr casts 2019-02-06 11:23:10 +01:00
Mark Rousskov
57c92696a9 Add embedded book to test such that checktools works 2019-02-06 11:14:43 +01:00
Ralf Jung
f3eede6870 fix doctests 2019-02-06 11:14:12 +01:00
bors
b139669f37 Auto merge of #56123 - oli-obk:import_miri_from_future, r=eddyb
Add a forever unstable opt-out of const qualification checks

r? @eddyb

cc @RalfJung @Centril

basically a forever unstable way to screw with const things in horribly unsafe, unsound and incoherent ways.

Note that this does *not* affect miri except by maybe violating assumptions that miri makes. But there's no change in how miri evaluates things.
2019-02-06 08:42:46 +00:00
Nicholas Nethercote
f7ed6e1816 Make an assert debug-only in find_constraint_paths_between_regions.
This reduces instruction counts for NLL builds of `wg-grammar` by over
20%.
2019-02-06 19:05:50 +11:00
bors
2596bc1368 Auto merge of #58061 - nnethercote:overhaul-syntax-Folder, r=petrochenkov
Overhaul `syntax::fold::Folder`.

This PR changes `syntax::fold::Folder` from a functional style
(where most methods take a `T` and produce a new `T`) to a more
imperative style (where most methods take and modify a `&mut T`), and
renames it `syntax::mut_visit::MutVisitor`.

This makes the code faster and more concise.
2019-02-06 06:01:37 +00:00
bors
0e5a209959 Auto merge of #58058 - QuietMisdreavus:use-attr, r=GuillaumeGomez
rustdoc: don't try to get a DefId for a Def that doesn't have one

Fixes https://github.com/rust-lang/rust/issues/58054

The compiler allows you to write a `use` statement for a built-in non-macro attribute, since `use proc_macro` can apply to both the `proc_macro` crate and the `#[proc_macro]` attribute. However, if you write a use statement for something that *doesn't* have this crossover, rustdoc will try to use it the same way as anything else... which resulted in an ICE because it tried to pull a DefId for something that didn't have one. This PR makes rustdoc skip those lookups when it encounters them, allowing it to properly process and render these imports.
2019-02-06 03:07:04 +00:00
Nicholas Nethercote
f2871a9ce5 Make intern_lazy_const actually intern its argument.
Currently it just unconditionally allocates it in the arena.

For a "Clean Check" build of the the `packed-simd` benchmark, this
change reduces both the `max-rss` and `faults` counts by 59%; it
slightly (~3%) increases the instruction counts but the `wall-time` is
unchanged.

For the same builds of a few other benchmarks, `max-rss` and `faults`
drop by 1--5%, but instruction counts and `wall-time` changes are in the
noise.

Fixes #57432, fixes #57829.
2019-02-06 12:50:28 +11:00
Nicholas Nethercote
bfcbd235a2 Rename fold.rs as mut_visit.rs. 2019-02-06 09:10:05 +11:00
bors
65e647cfe7 Auto merge of #58131 - ehuss:update-cargo, r=alexcrichton
Update cargo

7 commits in 245818076052dd7178f5bb7585f5aec5b6c1e03e..4e74e2fc0908524d17735c768067117d3e84ee9c
2019-01-27 15:17:26 +0000 to 2019-02-02 17:48:44 +0000
- Fix overlapping progress with stdout. (rust-lang/cargo#6618)
- Improve progress bar flickering. (rust-lang/cargo#6615)
- Add detail to multiple rename deps (rust-lang/cargo#6603)
- Fix race condition in local registry crate unpacking (rust-lang/cargo#6591)
- Revert "Make incremental compilation the default for all profiles." (rust-lang/cargo#6610)
- Fixup the docs on crate-type (rust-lang/cargo#6606)
- Document that owner --add now just invites (rust-lang/cargo#6604)
2019-02-05 22:08:47 +00:00
Nicholas Nethercote
9fcb1658ab Overhaul syntax::fold::Folder.
This commit changes `syntax::fold::Folder` from a functional style
(where most methods take a `T` and produce a new `T`) to a more
imperative style (where most methods take and modify a `&mut T`), and
renames it `syntax::mut_visit::MutVisitor`.

The first benefit is speed. The functional style does not require any
reallocations, due to the use of `P::map` and
`MoveMap::move_{,flat_}map`. However, every field in the AST must be
overwritten; even those fields that are unchanged are overwritten with
the same value. This causes a lot of unnecessary memory writes. The
imperative style reduces instruction counts by 1--3% across a wide range
of workloads, particularly incremental workloads.

The second benefit is conciseness; the imperative style is usually more
concise. E.g. compare the old functional style:
```
fn fold_abc(&mut self, abc: ABC) {
    ABC {
        a: fold_a(abc.a),
        b: fold_b(abc.b),
        c: abc.c,
    }
}
```
with the imperative style:
```
fn visit_abc(&mut self, ABC { a, b, c: _ }: &mut ABC) {
    visit_a(a);
    visit_b(b);
}
```
(The reductions get larger in more complex examples.)

Overall, the patch removes over 200 lines of code -- even though the new
code has more comments -- and a lot of the remaining lines have fewer
characters.

Some notes:

- The old style used methods called `fold_*`. The new style mostly uses
  methods called `visit_*`, but there are a few methods that map a `T`
  to something other than a `T`, which are called `flat_map_*` (`T` maps
  to multiple `T`s) or `filter_map_*` (`T` maps to 0 or 1 `T`s).

- `move_map.rs`/`MoveMap`/`move_map`/`move_flat_map` are renamed
  `map_in_place.rs`/`MapInPlace`/`map_in_place`/`flat_map_in_place` to
  reflect their slightly changed signatures.

- Although this commit renames the `fold` module as `mut_visit`, it
  keeps it in the `fold.rs` file, so as not to confuse git. The next
  commit will rename the file.
2019-02-06 09:06:27 +11:00
Ralf Jung
b331b86d30 extend box-maybe-uninit test 2019-02-05 22:26:30 +01:00
Dan Robertson
80c052bed7
Do not ICE in codegen given a extern_type static
The layout of a extern_type static is unsized, but may pass the
Well-Formed check in typeck. As a result, we cannot assume that
a static is sized when generating the `Place` for an r-value.
2019-02-05 21:20:07 +00:00
Ralf Jung
d371bcefb5 fix test case 2019-02-05 22:18:17 +01:00
Patrick McCarter
9204497c29 Allow const assignment for int saturating_add() calls for #58030 2019-02-05 15:36:31 -05:00
Andy Russell
113b7f7be1
allow shorthand syntax for deprecation reason 2019-02-05 15:26:26 -05:00
ljedrz
6da9129b36 typeck: partially HirIdify 2019-02-05 20:34:06 +01:00
ljedrz
44752c260b mir: partially HirIdify 2019-02-05 20:28:11 +01:00
ljedrz
8d6e5fc20f rustc: partially HirIdify 2019-02-05 20:26:24 +01:00
Eric Huss
55917ba0e7 Update cargo 2019-02-05 11:17:23 -08:00
bors
4b1e39b7b3 Auto merge of #57851 - Aaron1011:fix/clean-lifetime, r=GuillaumeGomez
Don't try to clean predicates involving ReErased

There's nothing to render when we have a bound involving ReErased (either
a type or region outliving it), so we don't attempt to generate a clean
WherePredicate

Fixes #57806

I haven't been able to come up with a minimized reproduction for the issue, but I've confirmed that this allows the docs to build for `parqet-rs`
2019-02-05 19:12:11 +00:00