]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agosupport `default impl` for specialization
Gianni Ciccarelli [Fri, 18 Nov 2016 16:14:42 +0000 (17:14 +0100)]
support `default impl` for specialization

this commit implements the first step of the `default impl` feature:
all items in a `default impl` are (implicitly) `default` and hence
specializable.
In order to test this feature I've copied all the tests provided for the
`default` method implementation (in run-pass/specialization and
compile-fail/specialization directories) and moved the `default` keyword
from the item to the impl.
See referenced issue for further info

7 years agoAuto merge of #41486 - arielb1:select-where, r=eddyb
bors [Sun, 23 Apr 2017 23:06:50 +0000 (23:06 +0000)]
Auto merge of #41486 - arielb1:select-where, r=eddyb

traits::select: quickly filter out predicates from other traits

this improves most pre-trans passes's performance by ~1%.

That missed the spring cleaning PR because I wanted to ship it.

r? @eddyb

7 years agoAuto merge of #41485 - arielb1:dtorck-constraint, r=eddyb
bors [Sun, 23 Apr 2017 20:11:50 +0000 (20:11 +0000)]
Auto merge of #41485 - arielb1:dtorck-constraint, r=eddyb

cache dtorck constraints on ADTs

This avoids visiting the fields of all structs multiple times, improving item-bodies checking time by 10% (!).

Not sure whether we want this in 1.18 or 1.19. It's a big-ish patch, but the 10% win is very tempting.

r? @eddyb

7 years agocache ADT dtorck results
Ariel Ben-Yehuda [Sun, 23 Apr 2017 14:43:23 +0000 (17:43 +0300)]
cache ADT dtorck results

This avoids visiting the fields of all structs multiple times, improving
item-bodies checking time by 10% (!).

7 years agotraits::select: quickly filter out predicates from other traits
Ariel Ben-Yehuda [Sun, 23 Apr 2017 20:05:25 +0000 (23:05 +0300)]
traits::select: quickly filter out predicates from other traits

this improves most pre-trans passes's performance by ~1%.

7 years agoclean-up adt_sized_constraint now that it uses on-demand
Ariel Ben-Yehuda [Fri, 21 Apr 2017 17:24:32 +0000 (20:24 +0300)]
clean-up adt_sized_constraint now that it uses on-demand

7 years agoAuto merge of #41408 - eddyb:poly-const-eval, r=arielb1
bors [Sun, 23 Apr 2017 08:35:00 +0000 (08:35 +0000)]
Auto merge of #41408 - eddyb:poly-const-eval, r=arielb1

rustc: generalize monomorphic_const_eval to polymorphic constants.

With the addition of `Substs` to the query key, we can now evaluate *and cache* polymorphic constants.

Fixes #23898 by replacing the crippled explicit-discriminant-only local-crate-only `lookup_variant_by_id` with `ConstVal::Variant` which can describe variants irrespective of their discriminant.

Fixes #41394 by fixing #23898 (for the original testcase) and by not looping past the first discriminant.

7 years agorustc_const_eval: support all unit enum variants.
Eduard-Mihai Burtescu [Wed, 19 Apr 2017 12:16:19 +0000 (15:16 +0300)]
rustc_const_eval: support all unit enum variants.

7 years agorustc_const_eval: CallOn isn't needed, typeck/const-qualif handle those cases.
Eduard-Mihai Burtescu [Wed, 19 Apr 2017 12:15:12 +0000 (15:15 +0300)]
rustc_const_eval: CallOn isn't needed, typeck/const-qualif handle those cases.

7 years agorustc: make the const-eval cache polymorphic.
Eduard-Mihai Burtescu [Tue, 18 Apr 2017 20:38:15 +0000 (23:38 +0300)]
rustc: make the const-eval cache polymorphic.

7 years agoAuto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichton
bors [Sun, 23 Apr 2017 02:13:55 +0000 (02:13 +0000)]
Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichton

Remove items that are unstable and deprecated

This removes unstable items that have been deprecated for more than one cycle.

