]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoHandle multiple error fix suggestions carefuly
Laurent Bonnans [Sat, 4 Jan 2020 23:58:41 +0000 (00:58 +0100)]
Handle multiple error fix suggestions carefuly

The existing code seems to assume that substitutions spans are disjoint,
which is not always the case.

In the example:

    pub trait AAAA {}
    pub trait B {}
    pub trait C {}
    pub type T<P: AAAA + B + C> = P;

, we get three substituions starting from ':' and ending respectively at
the end of each trait token.

With the former offset calculation, this would cause `underline_start` to
eventually become negative before being converted to `usize`...

The new version may report erroneous results for non perfectly overlapping
substitutions but I don't know if such examples exist. Alternatively, we
could detect these cases and trim out overlapping substitutions.

4 years agofix ui-fulldeps fallout
Mazdak Farrokhzad [Sun, 5 Jan 2020 04:35:51 +0000 (05:35 +0100)]
fix ui-fulldeps fallout

4 years agoRemove rustc_hir reexports in rustc::hir.
Mazdak Farrokhzad [Sun, 5 Jan 2020 01:37:57 +0000 (02:37 +0100)]
Remove rustc_hir reexports in rustc::hir.

4 years agolibrustc/hir.rs -> librustc/hir/mod.rs
Mazdak Farrokhzad [Sun, 5 Jan 2020 00:52:30 +0000 (01:52 +0100)]
librustc/hir.rs -> librustc/hir/mod.rs

4 years agosimplify reexports in rustc::hir
Mazdak Farrokhzad [Sun, 5 Jan 2020 00:50:05 +0000 (01:50 +0100)]
simplify reexports in rustc::hir

4 years agoUpdate Clippy
Yuki Okushi [Sun, 5 Jan 2020 11:15:04 +0000 (20:15 +0900)]
Update Clippy

4 years agoadd feature gate
dylan_DPC [Sun, 5 Jan 2020 10:12:35 +0000 (15:42 +0530)]
add feature gate

4 years agoAuto merge of #67777 - Zoxc:time-refactor, r=wesleywiser
bors [Sun, 5 Jan 2020 07:54:23 +0000 (07:54 +0000)]
Auto merge of #67777 - Zoxc:time-refactor, r=wesleywiser

Use self profile infrastructure for -Z time and -Z time-passes

There's no longer indentation for -Z time and -Z time-passes and duplicate timers between self profiling and -Z time-passes have been removed.

r? @wesleywiser

4 years agoUse self profile infrastructure for -Z time and -Z time-passes
John Kåre Alsaker [Wed, 1 Jan 2020 01:24:05 +0000 (02:24 +0100)]
Use self profile infrastructure for -Z time and -Z time-passes

4 years agoAuto merge of #67808 - Marwes:projection_normalization_recurse, r=nikomatsakis
bors [Sun, 5 Jan 2020 01:18:57 +0000 (01:18 +0000)]
Auto merge of #67808 - Marwes:projection_normalization_recurse, r=nikomatsakis

perf: Don't recurse into types that do not need normalizing

A bit speculative at this stage but profiling shows that type folding
takes up a substantial amount of time during normalization which may
indicate that many types may be folded despite there being nothing to
normalize

4 years agoremove bespoke flock bindings
Andy Russell [Sat, 4 Jan 2020 23:11:56 +0000 (18:11 -0500)]
remove bespoke flock bindings

4 years agobuffer lexer errors in rustdoc syntax checking
Andy Russell [Thu, 12 Dec 2019 21:28:26 +0000 (16:28 -0500)]
buffer lexer errors in rustdoc syntax checking

4 years agoAdd backticks to various diagnostics
varkor [Sun, 5 Jan 2020 00:17:46 +0000 (00:17 +0000)]
Add backticks to various diagnostics

4 years agoRemove negative number check from float sqrt
Oliver Middleton [Sat, 4 Jan 2020 23:44:19 +0000 (23:44 +0000)]
Remove negative number check from float sqrt

It hasn't been UB to pass negative numbers to sqrt since https://reviews.llvm.org/D28797 which was included in LLVM 5.

