Commit Graph

84104 Commits

Author SHA1 Message Date
QuietMisdreavus
a893117f38 add a bunch of debug prints 2018-09-20 05:42:27 -05:00
QuietMisdreavus
50fa16f5b5 undo some tweaks to build_impl 2018-09-20 05:42:26 -05:00
QuietMisdreavus
804a1a6fa9 don't record an external trait if it's not external 2018-09-20 05:42:25 -05:00
QuietMisdreavus
6aa74939bf only move access_levels/external_traits after early passes 2018-09-20 05:42:24 -05:00
QuietMisdreavus
457efc111a ignore rustdoc/doc-proc-macro on stage1 2018-09-20 05:42:22 -05:00
QuietMisdreavus
5e0f9be670 print local inlined consts via the HIR map 2018-09-20 05:42:21 -05:00
QuietMisdreavus
02bea3c581 rustdoc: collect trait impls as an early pass 2018-09-20 05:42:20 -05:00
Ralf Jung
0309664491 fix stage 0 compilation 2018-09-20 12:27:50 +02:00
Ralf Jung
c711e15521 unsurprisingly, miri needs tcx 2018-09-20 12:06:39 +02:00
Ralf Jung
c16336a014 move loop detector constants to the module that uses them; make lifetime order in ConstPropagator consistent with Memory 2018-09-20 11:57:45 +02:00
bors
f7f4c500b4 Auto merge of #54255 - spastorino:use-of-moved-value-error, r=nikomatsakis
Inspect parents paths when checking for moves

Closes #52669
2018-09-20 09:02:46 +00:00
Ralf Jung
b1453dda0f make some things a bit more private 2018-09-20 10:36:25 +02:00
Ralf Jung
018d128325 rename evaluator -> interpreter to make eddyb happy 2018-09-20 10:36:25 +02:00
Ralf Jung
169f7911e9 move CTFE engine snapshot state out of miri engine into CTFE machine instance 2018-09-20 10:12:21 +02:00
Philip Munksgaard
06b197582e Add documentation about the edition flag 2018-09-20 08:36:07 +02:00
Philip Munksgaard
b01e0e43d4 Add a documentation banner for edition specific code 2018-09-20 08:36:07 +02:00
Philip Munksgaard
ac8d8d71fa Add test for doctest edition support 2018-09-20 08:36:07 +02:00
Jack O'Connor
d0e59f563d add tests for copy_within 2018-09-20 02:35:32 -04:00
bors
992d1e4d3d Auto merge of #54241 - vi:suggest_with_applicability, r=estebank
Remove usages of span_suggestion without Applicability

Use `Applicability::Unspecified` for all of them instead.

Shall deprecations for the non-`_with_applicability` functions be added?

Shall clippy be addressed somehow?

r? @estebank
2018-09-20 06:34:22 +00:00
Scott McMurray
3932249249 Add marker_trait_attr to the unstable book 2018-09-19 22:41:07 -07:00
Scott McMurray
d5b562d4fc Improve error checking and reporting
- Check for valid attributes more reliably
- Don't bloat the error index for boring errors
- Do use real error codes for the interesting ones
2018-09-19 22:31:30 -07:00
Scott McMurray
2187e7a2c3 Enforce that #[marker] traits cannot have associated items 2018-09-19 22:31:30 -07:00
Scott McMurray
7cee7eee72 Require that marker impls are empty, but allow them to overlap 2018-09-19 22:31:30 -07:00
Scott McMurray
6149a83c0b Parse, feature-gate, and validate the #[marker] attribute 2018-09-19 22:31:30 -07:00
Scott McMurray
62c6e4e145 Add an is_marker flag to TraitDef 2018-09-19 22:31:30 -07:00
Jack O'Connor
b3ffd3344e define copy_within on slices
This is a safe wrapper around ptr::copy, for regions within a single
slice. Previously, safe in-place copying was only available as a side
effect of Vec::drain.
2018-09-20 00:57:05 -04:00
bors
d16f27f89a Auto merge of #54301 - alexcrichton:update-curl, r=Mark-Simulacrum
Update some `*-sys` dependencies of Cargo/RLS