- Since 1.16.0, `#![feature(enumset)]`
    - All of `mod collections::enum_set`
- Since 1.15.0, `#![feature(borrow_state)]`
    - `cell::BorrowState`
    - `RefCell::borrow_state()`
- Since 1.15.0, `#![feature(is_unique)]`
    - `Rc::is_unique()` (made private like `Arc::is_unique()`)
- Since 1.15.0, `#![feature(rc_would_unwrap)]`
    - `Rc::would_wrap()`
- Since 1.13.0, `#![feature(binary_heap_extras)]`
    - `BinaryHeap::push_pop()`
    - `BinaryHeap::replace()`
- Since 1.12.0, `#![feature(as_unsafe_cell)]`
    - `Cell::as_unsafe_cell()`
    - `RefCell::as_unsafe_cell()`
- Since 1.12.0, `#![feature(map_entry_recover_keys)]`
    - `btree_map::OccupiedEntry::remove_pair()`
    - `hash_map::OccupiedEntry::remove_pair()`
- Since 1.11.0, `#![feature(float_extras)]`
    - `Float::nan()`
    - `Float::infinity()`
    - `Float::neg_infinity()`
    - `Float::neg_zero()`
    - `Float::zero()`
    - `Float::one()`
    - `Float::integer_decode()`
    - `f32::integer_decode()`
    - `f32::ldexp()`
    - `f32::frexp()`
    - `f32::next_after()`
    - `f64::integer_decode()`
    - `f64::ldexp()`
    - `f64::frexp()`
    - `f64::next_after()`
- Since 1.11.0, `#![feature(zero_one)]`
    - `num::Zero`
    - `num::One`

7 years agoRemove unused import.
Corey Farwell [Sun, 23 Apr 2017 02:13:22 +0000 (22:13 -0400)]
Remove unused import.

7 years agoAuto merge of #41469 - arielb1:rustc-spring-cleaning, r=eddyb
bors [Sat, 22 Apr 2017 20:07:01 +0000 (20:07 +0000)]
Auto merge of #41469 - arielb1:rustc-spring-cleaning, r=eddyb

Performance audit, Spring 2017

Fix up some quite important performance "surprises" I've found running callgrind on rustc.

7 years agobail out of selection when there are multiple surviving candidates
Ariel Ben-Yehuda [Sat, 22 Apr 2017 12:05:18 +0000 (15:05 +0300)]
bail out of selection when there are multiple surviving candidates

In some cases (e.g. <[int-var] as Add<[int-var]>>), selection can turn up
a large number of candidates. Bailing out early avoids O(n^2) performance.

This improves item-type checking time by quite a bit, resulting in ~2% of total
time-to-typeck.

7 years agoadd a cache to impl_polarity
Ariel Ben-Yehuda [Thu, 20 Apr 2017 17:37:02 +0000 (20:37 +0300)]
add a cache to impl_polarity

this is another one of these things that looks *much* worse on valgrind.

7 years agoallocate less strings in `symbol_names`
Ariel Ben-Yehuda [Thu, 20 Apr 2017 15:38:35 +0000 (18:38 +0300)]
allocate less strings in `symbol_names`

this improves trans performance by *another* 10%.

7 years agoweak_lang_items: check for `lang` attribute before calling `value_str`
Ariel Ben-Yehuda [Thu, 20 Apr 2017 14:17:13 +0000 (17:17 +0300)]
weak_lang_items: check for `lang` attribute before calling `value_str`

improves trans performance by *another* 10%.

7 years agocache attributes of items from foreign crates
Ariel Ben-Yehuda [Thu, 20 Apr 2017 12:08:41 +0000 (15:08 +0300)]
cache attributes of items from foreign crates

this avoids parsing item attributes on each call to `item_attrs`, which takes
off 33% (!) of translation time and 50% (!) of trans-item collection time.

7 years agoshort-cut SharedCrateContext::layout_of
Ariel Ben-Yehuda [Thu, 20 Apr 2017 00:14:39 +0000 (03:14 +0300)]
short-cut SharedCrateContext::layout_of