4 years agoRe-add comment about behaviour of inline.
jumbatm [Sat, 4 Jan 2020 06:43:31 +0000 (16:43 +1000)]
Re-add comment about behaviour of inline.

4 years agoAuto merge of #67803 - Centril:librustc_hir, r=Zoxc
bors [Sat, 4 Jan 2020 21:50:12 +0000 (21:50 +0000)]
Auto merge of #67803 - Centril:librustc_hir, r=Zoxc

Extract `rustc_hir` out of `rustc`

The new crate contains:
```rust
pub mod def;
pub mod def_id;
mod hir;
pub mod hir_id;
pub mod itemlikevisit;
pub mod pat_util;
pub mod print;
mod stable_hash_impls;

pub use hir::*;
pub use hir_id::*;
pub use stable_hash_impls::HashStableContext;
```

Remains to be done in follow-up PRs:

- Move `rustc::hir::map` into `rustc_hir_map` -- this has to be a separate crate due to the `dep_graph` (blocked on https://github.com/rust-lang/rust/pull/67761).

- Move references to `rustc::hir` to `rustc_hir` where possible.

cc https://github.com/rust-lang/rust/issues/65031

r? @Zoxc

4 years agoOmit underscore constants from rustdoc
David Tolnay [Sat, 4 Jan 2020 20:35:23 +0000 (12:35 -0800)]
Omit underscore constants from rustdoc

4 years agoDistinguish between private items and hidden items in rustdoc
David Tolnay [Sat, 4 Jan 2020 18:58:32 +0000 (10:58 -0800)]
Distinguish between private items and hidden items in rustdoc

I believe rustdoc should not be conflating private items (visibility
lower than `pub`) and hidden items (attribute `doc(hidden)`). This
matters now that Cargo is passing --document-private-items by default
for bin crates. In bin crates that rely on macros, intentionally hidden
implementation details of the macros can overwhelm the actual useful
internal API that one would want to document.

This PR restores the strip-hidden pass when documenting private items,
and introduces a separate unstable --document-hidden-items option to
skip the strip-hidden pass. The two options are orthogonal to one
another.

4 years agosubmodules: update rls from fed7a31 to 7c0489c
Matthias Krüger [Sat, 4 Jan 2020 19:22:19 +0000 (20:22 +0100)]
submodules: update rls from fed7a31 to 7c0489c

Changes:
````
rustup https://github.com/rust-lang/rust/pull/67853
deps: update clippy
Update Clippy
Update cargo.
Correct two links to the json-error-emitter
````

Fixes #67708

4 years agoadd ui test
cjkenn [Sat, 4 Jan 2020 18:58:04 +0000 (10:58 -0800)]
add ui test

4 years agorustdoc: Avoid panic when parsing codeblocks for playground links
Oliver Middleton [Thu, 2 Jan 2020 23:34:00 +0000 (23:34 +0000)]
rustdoc: Avoid panic when parsing codeblocks for playground links

`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.

4 years agoAuto merge of #67874 - Dylan-DPC:rollup-xy6bkoe, r=Dylan-DPC
bors [Sat, 4 Jan 2020 18:39:14 +0000 (18:39 +0000)]
Auto merge of #67874 - Dylan-DPC:rollup-xy6bkoe, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #67137 (libstd uses `core::panic::Location` where possible.)
 - #67709 (Introduce an option for disabling deduplication of diagnostics)
 - #67775 (Make "use $crate" a hard error)
 - #67812 (Tweak and extend internal BTreeMap documentation, including debug asserts.)

Failed merges:

r? @ghost

4 years agoremoved blank line
dylan_DPC [Sat, 4 Jan 2020 18:30:40 +0000 (00:00 +0530)]
removed blank line

4 years agoef em ti ... :P
dylan_DPC [Sat, 4 Jan 2020 18:27:34 +0000 (23:57 +0530)]
ef em ti ... :P

4 years agoRollup merge of #67812 - ssomers:btreemap_internal_doc, r=rkruppe
Dylan DPC [Sat, 4 Jan 2020 18:22:51 +0000 (23:52 +0530)]
Rollup merge of #67812 - ssomers:btreemap_internal_doc, r=rkruppe

Tweak and extend internal BTreeMap documentation, including debug asserts.

Gathered from work on various other pull requests (e.g. #67725, #67686).

4 years agoRollup merge of #67775 - mental32:master, r=Dylan-DPC
Dylan DPC [Sat, 4 Jan 2020 18:22:50 +0000 (23:52 +0530)]
Rollup merge of #67775 - mental32:master, r=Dylan-DPC

Make "use $crate" a hard error

Closes #37390

4 years agoRollup merge of #67709 - petrochenkov:nodedup2, r=Centril
Dylan DPC [Sat, 4 Jan 2020 18:22:48 +0000 (23:52 +0530)]
Rollup merge of #67709 - petrochenkov:nodedup2, r=Centril

Introduce an option for disabling deduplication of diagnostics

With the intent of using it in UI tests (https://github.com/rust-lang/rust/pull/67122).

The option is boolean (`-Z deduplicate-diagnostics=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z deduplicate-diagnostics=no -Z deduplicate-diagnostics=yes` == `-Z deduplicate-diagnostics=yes`), so it can be set in a hierarchical way, e.g. UI testing infra may disable the deduplication by default with specific tests being able to enable it back.

4 years agoRollup merge of #67137 - anp:tracked-panic-internals, r=eddyb
Dylan DPC [Sat, 4 Jan 2020 18:22:44 +0000 (23:52 +0530)]
Rollup merge of #67137 - anp:tracked-panic-internals, r=eddyb

libstd uses `core::panic::Location` where possible.

cc @eddyb

4 years agoadd tests
dylan_DPC [Sat, 4 Jan 2020 18:11:17 +0000 (23:41 +0530)]
add tests

4 years agopacify the parallel compiler
Mazdak Farrokhzad [Thu, 2 Jan 2020 08:53:15 +0000 (09:53 +0100)]
pacify the parallel compiler

4 years agocleanup librustc_hir/Cargo.toml
Mazdak Farrokhzad [Thu, 2 Jan 2020 07:51:53 +0000 (08:51 +0100)]
cleanup librustc_hir/Cargo.toml

4 years agohir::{hir,def,itemlikevisit,pat_util,print} -> rustc_hir
Mazdak Farrokhzad [Thu, 2 Jan 2020 04:18:45 +0000 (05:18 +0100)]
hir::{hir,def,itemlikevisit,pat_util,print} -> rustc_hir

Also fix fallout wrt. HashStable.

4 years agoextract Export, ExportMap from hir::def
Mazdak Farrokhzad [Thu, 2 Jan 2020 03:53:12 +0000 (04:53 +0100)]
extract Export, ExportMap from hir::def

4 years agosimplify self::Namespace::* import
Mazdak Farrokhzad [Thu, 2 Jan 2020 03:24:17 +0000 (04:24 +0100)]
simplify self::Namespace::* import

4 years agomove {Par}DeepVisitor to intravisit
Mazdak Farrokhzad [Thu, 2 Jan 2020 03:18:51 +0000 (04:18 +0100)]
move {Par}DeepVisitor to  intravisit

4 years agohir::hir: simplify some imports
Mazdak Farrokhzad [Thu, 2 Jan 2020 02:48:12 +0000 (03:48 +0100)]
hir::hir: simplify some imports

4 years agosplit hir/mod.rs -> hir.rs & hir/hir.rs
Mazdak Farrokhzad [Thu, 2 Jan 2020 02:39:11 +0000 (03:39 +0100)]
split hir/mod.rs -> hir.rs & hir/hir.rs

4 years agoRestrict visibility of location_triple_for_span.
Adam Perry [Fri, 3 Jan 2020 13:44:49 +0000 (05:44 -0800)]
Restrict visibility of location_triple_for_span.

4 years agoClean up comments in panicking infra.
Adam Perry [Sat, 4 Jan 2020 08:49:18 +0000 (00:49 -0800)]
Clean up comments in panicking infra.

4 years agoUpdate ABI in const impls of panic_fn/begin_panic_fn.
Adam Perry [Tue, 24 Dec 2019 03:25:09 +0000 (19:25 -0800)]
Update ABI in const impls of panic_fn/begin_panic_fn.

4 years agoTest cleanups to match #[track_caller] in panic!.
Adam Perry [Sun, 8 Dec 2019 12:51:55 +0000 (04:51 -0800)]
Test cleanups to match #[track_caller] in panic!.

* Removes unnecessary feature flag from track_caller test.
* Tests of panic internals no longer need to explicitly construct Location.
* Add #![warn(const_err)] to retain-never-const per @oli-obk.
* Add track_caller test with diverging function.

4 years agocore and std macros and panic internals use panic::Location::caller.
Adam Perry [Sat, 7 Dec 2019 16:37:08 +0000 (08:37 -0800)]
core and std macros and panic internals use panic::Location::caller.

4 years agomove `HirId` to librustc_hir::hir_id
Mazdak Farrokhzad [Wed, 25 Dec 2019 14:26:30 +0000 (15:26 +0100)]
move `HirId` to librustc_hir::hir_id

4 years agomove def_id to new rustc_hir crate
Mazdak Farrokhzad [Wed, 25 Dec 2019 02:51:27 +0000 (03:51 +0100)]
move def_id to new rustc_hir crate

4 years agomove describe_as_module to where it's used
Mazdak Farrokhzad [Wed, 25 Dec 2019 00:27:51 +0000 (01:27 +0100)]
move describe_as_module to where it's used

4 years agoremove DefId::to_dep_node (dead code)
Mazdak Farrokhzad [Tue, 24 Dec 2019 23:31:55 +0000 (00:31 +0100)]
remove DefId::to_dep_node (dead code)

4 years ago{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemap
Mazdak Farrokhzad [Tue, 24 Dec 2019 23:22:24 +0000 (00:22 +0100)]
{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemap

4 years agoDefId{Map,Set} -> rustc::hir::def_id
Mazdak Farrokhzad [Tue, 24 Dec 2019 23:10:10 +0000 (00:10 +0100)]
DefId{Map,Set} -> rustc::hir::def_id

4 years agoadd partial eq bound to remove_item
dylan_DPC [Sat, 4 Jan 2020 18:01:32 +0000 (23:31 +0530)]
add partial eq bound to remove_item

4 years agocanonicalize rustc_session imports
Mazdak Farrokhzad [Tue, 24 Dec 2019 22:43:44 +0000 (23:43 +0100)]
canonicalize rustc_session imports

4 years agomove Node{Map,Set} -> rustc_session::node_id
Mazdak Farrokhzad [Tue, 24 Dec 2019 21:42:56 +0000 (22:42 +0100)]
move Node{Map,Set} -> rustc_session::node_id

4 years agodefine_id_collections -> rustc_data_structures
Mazdak Farrokhzad [Tue, 24 Dec 2019 21:32:36 +0000 (22:32 +0100)]
define_id_collections -> rustc_data_structures

4 years agocanonicalize FxHash{Map,Set} imports
Mazdak Farrokhzad [Tue, 24 Dec 2019 04:02:53 +0000 (05:02 +0100)]
canonicalize FxHash{Map,Set} imports

4 years agoextract rustc::middle::codegen_fn_attrs
Mazdak Farrokhzad [Tue, 24 Dec 2019 04:30:02 +0000 (05:30 +0100)]
extract rustc::middle::codegen_fn_attrs

4 years agofn adt_kind -> wfcheck
Mazdak Farrokhzad [Tue, 24 Dec 2019 04:12:01 +0000 (05:12 +0100)]
fn adt_kind -> wfcheck

4 years agoTweak and extend internal documentation, including debug asserts.
Stein Somers [Thu, 2 Jan 2020 11:33:07 +0000 (12:33 +0100)]
Tweak and extend internal documentation, including debug asserts.

Co-Authored-By: Robin Kruppe <robin.kruppe@gmail.com>
4 years agoAuto merge of #67866 - GuillaumeGomez:rollup-32vsg5b, r=GuillaumeGomez
bors [Sat, 4 Jan 2020 12:37:27 +0000 (12:37 +0000)]
Auto merge of #67866 - GuillaumeGomez:rollup-32vsg5b, r=GuillaumeGomez

Rollup of 4 pull requests

Successful merges:

 - #67822 (Revert `const_err` lint checking of casts)
 - #67823 (improve some `Drop`-related error messages)
 - #67837 (Clean up err codes)
 - #67848 (Remove unused `#[link_name = "m"]` attributes)

Failed merges:

r? @ghost

4 years agoRollup merge of #67848 - ollie27:float_link_name_attr, r=Dylan-DPC
Guillaume Gomez [Sat, 4 Jan 2020 12:17:32 +0000 (13:17 +0100)]
Rollup merge of #67848 - ollie27:float_link_name_attr, r=Dylan-DPC

Remove unused `#[link_name = "m"]` attributes

These were perhaps supposed to be `#[link(name = "m")]` but linking libm should be handled by the libc crate anyway.

They should have triggered a compile error: #47725

4 years agoRollup merge of #67837 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Guillaume Gomez [Sat, 4 Jan 2020 12:17:30 +0000 (13:17 +0100)]
Rollup merge of #67837 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC

Clean up err codes

r? @Dylan-DPC

4 years agoRollup merge of #67823 - euclio:drop-improvements, r=petrochenkov
Guillaume Gomez [Sat, 4 Jan 2020 12:17:29 +0000 (13:17 +0100)]
Rollup merge of #67823 - euclio:drop-improvements, r=petrochenkov

improve some `Drop`-related error messages

4 years agoRollup merge of #67822 - wesleywiser:revert_67676, r=oli-obk
Guillaume Gomez [Sat, 4 Jan 2020 12:17:27 +0000 (13:17 +0100)]
Rollup merge of #67822 - wesleywiser:revert_67676, r=oli-obk

Revert `const_err` lint checking of casts

Reverts part of #67676

r? @oli-obk

cc @SimonSapin

4 years agoAuto merge of #67788 - cjgillot:delint-day, r=Zoxc
bors [Sat, 4 Jan 2020 09:32:29 +0000 (09:32 +0000)]
Auto merge of #67788 - cjgillot:delint-day, r=Zoxc

Move early and late lint mechanisms to librustc_lint.

As requested, split from #67737

r? @Zoxc

4 years agotry to fix ui errors
Yuki Okushi [Fri, 3 Jan 2020 09:25:49 +0000 (18:25 +0900)]
try to fix ui errors

4 years agoAuto merge of #67853 - Centril:rollup-sx5zi9n, r=Centril
bors [Sat, 4 Jan 2020 06:20:09 +0000 (06:20 +0000)]
Auto merge of #67853 - Centril:rollup-sx5zi9n, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #66913 (Suggest calling method when first argument is `self`)
 - #67531 (no longer promote non-pattern const functions)
 - #67773 (Add a test for #37333)
 - #67786 (Nix reexports from `rustc_span` in `syntax`)
 - #67789 (Cleanup linkchecker whitelist)
 - #67810 (Implement uncommon_codepoints lint.)
 - #67835 (tweak wording of mismatched delimiter errors)
 - #67845 (Also remove const-hack for abs)

Failed merges:

r? @ghost

4 years agoUpdate E0164.md
Dylan DPC [Sat, 4 Jan 2020 06:11:35 +0000 (11:41 +0530)]
Update E0164.md

4 years agoRollup merge of #67845 - jumbatm:also-unconst-hack-abs, r=oli-obk
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:55 +0000 (02:19 +0100)]
Rollup merge of #67845 - jumbatm:also-unconst-hack-abs, r=oli-obk