This is intended to help solve #54206 on nightly where the RLS on MinGW is
having build issues with accidentally building a `curl` library which links to
pthread symbols on Windows (where it should use native mutex locking instead).
The build system for these `*-sys` crates have all been rewritten to be based on
`cc` to bypass native build systems and platform detection to make sure we
configure them correctly.
2018-09-20 02:51:56 +00:00
Sergio Benitez
adc2c04543 Make 'proc_macro::MultiSpan' public. 2018-09-19 19:22:21 -07:00
Alex Crichton
b1305c22e3 Update some *-sys dependencies of Cargo/RLS
This is intended to help solve #54206 on nightly where the RLS on MinGW is
having build issues with accidentally building a `curl` library which links to
pthread symbols on Windows (where it should use native mutex locking instead).
The build system for these `*-sys` crates have all been rewritten to be based on
`cc` to bypass native build systems and platform detection to make sure we
configure them correctly.
2018-09-19 18:17:58 -07:00
bors
1d33aedaa9 Auto merge of #54211 - nnethercote:keccak-Liveness-memory, r=nikomatsakis
Split `Liveness::users` into three.

This reduces memory usage on some benchmarks because no space is wasted
for padding. For a `check-clean` build of `keccak` it reduces `max-rss`
by 20%.

r? @nikomatsakis, but I want to do a perf run. Locally, I had these results:
- instructions: slight regression
- max-rss: big win on "Clean" builds
- faults: big win on "Clean" and "Nll" builds
- wall-time: small win on "Clean" and "Nll" builds

So I want to see how a different machine compares.
2018-09-20 00:16:46 +00:00
QuietMisdreavus
93321671ca add -Zui-testing to rustdoc 2018-09-19 18:39:39 -05:00
Nicholas Nethercote
99f05e800e Improve handling of type bounds in bit_set.rs.
Currently, `BitSet` doesn't actually know its own domain size; it just
knows how many words it contains. To improve things, this commit makes
the following changes.

- It changes `BitSet` and `SparseBitSet` to store their own domain size,
  and do more precise bounds and same-size checks with it. It also
  changes the signature of `BitSet::to_string()` (and puts it within
  `impl ToString`) now that the domain size need not be passed in from
  outside.

- It uses `derive(RustcDecodable, RustcEncodable)` for `BitSet`. This
  required adding code to handle `PhantomData` in `libserialize`.

- As a result, it removes the domain size from `HybridBitSet`, making a
  lot of that code nicer.

- Both set_up_to() and clear_above() were overly general, working with
  arbitrary sizes when they are only needed for the domain size. The
  commit removes the former, degeneralizes the latter, and removes the
  (overly general) tests.

- Changes `GrowableBitSet::grow()` to `ensure()`, fixing a bug where a
  (1-based) domain size was confused with a (0-based) element index.

- Changes `BitMatrix` to store its row count, and do more precise bounds
  checks with it.

- Changes `ty_params` in `select.rs` from a `BitSet` to a
  `GrowableBitSet` because it repeatedly failed the new, more precise
  bounds checks. (Changing the type was simpler than computing an
  accurate domain size.)

- Various other minor improvements.
2018-09-20 08:52:41 +10:00
Taylor Cramer
1b00f0b9fa Remove spawning from task::Context 2018-09-19 15:01:19 -07:00
Guillaume Gomez
2099b3c75c Reduce code block sides padding 2018-09-19 22:59:35 +02:00
Santiago Pastorino
ae42e537db
Add regression test for thread local static mut borrows 2018-09-19 17:54:24 -03:00
Matthew Jasper
bd0895d7d0 Update ui tests 2018-09-19 20:50:09 +01:00
Matthew Jasper
994dc4bd1e Classify outlives constraints when type checking
The MIR/NLL type checker is in a much better position to classify
constraints and already has to classify into boring and interesting.
Adds spans to Locations::All for error reporting
Adds more constraint categories
2018-09-19 20:50:09 +01:00
Matthew Jasper
6e425219f1 Don't claim that locals in a function are declared outside of the
function body
2018-09-19 19:52:55 +01:00
Matthew Jasper
fcd0cd0ade Don't try to use a path to a type alias as a path to the adt it aliases 2018-09-19 19:52:55 +01:00
Matthew Jasper
b210b3168a Make the span of the MIR return place point to the return type 2018-09-19 19:52:55 +01:00
bors
20dc0c5070 Auto merge of #54174 - parched:park, r=alexcrichton
Fix `thread` `park`/`unpark` synchronization

