Commit Graph

86258 Commits

Author SHA1 Message Date
Oliver Scherer
48f6941acf Move ScalarMaybeUndef back to rustc 2018-11-08 14:52:02 +01:00
Oliver Scherer
7db04835f9 Move Allocation into its own module 2018-11-08 14:52:02 +01:00
Oliver Scherer
c6404f56e7 Duplicate mod.rs for better diff tracking 2018-11-08 14:52:02 +01:00
Felix S. Klock II
dd6398256e Revise the temp creation for blocks in stmt_expr to setup BlockTailInfo. 2018-11-08 14:32:17 +01:00
Felix S. Klock II
e7e1a52f63 Refactor code so that block_context observations has nicely named (and documented) methods. 2018-11-08 14:31:12 +01:00
Felix S. Klock II
556f583587 Regression test for issue #54382
(I opted to rely on compare-mode=nll rather than opt into
`#![feature(nll)]`, mostly to make it easy to observe the interesting
differences between the AST-borrwock diagnostic and the NLL one.)
2018-11-08 12:54:20 +01:00
Felix S. Klock II
3011ecdeac Narrow span of temp holding the value of a Block expression to the block's tail (if present). 2018-11-08 12:54:20 +01:00
Felix S. Klock II
ece4f472c9 For diagnostics, set spans of drops of temps to be that of the statement's terminating semicolon. 2018-11-08 12:54:20 +01:00
ljedrz
e3390d89ea Improve creation of 3 IndexVecs 2018-11-08 11:55:10 +01:00
bors
653da4fd00 Auto merge of #55532 - pnkfelix:rustc_error-survey, r=nikomatsakis
#[rustc_error] survey

Fix #55505
2018-11-08 09:38:49 +00:00
Nicholas Nethercote
5b2314b3ca Use SmallVec outparams in several functions.
This avoids some allocations, reducing instruction counts by 1% on a
couple of benchmarks.
2018-11-08 19:10:53 +11:00
Nicholas Nethercote
706c2ad651 Use Lit rather than P<Lit> in ast::ExprKind.
Because it results in fewer allocations and small speedups on some
benchmarks.
2018-11-08 19:00:55 +11:00
bors
1d834550d5 Auto merge of #55366 - Amanieu:stable_layout, r=Amanieu
Add tracking issue for Layout methods (and some API changes)

