Commit Graph

63518 Commits

Author SHA1 Message Date
Niko Matsakis
85527456e8 use Symbol/InternedString in the cache 2017-04-21 17:26:53 -04:00
Niko Matsakis
f4c183b742 move the trans trait caches into tcx
Arguably these could become custom queries, but I chose not to do that
because the relationship of queries and trait system is not yet fleshed
out enough. For now it seems fine to have them be `DepTrackingMap` using
the memoize pattern.
2017-04-21 17:26:53 -04:00
Niko Matsakis
e48a759f51 sort provide 2017-04-21 17:26:53 -04:00
Niko Matsakis
264f237f98 make reachable_set ref-counted
Once it is computed, no need to deep clone the set.
2017-04-21 17:26:53 -04:00
Niko Matsakis
c446cb086b just take tcx where we can
The more we can things dependent on just tcx, the easier it will
be to make queries etc later on.
2017-04-21 17:26:53 -04:00
Niko Matsakis
39a58c38a0 introduce the rather simpler symbol-cache in place of symbol-map
The symbol map is not good for incremental: it has inputs from every fn
in existence, and it will change if anything changes. One could imagine
cheating with the symbol-map and exempting it from the usual dependency
tracking, since the results are fully deterministic. Instead, I opted to
just add a per-CGU cache, on the premise that recomputing some symbol
names is not going to be so very expensive.
2017-04-21 17:26:53 -04:00
Niko Matsakis
4c31750cd9 remove translation_items from SharedCrateContext
If we are going to hash `SharedCrateContext`, we don't want a list of
things that pertain to **every CGU** in there.
2017-04-21 17:26:53 -04:00
Niko Matsakis
8289e5a73e introduce is_foreign_item query
This may seem like overkill, but it's exactly what we want/need for
incremental compilation I think. In particular, while generating code
for some codegen unit X, we can wind up querying about any number of
external items, and we only want to be forced to rebuild X is some of
those changed from a foreign item to otherwise. Factoring this into a
query means we would re-run only if some `false` became `true` (or vice
versa).
2017-04-21 17:26:53 -04:00
Guillaume Gomez
7ce1eb77c7 Update ui test 2017-04-21 22:58:15 +02:00
Ralph Giles
1a5c01ccfc Update cargo.
Bump our associated cargo to pick up the RUSTC_WRAPPER feature
for use with build caches.
2017-04-21 11:40:16 -07:00
Vadim Petrochenkov
8838cd10f2 Move parse_remaining_bounds into a separate function 2017-04-21 21:32:44 +03:00
Vadim Petrochenkov
6e75def7db Fix issue with single question mark or paren 2017-04-21 21:32:44 +03:00
Vadim Petrochenkov
e038f58105 syntax: Support parentheses around trait bounds 2017-04-21 21:32:44 +03:00
bors
1785bca513 Auto merge of #41445 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #41372, #41376, #41426, #41429
- Failed merges:
2017-04-21 16:36:41 +00:00
Guillaume Gomez
7d3284ebc1 Create a new method to run coercion inside probe 2017-04-21 16:13:26 +02:00
bors
5695c3e943 Auto merge of #41349 - eddyb:ty-contents, r=nikomatsakis
rustc: replace TypeContents with two independent properties (is_freeze / needs_drop).

`InteriorUnsafe` / `interior_unsafe` was replaced with a private lang-item `Freeze` auto trait in libcore.

`OwnsDtor` / `needs_drop` was replaced with a specialized traversal that *doesn't* avoid caching results in case of a cycle, as the only cycles left can only occur in erroneous "types with infinite sizes", references and raw pointers not having destructors. Also, `Copy` is now checked at every step of the recursion.

r? @nikomatsakis
2017-04-21 14:02:37 +00:00
Eduard-Mihai Burtescu
89bd3f39ca Update #[no_core] users with the "freeze" lang item. 2017-04-21 15:48:35 +03:00
Corey Farwell
35dd55d007 Rollup merge of #41429 - jonathandturner:update_rls_submod, r=alexcrichton
Bump the rls submodule revision

Bump the RLS version to include a few recent fixes.
2017-04-21 08:40:36 -04:00
Corey Farwell
d5bbeb1a0a Rollup merge of #41426 - malbarbo:android-x86_64, r=alexcrichton
Add x86_64-linux-android target
2017-04-21 08:40:35 -04:00
Corey Farwell
d983256f36 Rollup merge of #41376 - mbrubeck:docs, r=frewsxcv
Expanded docs and examples for PathBuf::file_name and friends

This addresses some common surprises when `PathBuf::set_file_name` is called on the path of a directory rather than a file.

r? @steveklabnik
2017-04-21 08:40:34 -04:00
Corey Farwell
cf11d3c66a Rollup merge of #41372 - nbigaouette:master, r=alexcrichton
Use an (over-writable) environment variable for the `gdb` command

Instead of hard-coding the command to run, using the environment
variable `GDB_CMD` (that defaults to `gdb`) allows using a different
debugger than the default `gdb` executable.

This gives the possibility to use `cgdb` as the debugger, which provides
a nicer user interface. Note that one has to use `GDB_CMD="cgdb --"` to
use cgdb (note the trailing `--`) to let cgdb pass the proper arguments
to `gdb`.
2017-04-21 08:40:33 -04:00
Guillaume Gomez
8fe3a9a8f1 Update tests 2017-04-21 12:28:24 +02:00
Guillaume Gomez
d360091e79 Add suggestion for & coercions 2017-04-21 12:28:24 +02:00
Tobias Bucher
c49d0906da Specify behavior of write_all for ErrorKind::Interrupted errors
Also spell out that read and write operations should be retried on
`ErrorKind::Interrupted` errors.