That method is *incredibly* hot, so this ends up saving 10% of trans
time.

BTW, we really should be doing dependency tracking there - and possibly be
taking the respective perf hit (got to find a way to make DTMs fast), but
`layout_cache` is a non-dep-tracking map.

7 years agoavoid calling `mk_region` unnecessarily
Ariel Ben-Yehuda [Wed, 19 Apr 2017 22:58:12 +0000 (01:58 +0300)]
avoid calling `mk_region` unnecessarily

this improves typeck & trans performance by 1%. This looked hotter on
callgrind than it is on a CPU.

7 years agoremove cleanup branches to the resume block
Ariel Ben-Yehuda [Wed, 19 Apr 2017 22:20:50 +0000 (01:20 +0300)]
remove cleanup branches to the resume block

This improves LLVM performance by 10% lost during the shimmir transition.

7 years agoAuto merge of #41431 - GuillaumeGomez:hoedown-default, r=aturon
bors [Sat, 22 Apr 2017 17:37:04 +0000 (17:37 +0000)]
Auto merge of #41431 - GuillaumeGomez:hoedown-default, r=aturon

Re-enable hoedown by default

r? @rust-lang/docs

cc @aturon

7 years agoAuto merge of #41464 - frewsxcv:rollup, r=frewsxcv
bors [Sat, 22 Apr 2017 14:17:36 +0000 (14:17 +0000)]
Auto merge of #41464 - frewsxcv:rollup, r=frewsxcv

Rollup of 3 pull requests

- Successful merges: #41077, #41355, #41450
- Failed merges:

7 years agoRollup merge of #41450 - rillian:rustc-wrapper, r=alexcrichton
Corey Farwell [Sat, 22 Apr 2017 13:02:58 +0000 (09:02 -0400)]
Rollup merge of #41450 - rillian:rustc-wrapper, r=alexcrichton

Update cargo for 1.18.0.

Bump our associated cargo to pick up the RUSTC_WRAPPER feature
for use with build caches.

7 years agoRollup merge of #41355 - nikomatsakis:incr-comp-refactor-trans-2, r=eddyb
Corey Farwell [Sat, 22 Apr 2017 13:02:57 +0000 (09:02 -0400)]
Rollup merge of #41355 - nikomatsakis:incr-comp-refactor-trans-2, r=eddyb

Refactor trans some more to pave way for incremental compilation

Various refactorings paving the way for the newer approach to incremental compilation (And, in particular, to "query-ifying" trans). My partial goal is to remove `SharedCrateContext`; this PR gets about as far as I can easily get before starting to really want the red/green algorithm.

r? @eddyb
cc @michaelwoerister

7 years agoRollup merge of #41077 - petrochenkov:boundparen, r=nikomatsakis
Corey Farwell [Sat, 22 Apr 2017 13:02:56 +0000 (09:02 -0400)]
Rollup merge of #41077 - petrochenkov:boundparen, r=nikomatsakis

syntax: Support parentheses around trait bounds

An implementation for https://github.com/rust-lang/rust/issues/39318#issuecomment-290956826

r? @nikomatsakis

7 years agoFix line display
Guillaume Gomez [Sat, 22 Apr 2017 12:56:36 +0000 (14:56 +0200)]
Fix line display

7 years agoAuto merge of #39999 - bitshifter:struct_align, r=eddyb
bors [Sat, 22 Apr 2017 11:50:40 +0000 (11:50 +0000)]
Auto merge of #39999 - bitshifter:struct_align, r=eddyb

Implementation of repr struct alignment RFC 1358.

The main changes around rustc::ty::Layout::struct:
* Added abi_align field which stores abi alignment before repr align is applied
* align field contains transitive repr alignment
* Added padding vec which stores padding required after fields

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.

A possible future optimisation would be to put the padding Vec in an Option, since it will be unused unless you are using repr align.

7 years agoFix tests
Guillaume Gomez [Fri, 21 Apr 2017 16:41:47 +0000 (18:41 +0200)]
Fix tests