Also remove const-hack for abs

Closes #67842.

r? @oli-obk

4 years agoRollup merge of #67835 - euclio:delimiter-wording, r=Centril
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:54 +0000 (02:19 +0100)]
Rollup merge of #67835 - euclio:delimiter-wording, r=Centril

tweak wording of mismatched delimiter errors

This PR improves the wording of the "incorrect delimiter" error messages. Here's a quick rationale:

- *"un-closed" -> "unclosed"*: "unclosed" is valid English, so there's no need to hyphenate the prefix. This should be pretty uncontroversial, I think.
- *"close delimiter" -> "closing delimiter"*: In my anecdotal experience, I've always heard "closing delimiter" or "closing parenthesis". In addition, the codebase already uses this terminology in comments and function names more than "close delimiter", which could indicate that it's more intuitive.
- "incorrect delimiter" -> "mismatched delimiter": "Incorrect delimiter" is vague; why is it incorrect? "mismatched" clearly indicates why the delimiter is causing the error.

r? @estebank

4 years agoRollup merge of #67810 - crlf0710:uncommon_codepoints_lint, r=Manishearth
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:52 +0000 (02:19 +0100)]
Rollup merge of #67810 - crlf0710:uncommon_codepoints_lint, r=Manishearth

Implement uncommon_codepoints lint.

