Commit Graph

63606 Commits

Author SHA1 Message Date
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
Esteban Küber
cd60307acb Do not show ::constructor on tuple struct diagnostics 2017-04-20 17:00:40 -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
bors
968ae7babe Auto merge of #41191 - seanmonstar:spec-extend-vec-intoiter, r=alexcrichton
specialize Extend for Vec with IntoIter

Before, `vec.extend(&other_vec)` was quite a bit faster than `vec.extend(other_vec)`. This allows extending by consuming a vec to use the same code as extending from a slice.
2017-04-20 13:08:07 +00:00
Eduard-Mihai Burtescu
0adfd810f8 rustc: combine type_needs_drop_given_env and may_drop into needs_drop. 2017-04-20 14:44:43 +03:00
Eduard-Mihai Burtescu
9ad3b94847 rustc: replace TypeContents::needs_drop with Ty::may_drop. 2017-04-20 14:39:31 +03:00
Eduard-Mihai Burtescu
6563374ed2 rustc: replace interior_unsafe with a Freeze trait. 2017-04-20 14:39:31 +03:00
Eduard-Mihai Burtescu
3f5c311dc1 rustc: simplify TypeContents drastically. 2017-04-20 14:39:30 +03:00
bors
fa6b50fc62 Auto merge of #41413 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #41214, #41369, #41377, #41378, #41390
- Failed merges:
2017-04-20 06:28:16 +00:00
Corey Farwell
204243fcac Rollup merge of #41390 - scottmcm:toowned-clone-into, r=alexcrichton
Override ToOwned::clone_into for Path and OsStr

The only non-overridden one remaining is the CStr impl, which cannot
be optimized as doing so would break CString's second invariant.

Follow-up to 7ec27ae (PR #41009).

r? @alexcrichton
2017-04-20 01:39:56 -04:00
Corey Farwell
1b7e6c3898 Rollup merge of #41378 - eddyb:byval-is-not-like-sret, r=arielb1
rustc_trans: do not treat byval as using up registers.

Perhaps not that well-documented, `byval` pointer arguments *are not* the same as pointer arguments used by pass-by-ref, but rather the pointer is only used by LLVM to pass the *contents* on the stack.

Fixes #41375.
2017-04-20 01:39:56 -04:00
Corey Farwell
348d66c73f Rollup merge of #41377 - nikomatsakis:issue-41298-ICE-inference, r=eddyb
Fix ICE building gluon_vm

The problem was due to various places we were failing to propagate obligations. I think I got them mostly correct, but I didn't get around to writing test cases for each case.

r? @eddyb or @arielb1
2017-04-20 01:39:55 -04:00
Corey Farwell
1987fc1019 Rollup merge of #41369 - cuviper:arm-stage0, r=alexcrichton
Bump stage0 to fix ARM LLVM

There was a serious ARM codegen bug in LLVM that was fixed by #40779,
also backported to beta.  This updates stage0 to 1.17.0-beta.3 to pick
up that change, so ARM can bootstrap natively again.

Fixes #41291
cc @arielb1
2017-04-20 01:39:54 -04:00
Corey Farwell
236978e411 Rollup merge of #41214 - estebank:less-multiline, r=petrochenkov
Add a way to get shorter spans until `char` for pointing at defs

```rust
error[E0072]: recursive type `X` has infinite size
  --> file.rs:10:1
   |
10 | struct X {
   | ^^^^^^^^ recursive type has infinite size
   |
   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable
```

vs

```rust
error[E0072]: recursive type `X` has infinite size
  --> file.rs:10:1
   |
10 |   struct X {
   |  _^ starting here...
11 | |     x: X,
12 | | }
   | |_^ ...ending here: recursive type has infinite size
   |
   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `X` representable
```

Re: #35965,  #38246. Follow up to #38328.

r? @jonathandturner
2017-04-20 01:39:53 -04:00
bors
1bb1530239 Auto merge of #41411 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests

- Successful merges: #41295, #41348, #41374, #41380, #41391, #41398, #41403
- Failed merges: #41376
2017-04-20 01:56:59 +00:00
Corey Farwell
1c69895f86 Rollup merge of #41403 - mbrickn:patch-1, r=petrochenkov
Updated links to use https

I just updated a few links to use https instead of http.

Thank you! 😄
2017-04-19 21:55:42 -04:00