7 years agoFix invalid linkage
Guillaume Gomez [Fri, 21 Apr 2017 14:09:28 +0000 (16:09 +0200)]
Fix invalid linkage

7 years agoSet hoedown to generate error index
Guillaume Gomez [Fri, 21 Apr 2017 10:27:48 +0000 (12:27 +0200)]
Set hoedown to generate error index

7 years agoRe-enable hoedown by default
Guillaume Gomez [Thu, 20 Apr 2017 22:32:23 +0000 (00:32 +0200)]
Re-enable hoedown by default

7 years agoAuto merge of #41459 - frewsxcv:rollup, r=frewsxcv
bors [Sat, 22 Apr 2017 03:31:53 +0000 (03:31 +0000)]
Auto merge of #41459 - frewsxcv:rollup, r=frewsxcv

Rollup of 4 pull requests

- Successful merges: #37658, #41405, #41432, #41435
- Failed merges:

7 years agoRollup merge of #41435 - estebank:issue-33884, r=nikomatsakis
Corey Farwell [Sat, 22 Apr 2017 03:29:15 +0000 (23:29 -0400)]
Rollup merge of #41435 - estebank:issue-33884, r=nikomatsakis

Add test for issue 33884

Fix #33884.

r=nikomatsakis

7 years agoRollup merge of #41432 - abonander:issue_41211, r=jseyfried
Corey Farwell [Sat, 22 Apr 2017 03:29:15 +0000 (23:29 -0400)]
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

7 years agoRollup merge of #41405 - GuillaumeGomez:rustdoc-warning-improvement, r=steveklabnik
Corey Farwell [Sat, 22 Apr 2017 03:29:14 +0000 (23:29 -0400)]
Rollup merge of #41405 - GuillaumeGomez:rustdoc-warning-improvement, r=steveklabnik

Fix line display for hoedown

Fixes #41401.

r? @rust-lang/docs

7 years agoRollup merge of #37658 - GuillaumeGomez:ref_suggestion, r=nikomatsakis,eddyb
Corey Farwell [Sat, 22 Apr 2017 03:29:13 +0000 (23:29 -0400)]
Rollup merge of #37658 - GuillaumeGomez:ref_suggestion, r=nikomatsakis,eddyb

Ref suggestion

7 years agomove the uses of the trans caches into rustc::traits
Niko Matsakis [Sat, 22 Apr 2017 01:02:14 +0000 (21:02 -0400)]
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.

7 years agoUse primitive align for tagged enum fill.
Cameron Hart [Fri, 21 Apr 2017 23:38:23 +0000 (09:38 +1000)]
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.

7 years agouse Symbol/InternedString in the cache
Niko Matsakis [Fri, 21 Apr 2017 21:26:25 +0000 (17:26 -0400)]
use Symbol/InternedString in the cache

7 years agomove the trans trait caches into tcx
Niko Matsakis [Mon, 17 Apr 2017 16:35:53 +0000 (12:35 -0400)]
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.

7 years agosort `provide`
Niko Matsakis [Mon, 17 Apr 2017 13:08:34 +0000 (09:08 -0400)]
sort `provide`

7 years agomake `reachable_set` ref-counted
Niko Matsakis [Fri, 14 Apr 2017 19:33:52 +0000 (15:33 -0400)]
make `reachable_set` ref-counted

Once it is computed, no need to deep clone the set.

7 years agojust take `tcx` where we can
Niko Matsakis [Fri, 14 Apr 2017 19:30:06 +0000 (15:30 -0400)]
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.

7 years agointroduce the rather simpler symbol-cache in place of symbol-map
Niko Matsakis [Fri, 14 Apr 2017 19:10:53 +0000 (15:10 -0400)]
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.

7 years agoremove `translation_items` from `SharedCrateContext`
Niko Matsakis [Fri, 14 Apr 2017 17:27:39 +0000 (13:27 -0400)]
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.

7 years agointroduce `is_foreign_item` query
Niko Matsakis [Fri, 14 Apr 2017 14:51:22 +0000 (10:51 -0400)]
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).