Part of #55467 .  The checks of `$crate` and `{{root}}` are very unfortunate. But i'm not sure where they belongs to.

4 years agoRollup merge of #67789 - ollie27:linkchecker_whitelist, r=nikomatsakis
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:51 +0000 (02:19 +0100)]
Rollup merge of #67789 - ollie27:linkchecker_whitelist, r=nikomatsakis

Cleanup linkchecker whitelist

linkchecker is no longer run on the compiler docs so they can be removed from the whitelist.

4 years agoRollup merge of #67786 - Centril:canon-span, r=petrochenkov
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:49 +0000 (02:19 +0100)]
Rollup merge of #67786 - Centril:canon-span, r=petrochenkov

Nix reexports from `rustc_span` in `syntax`

Remove reexports `syntax::{source_map, symbol, edition}` and use `rustc_span` paths directly.

r? @petrochenkov

4 years agoRollup merge of #67773 - michalt:issue-37333-test, r=nikomatsakis
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:48 +0000 (02:19 +0100)]
Rollup merge of #67773 - michalt:issue-37333-test, r=nikomatsakis

Add a test for #37333

The test checks that we reuse the CGU of a crate when the implementation
details of an `extern crate` have changed.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
4 years agoRollup merge of #67531 - RalfJung:tame-promotion, r=nikomatsakis
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:46 +0000 (02:19 +0100)]
Rollup merge of #67531 - RalfJung:tame-promotion, r=nikomatsakis