These methods are already useful when used with the stable global allocator API (stabilized in #51241).

```rust
pub fn align_to(&self, align: usize) -> Result<Layout, LayoutErr>;
pub fn padding_needed_for(&self, align: usize) -> usize;
pub fn repeat(&self, n: usize) -> Result<(Layout, usize), LayoutErr>;
pub fn extend(&self, next: Layout) -> Result<(Layout, usize), LayoutErr>;
pub fn repeat_packed(&self, n: usize) -> Result<Layout, LayoutErr>;
pub fn extend_packed(&self, next: Layout) -> Result<Layout, LayoutErr>;
pub fn array<T>(n: usize) -> Result<Layout, LayoutErr>;
```

cc #32838

r? @SimonSapin
2018-11-08 06:52:27 +00:00
Christopher Serr
a9b5988847 wasm32-unknown-emscripten expects the rust_eh_personality symbol
The `wasm32-unknown-emscripten` expects the `rust_eh_personality` symbol to be there, but a cfg checking for `target_arch = "wasm32"` which was meant to remove the symbol from the `wasm32-unknown-unknown` target, didn't check for whether `emscripten` is targeted or not, so the symbol accidentally got filtered out there as well.

Fixes #55276
2018-11-08 03:27:45 +01:00
bors
9c304fb0cf Auto merge of #55187 - malbarbo:fix-manifest, r=alexcrichton
Remove targets from the manifest that are not built on travis

Fixes https://github.com/rust-lang/rust/issues/55020
2018-11-08 01:10:10 +00:00
Alexander Regueiro
90a14389d1 Removed DUPLICATE_ASSOCIATED_TYPE_BINDINGS lint.
This has been replaced by the hard error E0719.
2018-11-07 21:57:45 +00:00
Alexander Regueiro
7d9ee0314a Only do check for trait objects, not trait or trait alias definitions. 2018-11-07 21:57:45 +00:00
Alexander Regueiro
6d3ee4170d Added error for duplicate bindings of associated type. 2018-11-07 21:57:45 +00:00
Alexander Regueiro
0e89f570d2 Added tests. 2018-11-07 21:57:40 +00:00
Alexander Regueiro
d08a42bf2c Look at projections from supertraits when constructing trait objects. 2018-11-07 21:56:06 +00:00
Marco A L Barbosa
11637aca8c Remove targets from the manifest that are not built on travis
Fixes https://github.com/rust-lang/rust/issues/55020
2018-11-07 19:15:04 -02:00
bors
25a42b2ceb Auto merge of #55746 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

Successful merges:

 - #55377 (Slight copy-editing for `std::cell::Cell` docs)
 - #55441 (Remove unused re import in gdb_rust_pretty_printing)
 - #55453 (Choose predicates without inference variables over those with them)
 - #55495 (Don't print opt fuel messages to stdout because it breaks Rustbuild)
 - #55501 (Make `process_obligations`' computation of `completed` optional.)
 - #55510 (Fix feature gate only being checked on first repr attr.)
 - #55609 (Run name-anon-globals after LTO passes as well)
 - #55645 (do not print wrapping ranges like normal ranges in validity diagnostics)
 - #55688 (Standardised names and location of ui issue tests)
 - #55692 (-C remark: fix incorrect warning about requiring "--debuginfo" instead of "-C debuginfo=n")
 - #55702 (Add `aarch64-pc-windows-msvc` to deployed targets)
 - #55728 (Update lldb)
 - #55730 (Use trait impl method span when type param mismatch is due to impl Trait)
 - #55734 (refactor: use shorthand fields)
2018-11-07 17:14:34 +00:00
Jon Gjengset
36f815bf8d
Remove intermediate font specs
This is a (much) more constrained version of #54772 that also aims at
improving the situation in #34681. It removes any font specifications
that are not the "official" rustdoc font, and instead relies on the
browser to provide the fallback font if the official on is not
available. On Linux systems, this is particularly important, as fonts
like Helvetica, Arial, and Times often look pretty bad since they're
pulled from extracted MS fonts. A specification like `serif` or
`sans-serif` lets the browser instead choose a good font.
2018-11-07 11:02:10 -05:00
ljedrz
5159b32997 mir: remove a hacky recursive helper function 2018-11-07 17:00:51 +01:00
Ralf Jung
b891a81164 comment 2018-11-07 16:54:31 +01:00
Ralf Jung
9e3f571cc3 drop glue works with raw ptrs, it must EscapeToRaw 2018-11-07 16:54:31 +01:00
Ralf Jung
154835e5e7 only count deref_operand as actual deref, but not all ref-to-place conversions 2018-11-07 16:54:31 +01:00
Ralf Jung
f174099885 array index accesses are stable places 2018-11-07 16:54:31 +01:00
Ralf Jung
b9a35dcb49 calling the ptr hooks no longer needs expensive preparation, remove the opt-out 2018-11-07 16:54:31 +01:00
Ralf Jung
f27cd60ae1 no more action on ref or cast, but add new MIR statement for escaping a ptr to raw 2018-11-07 16:54:31 +01:00
Felix S. Klock II
34ffbdb965 This test will not link on wasm32. 2018-11-07 16:33:41 +01:00
David Wood
299a452a75
Ignore never-initialized locals for unused_mut.
This commit filters out locals that have never been initialized for
consideration in the `unused_mut` lint.

This is intended to detect when the statement that would have
initialized the local was removed as unreachable code. In these cases,
we would not want to lint. This is the same behaviour as the AST borrow
checker.

This is achieved by taking advantage of an existing pass over the MIR
for the `unused_mut` lint and creating a set of those locals that were
never initialized.
2018-11-07 16:10:40 +01:00
Felix S. Klock II
f4da71e04e work around deviation in diagnostic output for opt-level=0 by forcing -O. 2018-11-07 15:58:59 +01:00
Felix S. Klock II
58c7a786b0 Update output of lint-type-overflow2.stderr to reflect its output from rustc -O.
(The fact that output differs under `opt-level=0` is an instance of #55757.)
2018-11-07 15:47:49 +01:00
ljedrz
2d7426bb5a borrow_set: remove a helper function and a clone it uses 2018-11-07 15:32:58 +01:00
F001
f63c2f80e5 fix ICE 2018-11-07 22:17:32 +08:00
kennytm
4e86576277
Rollup merge of #55645 - RalfJung:validity-range-inclusive, r=oli-obk
do not print wrapping ranges like normal ranges in validity diagnostics
2018-11-07 21:28:19 +08:00
kennytm
9d9146ad95
Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwco
refactor: use shorthand fields

refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-07 21:27:00 +08:00
kennytm
e222d1db3c
Rollup merge of #55730 - estebank:impl-trait-arg-mismatch, r=varkor
Use trait impl method span when type param mismatch is due to impl Trait

Fix #55374.
2018-11-07 21:26:56 +08:00
kennytm
dd9ea2ae64
Rollup merge of #55728 - tromey:update-lldb, r=alexcrichton
Update lldb

This updates lldb to pick up some bug fixes, and makes one minor test
suite fix to account for this.
2018-11-07 21:26:54 +08:00
Wesley Wiser
e72afa9573 Consume optimization fuel from the MIR inliner
This makes it easier to debug mis-optimizations that occur during
inlining. Thanks to @nikomatsakis for the suggestion!
2018-11-07 08:17:21 -05:00
Ralf Jung
3ec89746ba test diagnostics for more ranges 2018-11-07 14:06:38 +01:00
Ralf Jung
b42b9b34d5 pretty-print scalar range that only has an upper bound 2018-11-07 13:58:43 +01:00
Ralf Jung
9dba743a6a do not print wrapping ranges like normal ranges in diagnostics 2018-11-07 13:46:49 +01:00
Felix S. Klock II
a2e090624e Removed #[rustc_error] from tests that are all // compile-pass.
I also added `// skip-codegen` to each one, to address potential concerns
that this change would otherwise slow down our test suite spending time
generating code for files that are really just meant to be checks of
compiler diagnostics.

(However, I will say: My preference is to not use `// skip-codegen` if
one can avoid it. We can use all the testing of how we drive LLVM that
we can get...)

(Updated post rebase.)
2018-11-07 13:09:52 +01:00
Felix S. Klock II
0332a39f07 Replaced use of #[rustc_error] with // skip-codegen.
This test specifically notes that it does not want to invoke the
linker, due to the way it (IMO weakly) exercises the `#[link=...]`
attribute.

In any case, removing the the `#[rustc_error]` here uncovered an
"invalid windows subsystem" error that was previously not included in
the transcript of diagnostic output. So that's a step forward, (right?).
2018-11-07 13:09:52 +01:00
Felix S. Klock II
bf544fa920 remove #[rustc_error] from ui/ tests that remain compile-fail tests. 2018-11-07 13:09:52 +01:00
kennytm
6f10e34fd3
Rollup merge of #55702 - alexcrichton:arm64-msvc-deploy, r=michaelwoerister
Add `aarch64-pc-windows-msvc` to deployed targets

Accidentally forgotten from #54718!
2018-11-07 18:01:58 +08:00
kennytm
3682d3140c
Rollup merge of #55692 - matthiaskrgr:remark_debuginfo_hint, r=michaelwoerister
-C remark: fix incorrect warning about requiring "--debuginfo" instead of "-C debuginfo=n"

Previously suggested "--debuginfo" does not actually work.
2018-11-07 18:01:57 +08:00
kennytm
8f93a3c05e
Rollup merge of #55688 - alexreg:move-issue-tests, r=estebank
Standardised names and location of ui issue tests

None
2018-11-07 18:01:56 +08:00