7 years agoUpdate ui test
Guillaume Gomez [Fri, 21 Apr 2017 11:28:31 +0000 (13:28 +0200)]
Update ui test

7 years agoUpdate cargo.
Ralph Giles [Fri, 21 Apr 2017 18:40:16 +0000 (11:40 -0700)]
Update cargo.

Bump our associated cargo to pick up the RUSTC_WRAPPER feature
for use with build caches.

7 years agoMove parse_remaining_bounds into a separate function
Vadim Petrochenkov [Fri, 21 Apr 2017 18:32:11 +0000 (21:32 +0300)]
Move parse_remaining_bounds into a separate function

7 years agoFix issue with single question mark or paren
Vadim Petrochenkov [Thu, 20 Apr 2017 21:19:06 +0000 (00:19 +0300)]
Fix issue with single question mark or paren

7 years agosyntax: Support parentheses around trait bounds
Vadim Petrochenkov [Tue, 4 Apr 2017 22:12:53 +0000 (01:12 +0300)]
syntax: Support parentheses around trait bounds

7 years agoAuto merge of #41445 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 21 Apr 2017 16:36:41 +0000 (16:36 +0000)]
Auto merge of #41445 - frewsxcv:rollup, r=frewsxcv

Rollup of 4 pull requests

- Successful merges: #41372, #41376, #41426, #41429
- Failed merges:

7 years agoCreate a new method to run coercion inside probe
Guillaume Gomez [Wed, 9 Nov 2016 23:25:45 +0000 (00:25 +0100)]
Create a new method to run coercion inside probe

7 years agoAuto merge of #41349 - eddyb:ty-contents, r=nikomatsakis
bors [Fri, 21 Apr 2017 14:02:37 +0000 (14:02 +0000)]
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

7 years agoUpdate #[no_core] users with the "freeze" lang item.
Eduard-Mihai Burtescu [Tue, 18 Apr 2017 08:02:21 +0000 (11:02 +0300)]
Update #[no_core] users with the "freeze" lang item.

7 years agoRollup merge of #41429 - jonathandturner:update_rls_submod, r=alexcrichton
Corey Farwell [Fri, 21 Apr 2017 12:40:36 +0000 (08:40 -0400)]
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.

7 years agoRollup merge of #41426 - malbarbo:android-x86_64, r=alexcrichton
Corey Farwell [Fri, 21 Apr 2017 12:40:35 +0000 (08:40 -0400)]
Rollup merge of #41426 - malbarbo:android-x86_64, r=alexcrichton

Add x86_64-linux-android target

7 years agoRollup merge of #41376 - mbrubeck:docs, r=frewsxcv
Corey Farwell [Fri, 21 Apr 2017 12:40:34 +0000 (08:40 -0400)]
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