no longer promote non-pattern const functions

This is trying to pack-pedal a bit on promotion feature creep, as proposed by @eddyb [here](https://github.com/rust-lang/const-eval/issues/19#issuecomment-472799062): possibly, a sane subset of `const fn` that we could promote are those that are just constructors -- the same subset that we might want to allow in pattern position at some point.

So, this removes the `rustc_promotable` attribute from the three functions they identified that do not fit this pattern. The first step is to run crater to see if there is code in the wild that relies on this being promotable.

r? @oli-obk

4 years agoRollup merge of #66913 - VirrageS:help-self, r=varkor,Centril
Mazdak Farrokhzad [Sat, 4 Jan 2020 01:19:44 +0000 (02:19 +0100)]
Rollup merge of #66913 - VirrageS:help-self, r=varkor,Centril

Suggest calling method when first argument is `self`

Closes: #66782
I've explored different approaches for this MR but I think the most straightforward is the best one.

I've tried to find out if the methods for given type exist (to maybe have a better suggestion), but we don't collect them anywhere and collecting them is quite problematic. Moreover, collecting all the methods would require rewriting big part of the code and also could potentially include performance degradation, which I don't think is necessary for this simple case.

4 years agomissed tidy check
cjkenn [Sat, 4 Jan 2020 01:01:16 +0000 (17:01 -0800)]
missed tidy check

4 years agoadd a check for variable names that might match by word
cjkenn [Fri, 3 Jan 2020 23:53:03 +0000 (15:53 -0800)]
add a check for variable names that might match by word

4 years agoRemove unused `#[link_name = "m"]` attributes
Oliver Middleton [Fri, 3 Jan 2020 23:41:11 +0000 (23:41 +0000)]
Remove unused `#[link_name = "m"]` attributes

These were perhaps supposed to be `#[link(name = "m")]` but linking libm should be handled by the libc crate anyway.

4 years agoClean up E0164 explanation
Guillaume Gomez [Fri, 3 Jan 2020 16:42:56 +0000 (17:42 +0100)]
Clean up E0164 explanation

4 years agoSmall error explanations cleanup
Guillaume Gomez [Fri, 3 Jan 2020 16:42:44 +0000 (17:42 +0100)]
Small error explanations cleanup

4 years agoclarify that `Drop` can be implemented for enums and unions too
Andy Russell [Fri, 3 Jan 2020 03:24:21 +0000 (22:24 -0500)]
clarify that `Drop` can be implemented for enums and unions too

4 years agoimprove generic `Drop` error messages
Andy Russell [Fri, 3 Jan 2020 00:02:06 +0000 (19:02 -0500)]
improve generic `Drop` error messages

- Use the span of the predicate
- Use the def's description instead of "struct/enum" (notably incorrect
  for unions)