Previously the code below would not be guaranteed to exit when the
second unpark took the `return, // already unparked` path because there
was no write to synchronize with a read in `park`.

EDIT: doesn't actually require third thread
```
use std::sync::atomic::{AtomicBool, Ordering};
use std:🧵:{current, spawn, park};

static FLAG: AtomicBool = AtomicBool::new(false);

fn main() {
    let thread_0 = current();
    spawn(move || {
        thread_0.unpark();
        FLAG.store(true, Ordering::Relaxed);
        thread_0.unpark();
    });

    while !FLAG.load(Ordering::Relaxed) {
        park();
    }
}
```

I have some other ideas on how to improve the performance of `park` and `unpark` using fences, avoiding any atomic RMW when the state is already `NOTIFIED`, and also how to avoid calling `notify_one` without the mutex locked. But I need to write some micro benchmarks first, so I'll submit those changes at a later date if they prove to be faster.

Fixes https://github.com/rust-lang/rust/issues/53366 I hope.
2018-09-19 17:08:28 +00:00
Tom Tromey
e2ff97a14d Pass --batch to gdb
In one of my travis builds, I was surprised to find that the gdb
pager was in use and caused travis to time out.  Adding `--batch`
to the gdb invocation will disable the pager.  Note that the
`-ex q` is retained, to make sure gdb exits with status 0, just in
case `set -e` is in effect somehow.
2018-09-19 09:46:22 -06:00
Artyom Pavlov
fd7565b076
Added tracking issue, fixed check, 1.30 -> 1.31 2018-09-19 18:40:33 +03:00
Felix S. Klock II
3feffd48bd Regression test for rust-lang/rust#22323. 2018-09-19 14:33:11 +02:00
Philip Munksgaard
c996c4d316 Add support for running doc test in specific edition 2018-09-19 14:32:09 +02:00
bors
4f3ff5a97b Auto merge of #54101 - osa1:issue_54099, r=nikomatsakis
Fix camel case type warning for types with trailing underscores

Fixes #54099
2018-09-19 09:20:36 +00:00
Felix S. Klock II
c9cf499330 Address following error from rustdoc tests:
error[E0106]: missing lifetime specifier
 --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:11424:23
  |
9 | fn demo(s: &mut S) -> &mut String { let p = &mut *(*s).data; p }
  |                       ^ expected lifetime parameter
  |
  = help: this function's return type contains a borrowed value, but the signature does not say which one of `s`'s 2 lifetimes it is borrowed from
2018-09-19 10:31:42 +02:00
Eduard-Mihai Burtescu
046482e95e rustc: future-proof error reporting for polymorphic constants in types. 2018-09-19 11:07:43 +03:00
bors
1e21c9a297 Auto merge of #53877 - withoutboats:compositional-pin, r=aturon
Update to a new pinning API.

~~Blocked on #53843 because of method resolution problems with new pin type.~~

@r? @cramertj

cc @RalfJung @pythonesque anyone interested in #49150
2018-09-19 06:56:19 +00:00
bors
ff6422d7a3 Auto merge of #54318 - nnethercote:use-HybridBitSet-in-SparseBitMatrix, r=pnkfelix
Use `HybridBitSet` in `SparseBitMatrix`.

This fixes most of the remaining NLL memory regression.

r? @pnkfelix, because you reviewed #54286.
cc @nikomatsakis, because NLL
cc @Mark-Simulacrum, because this removes `array_vec.rs`
cc @lqd, because this massively improves `unic-ucd-name`, and probably other public crates
2018-09-19 02:37:37 +00:00