Commit Graph

63526 Commits

Author SHA1 Message Date
bors
ff13b7c918 Auto merge of #41459 - frewsxcv:rollup, r=frewsxcv
Rollup of 4 pull requests

- Successful merges: #37658, #41405, #41432, #41435
- Failed merges:
2017-04-22 03:31:53 +00:00
Corey Farwell
df72158d47 Rollup merge of #41435 - estebank:issue-33884, r=nikomatsakis
Add test for issue 33884

Fix #33884.

r=nikomatsakis
2017-04-21 23:29:15 -04:00
Corey Farwell
48a9d5f6d3 Rollup merge of #41432 - abonander:issue_41211, r=jseyfried
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

r? @jseyfried
2017-04-21 23:29:15 -04:00
Corey Farwell
aff40e2de3 Rollup merge of #41405 - GuillaumeGomez:rustdoc-warning-improvement, r=steveklabnik
Fix line display for hoedown

Fixes #41401.

r? @rust-lang/docs
2017-04-21 23:29:14 -04:00
Corey Farwell
5da19f2b69 Rollup merge of #37658 - GuillaumeGomez:ref_suggestion, r=nikomatsakis,eddyb
Ref suggestion
2017-04-21 23:29:13 -04:00
Niko Matsakis
6d86f81eb1 move the uses of the trans caches into rustc::traits
This makes these routines more readily available for other bits of
code. It also will help when refactoring.
2017-04-21 21:02:14 -04:00
Cameron Hart
946f8e6a59 Use primitive align for tagged enum fill.
Hopefully will fix assert on ARM where vector types are being used as
the fill type for enums containing repr aligned types greater than the
largest possible native type, thus don't match the Layout's alignment
and triggers an assert.
2017-04-22 09:38:23 +10:00
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