- Align formatting with other error messages

4 years agoAlso remove const-hack for abs
jumbatm [Fri, 3 Jan 2020 22:42:05 +0000 (08:42 +1000)]
Also remove const-hack for abs

4 years agoAuto merge of #67829 - michaelwoerister:try-to-fix-pgo-branch-weights-test, r=Mark...
bors [Fri, 3 Jan 2020 22:03:20 +0000 (22:03 +0000)]
Auto merge of #67829 - michaelwoerister:try-to-fix-pgo-branch-weights-test, r=Mark-Simulacrum

Attempt to fix intermittent failures of pgo-branch-weights test.

This PR tries to fix the intermittent failures of the pgo-branch-weights test (https://github.com/rust-lang/rust/issues/67746). The failing instances show no `!prof` annotations in LLVM IR. One possible cause is that the instrumented binary did not record anything. This is something I've occasionally seen happen for similarly small programs when using GNU ld as linker. The linker would not properly append the instruction counter sections, leading to most counters being dropped. This PR makes the test use the Gold linker instead.

It also makes each command exit immediately on failure so we can pinpoint the failure source better, should there still be a problem.

r? @Mark-Simulacrum

4 years agoAuto merge of #67809 - RalfJung:miri, r=RalfJung
bors [Fri, 3 Jan 2020 18:46:13 +0000 (18:46 +0000)]
Auto merge of #67809 - RalfJung:miri, r=RalfJung

update miri

Fixes https://github.com/rust-lang/rust/issues/67793

4 years agoApply suggestions from code review
mental [Fri, 3 Jan 2020 15:48:10 +0000 (17:48 +0200)]
Apply suggestions from code review

Co-Authored-By: Yuki Okushi <huyuumi.dev@gmail.com>
4 years agoAddress review comments + Fix rebase
Vadim Petrochenkov [Fri, 3 Jan 2020 14:03:11 +0000 (18:03 +0400)]
Address review comments + Fix rebase

4 years agoAdd a test
Vadim Petrochenkov [Sun, 29 Dec 2019 20:53:35 +0000 (23:53 +0300)]
Add a test

4 years agorustdoc: Respect diagnostic debugging options
Vadim Petrochenkov [Sun, 29 Dec 2019 20:07:23 +0000 (23:07 +0300)]
rustdoc: Respect diagnostic debugging options

4 years agoIntroduce an option for disabling deduplication of diagnostics
Vadim Petrochenkov [Sun, 29 Dec 2019 19:10:47 +0000 (22:10 +0300)]
Introduce an option for disabling deduplication of diagnostics

4 years agotweak wording of mismatched delimiter errors
Andy Russell [Fri, 3 Jan 2020 13:40:15 +0000 (08:40 -0500)]
tweak wording of mismatched delimiter errors

4 years agoThank you Dylan and JohnTitor for blessing me.
mental [Fri, 3 Jan 2020 09:50:12 +0000 (11:50 +0200)]
Thank you Dylan and JohnTitor for blessing me.

4 years agoAttempt to fix intermittent failures of pgo-branch-weights test.
Michael Woerister [Fri, 3 Jan 2020 09:40:15 +0000 (10:40 +0100)]
Attempt to fix intermittent failures of pgo-branch-weights test.

4 years agoAuto merge of #67828 - JohnTitor:rollup-qmswkkl, r=JohnTitor
bors [Fri, 3 Jan 2020 09:07:05 +0000 (09:07 +0000)]
Auto merge of #67828 - JohnTitor:rollup-qmswkkl, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #67450 (Allow for setting a ThinLTO import limit during bootstrap)
 - #67595 (Suggest adding a lifetime constraint for opaque type)
 - #67636 (allow rustfmt key in [build] section)
 - #67736 (Less-than is asymmetric, not antisymmetric)
 - #67762 (Add missing links for insecure_time)
 - #67783 (Warn for bindings named same as variants when matching against a borrow)
 - #67796 (Ensure that we process projections during MIR inlining)
 - #67807 (Use drop instead of the toilet closure `|_| ()`)
 - #67816 (Clean up err codes)
 - #67825 (Minor: change take() docs grammar to match other docs)

Failed merges:

r? @ghost

4 years agoRollup merge of #67825 - petertodd:2020-mem-take-grammar, r=steveklabnik
Yuki Okushi [Fri, 3 Jan 2020 08:56:33 +0000 (17:56 +0900)]
Rollup merge of #67825 - petertodd:2020-mem-take-grammar, r=steveklabnik

Minor: change take() docs grammar to match other docs

Eg. mem::replace()

4 years agoRollup merge of #67816 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Yuki Okushi [Fri, 3 Jan 2020 08:56:32 +0000 (17:56 +0900)]
Rollup merge of #67816 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC

Clean up err codes

r? @Dylan-DPC

4 years agoRollup merge of #67807 - lzutao:toilet-closure, r=Centril
Yuki Okushi [Fri, 3 Jan 2020 08:56:30 +0000 (17:56 +0900)]
Rollup merge of #67807 - lzutao:toilet-closure, r=Centril

Use drop instead of the toilet closure `|_| ()`

4 years agoRollup merge of #67796 - Aaron1011:fix/mir-inline-proj, r=wesleywiser
Yuki Okushi [Fri, 3 Jan 2020 08:56:29 +0000 (17:56 +0900)]
Rollup merge of #67796 - Aaron1011:fix/mir-inline-proj, r=wesleywiser

Ensure that we process projections during MIR inlining

Fixes #67710

Previously, we were not calling `super_place`, which resulted in us
failing to update any local references that occur in
ProjectionElem::Index. This caused the post-inlining MIR to contain a
reference to a local ID from the inlined callee, leading to an ICE
due to a type mismatch.

4 years agoRollup merge of #67783 - LeSeulArtichaut:pattern-ref-warning, r=Centril
Yuki Okushi [Fri, 3 Jan 2020 08:56:27 +0000 (17:56 +0900)]
Rollup merge of #67783 - LeSeulArtichaut:pattern-ref-warning, r=Centril

Warn for bindings named same as variants when matching against a borrow

Fixes #67776

4 years agoRollup merge of #67762 - lzutao:systemtime-links, r=joshtriplett
Yuki Okushi [Fri, 3 Jan 2020 08:56:26 +0000 (17:56 +0900)]
Rollup merge of #67762 - lzutao:systemtime-links, r=joshtriplett

Add missing links for insecure_time

4 years agoRollup merge of #67736 - taralx:patch-1, r=sfackler
Yuki Okushi [Fri, 3 Jan 2020 08:56:24 +0000 (17:56 +0900)]
Rollup merge of #67736 - taralx:patch-1, r=sfackler

Less-than is asymmetric, not antisymmetric

This has bothered me for a while. It's such a small nit, but...

4 years agoRollup merge of #67636 - semarie:bootstrap-rustfmt, r=Mark-Simulacrum
Yuki Okushi [Fri, 3 Jan 2020 08:56:23 +0000 (17:56 +0900)]
Rollup merge of #67636 - semarie:bootstrap-rustfmt, r=Mark-Simulacrum

allow rustfmt key in [build] section

Permit using `rustfmt` in `config.toml`. It will allow to not download `rustfmt` binary, which is not possible for at least some tiers-3 platforms.

Fixes: #67624
r? @Mark-Simulacrum