7 years agoRollup merge of #41372 - nbigaouette:master, r=alexcrichton
Corey Farwell [Fri, 21 Apr 2017 12:40:33 +0000 (08:40 -0400)]
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`.

7 years agoUpdate tests
Guillaume Gomez [Tue, 8 Nov 2016 21:55:58 +0000 (22:55 +0100)]
Update tests

7 years agoAdd suggestion for & coercions
Guillaume Gomez [Tue, 8 Nov 2016 21:54:31 +0000 (22:54 +0100)]
Add suggestion for & coercions

7 years agoAuto merge of #41245 - estebank:multiline-trim, r=nikomatsakis
bors [Fri, 21 Apr 2017 06:59:25 +0000 (06:59 +0000)]
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

7 years agoRemove float_extras
Josh Stone [Thu, 20 Apr 2017 23:09:54 +0000 (16:09 -0700)]
Remove float_extras

[unstable, deprecated since 1.11.0]

7 years agoRemove num::{Zero,One}
Josh Stone [Thu, 20 Apr 2017 22:12:42 +0000 (15:12 -0700)]
Remove num::{Zero,One}

[unstable, deprecated since 1.11.0]

7 years agoRemove RefCell::borrow_state
Josh Stone [Thu, 20 Apr 2017 21:10:22 +0000 (14:10 -0700)]
Remove RefCell::borrow_state

[unstable, deprecated since 1.15.0]

7 years agoRemove {Cell,RefCell}::as_unsafe_cell
Josh Stone [Thu, 20 Apr 2017 21:06:18 +0000 (14:06 -0700)]
Remove {Cell,RefCell}::as_unsafe_cell

[unstable, deprecated since 1.12.0]

7 years agoPrivatize Rc::is_unique
Josh Stone [Thu, 20 Apr 2017 21:02:20 +0000 (14:02 -0700)]
Privatize Rc::is_unique

[unstable, deprecated since 1.15.0]

7 years agoRemove Rc::would_wrap
Josh Stone [Thu, 20 Apr 2017 20:55:38 +0000 (13:55 -0700)]
Remove Rc::would_wrap

[unstable, deprecated since 1.15.0]

7 years agoRemove OccupiedEntry::remove_pair
Josh Stone [Thu, 20 Apr 2017 20:50:47 +0000 (13:50 -0700)]
Remove OccupiedEntry::remove_pair

[unstable, deprecated since 1.12.0]

7 years agoRemove BinaryHeap::{push_pop,replace}
Josh Stone [Thu, 20 Apr 2017 20:36:23 +0000 (13:36 -0700)]
Remove BinaryHeap::{push_pop,replace}

[unstable, deprecated since 1.13.0]

7 years agoRemove EnumSet
Josh Stone [Thu, 20 Apr 2017 18:25:05 +0000 (11:25 -0700)]
Remove EnumSet

[unstable, deprecated since 1.16.0]

7 years agoReduce visual clutter of multiline start when possible
Esteban Küber [Fri, 14 Apr 2017 23:38:10 +0000 (16:38 -0700)]
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.

7 years agoAdd test for issue 33884
Esteban Küber [Fri, 21 Apr 2017 00:06:39 +0000 (17:06 -0700)]
Add test for issue 33884

Fix #33884

7 years agoAuto merge of #41342 - GuillaumeGomez:btree-debug-infinite, r=alexcrichton
bors [Thu, 20 Apr 2017 23:40:06 +0000 (23:40 +0000)]
Auto merge of #41342 - GuillaumeGomez:btree-debug-infinite, r=alexcrichton

Fix debug infinite loop

Fixes #41338.

7 years agoDon't panic if an attribute macro fails to resolve at crate root
Austin Bonander [Thu, 20 Apr 2017 23:13:13 +0000 (16:13 -0700)]
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

7 years agoRemoved sizing parameter from struct_llfields.
Cameron Hart [Mon, 10 Apr 2017 09:40:24 +0000 (21:40 +1200)]
Removed sizing parameter from struct_llfields.

7 years agoAdded feature gate, updated error messages and tests.
Cameron Hart [Sat, 25 Mar 2017 08:00:49 +0000 (19:00 +1100)]
Added feature gate, updated error messages and tests.

7 years agoImplementation of repr struct alignment RFC 1358.
Cameron Hart [Sat, 14 Jan 2017 22:49:29 +0000 (09:49 +1100)]
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.

7 years agoBump the rls submodule revision
Jonathan Turner [Thu, 20 Apr 2017 21:20:04 +0000 (09:20 +1200)]
Bump the rls submodule revision

7 years agoAdd x86_64-linux-android target
Marco A L Barbosa [Thu, 20 Apr 2017 17:02:42 +0000 (14:02 -0300)]
Add x86_64-linux-android target

7 years agoExpanded docs and examples for PathBuf::file_name and friends
Matt Brubeck [Tue, 18 Apr 2017 19:20:02 +0000 (12:20 -0700)]
Expanded docs and examples for PathBuf::file_name and friends

7 years agoFix line display for hoedown
Guillaume Gomez [Wed, 19 Apr 2017 22:31:34 +0000 (00:31 +0200)]
Fix line display for hoedown

7 years agoAuto merge of #41424 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 20 Apr 2017 17:33:58 +0000 (17:33 +0000)]
Auto merge of #41424 - frewsxcv:rollup, r=frewsxcv

Rollup of 2 pull requests

- Successful merges: #40812, #40987
- Failed merges:

7 years agoRollup merge of #40987 - maccoda:convert-docs, r=steveklabnik
Corey Farwell [Thu, 20 Apr 2017 17:33:13 +0000 (13:33 -0400)]
Rollup merge of #40987 - maccoda:convert-docs, r=steveklabnik

API docs: Convert

Clean up of the convert module documentation following points in #29349

7 years agoRollup merge of #40812 - mgattozzi:ChildDocs, r=steveklabnik
Corey Farwell [Thu, 20 Apr 2017 17:33:12 +0000 (13:33 -0400)]
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.

7 years agoUpdate libc to include x86_64-linux-android support
Marco A L Barbosa [Thu, 20 Apr 2017 16:59:41 +0000 (13:59 -0300)]
Update libc to include x86_64-linux-android support

7 years agoRename environment variable `GDB_CMD` to `RUST_GDB` to prevent ambiguity
Nicolas Bigaouette [Thu, 20 Apr 2017 15:20:33 +0000 (11:20 -0400)]
Rename environment variable `GDB_CMD` to `RUST_GDB` to prevent ambiguity

7 years agoAuto merge of #41191 - seanmonstar:spec-extend-vec-intoiter, r=alexcrichton
bors [Thu, 20 Apr 2017 13:08:07 +0000 (13:08 +0000)]
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.

7 years agorustc: combine type_needs_drop_given_env and may_drop into needs_drop.
Eduard-Mihai Burtescu [Mon, 17 Apr 2017 21:22:55 +0000 (00:22 +0300)]
rustc: combine type_needs_drop_given_env and may_drop into needs_drop.

7 years agorustc: replace TypeContents::needs_drop with Ty::may_drop.
Eduard-Mihai Burtescu [Mon, 17 Apr 2017 20:26:48 +0000 (23:26 +0300)]
rustc: replace TypeContents::needs_drop with Ty::may_drop.

7 years agorustc: replace interior_unsafe with a Freeze trait.
Eduard-Mihai Burtescu [Mon, 17 Apr 2017 18:18:56 +0000 (21:18 +0300)]
rustc: replace interior_unsafe with a Freeze trait.

7 years agorustc: simplify TypeContents drastically.
Eduard-Mihai Burtescu [Mon, 17 Apr 2017 15:58:01 +0000 (18:58 +0300)]
rustc: simplify TypeContents drastically.

7 years agoAuto merge of #41413 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 20 Apr 2017 06:28:16 +0000 (06:28 +0000)]
Auto merge of #41413 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #41214, #41369, #41377, #41378, #41390
- Failed merges:

7 years agoRollup merge of #41390 - scottmcm:toowned-clone-into, r=alexcrichton
Corey Farwell [Thu, 20 Apr 2017 05:39:56 +0000 (01:39 -0400)]
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

7 years agoRollup merge of #41378 - eddyb:byval-is-not-like-sret, r=arielb1
Corey Farwell [Thu, 20 Apr 2017 05:39:56 +0000 (01:39 -0400)]
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.

7 years agoRollup merge of #41377 - nikomatsakis:issue-41298-ICE-inference, r=eddyb
Corey Farwell [Thu, 20 Apr 2017 05:39:55 +0000 (01:39 -0400)]
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

7 years agoRollup merge of #41369 - cuviper:arm-stage0, r=alexcrichton
Corey Farwell [Thu, 20 Apr 2017 05:39:54 +0000 (01:39 -0400)]
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

7 years agoRollup merge of #41214 - estebank:less-multiline, r=petrochenkov
Corey Farwell [Thu, 20 Apr 2017 05:39:53 +0000 (01:39 -0400)]
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

7 years agoAuto merge of #41411 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 20 Apr 2017 01:56:59 +0000 (01:56 +0000)]
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