Fixes #38494.
2017-04-21 10:32:13 +02:00
bors
4ed95009d8 Auto merge of #41245 - estebank:multiline-trim, r=nikomatsakis
Reduce visual clutter of multiline start when possible

When a span starts on a line with nothing but whitespace to the left,
and there are no other annotations in that line, simplify the visual
representation of the span.

Go from:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 |   struct A {
  |  _^ starting here...
2 | |     a: A,
3 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
```

To:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 | / struct A {
2 | |     a: A,
3 | | }
  | |_^ recursive type has infinite size
```

Re: #38246.

r? @nikomatsakis CC @jonathandturner
2017-04-21 06:59:25 +00:00
Josh Stone
c1aaa60d8d Remove float_extras
[unstable, deprecated since 1.11.0]
2017-04-20 21:16:31 -07:00
Josh Stone
c903ac64e5 Remove num::{Zero,One}
[unstable, deprecated since 1.11.0]
2017-04-20 21:16:31 -07:00
Josh Stone
313aab8fbe Remove RefCell::borrow_state
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone
cc605c895e Remove {Cell,RefCell}::as_unsafe_cell
[unstable, deprecated since 1.12.0]
2017-04-20 21:16:31 -07:00
Josh Stone
f0c5e8b8fc Privatize Rc::is_unique
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone
f4aaae9bdb Remove Rc::would_wrap
[unstable, deprecated since 1.15.0]
2017-04-20 21:16:31 -07:00
Josh Stone
df86cecdd2 Remove OccupiedEntry::remove_pair
[unstable, deprecated since 1.12.0]
2017-04-20 21:16:31 -07:00
Josh Stone
a724ff90e7 Remove BinaryHeap::{push_pop,replace}
[unstable, deprecated since 1.13.0]
2017-04-20 21:16:31 -07:00
Josh Stone
a76274e533 Remove EnumSet
[unstable, deprecated since 1.16.0]
2017-04-20 21:16:31 -07:00
Esteban Küber
cc07c357e4 Reduce visual clutter of multiline start when possible
When a span starts on a line with nothing but whitespace to the left,
and there are no other annotations in that line, simplify the visual
representation of the span.

Go from:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 |   struct A {
  |  _^ starting here...
2 | |     a: A,
3 | | }
  | |_^ ...ending here: recursive type has infinite size
  |
```

To:

```rust
error[E0072]: recursive type `A` has infinite size
 --> file2.rs:1:1
  |
1 | / struct A {
2 | |     a: A,
3 | | }
  | |_^ recursive type has infinite size
```

Remove `starting here...`/`...ending here` labels from all multiline
diagnostics.
2017-04-20 17:31:20 -07:00
Esteban Küber
903bdfccd0 Add test for issue 33884
Fix #33884
2017-04-20 17:06:39 -07:00
bors
535ee6c7f0 Auto merge of #41342 - GuillaumeGomez:btree-debug-infinite, r=alexcrichton
Fix debug infinite loop

Fixes #41338.
2017-04-20 23:40:06 +00:00
Austin Bonander
910532ea45 Don't panic if an attribute macro fails to resolve at crate root
Adds temporary regression test; this ideally should work as-is (#41430)

Closes #41211
2017-04-20 16:13:13 -07:00
Cameron Hart
c219cdfa11 Removed sizing parameter from struct_llfields. 2017-04-21 07:37:10 +10:00
Cameron Hart
7971a47eff Added feature gate, updated error messages and tests. 2017-04-21 07:37:10 +10:00
Cameron Hart
4358e35fda Implementation of repr struct alignment RFC 1358.
The main changes around rustc::ty::Layout::struct and rustc_trans:adt:
* Added primitive_align field which stores alignment before repr align
* Always emit field padding when generating the LLVM struct fields
* Added methods for adjusting field indexes from the layout index to the
  LLVM struct field index

The main user of this information is rustc_trans::adt::struct_llfields
which determines the LLVM fields to be used by LLVM, including padding
fields.
2017-04-21 07:32:32 +10:00
Jonathan Turner
865f5d099c Bump the rls submodule revision 2017-04-21 09:20:04 +12:00
Marco A L Barbosa
51cc0e38e3 Add x86_64-linux-android target 2017-04-20 16:29:59 -03:00
Matt Brubeck
3b4d34d4fa Expanded docs and examples for PathBuf::file_name and friends 2017-04-20 11:33:05 -07:00
Guillaume Gomez
a65461005a Fix line display for hoedown 2017-04-20 20:20:40 +02:00
bors
ddc5d7bd4b Auto merge of #41424 - frewsxcv:rollup, r=frewsxcv
Rollup of 2 pull requests

- Successful merges: #40812, #40987
- Failed merges:
2017-04-20 17:33:58 +00:00
Corey Farwell
9d918223a8 Rollup merge of #40987 - maccoda:convert-docs, r=steveklabnik
API docs: Convert

Clean up of the convert module documentation following points in #29349
2017-04-20 13:33:13 -04:00
Corey Farwell
83e22b8b24 Rollup merge of #40812 - mgattozzi:ChildDocs, r=steveklabnik
Update `Child` docs to not have a note section

In #29370 it's noted that for "the Note shouldn't be one, and should come before
the examples." This commit changes the positioning of the section and removes
wording that said take note in order for it to flow better with the surrounding
text and it's new position.
2017-04-20 13:33:12 -04:00
Marco A L Barbosa
416d6b73df Update libc to include x86_64-linux-android support 2017-04-20 13:59:41 -03:00
Nicolas Bigaouette
61b7ebe7d3 Rename environment variable GDB_CMD to RUST_GDB to prevent ambiguity 2017-04-20 11:20:33 -04:00