]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #67671 - estebank:type-impl-trait, r=davidtwco
Yuki Okushi [Tue, 7 Jan 2020 04:45:59 +0000 (13:45 +0900)]
Rollup merge of #67671 - estebank:type-impl-trait, r=davidtwco

Account for `type X = impl Trait;` in lifetime suggestion

Fix #67619.

4 years agoRollup merge of #67566 - Mark-Simulacrum:thread-id-u64, r=alexcrichton
Yuki Okushi [Tue, 7 Jan 2020 04:45:58 +0000 (13:45 +0900)]
Rollup merge of #67566 - Mark-Simulacrum:thread-id-u64, r=alexcrichton

Add an unstable conversion from thread ID to u64

We see multiple cases inside rustc and ecosystem code where ThreadId is
transmuted to u64, exploiting the underlying detail. This is suboptimal
(can break unexpectedly if we change things in std).

It is unlikely that ThreadId will ever need to be larger than u64 --
creating even 2^32 threads over the course of a program is quite hard,
2^64 is even harder. As such, we do not choose to return a larger sized
type (e.g. u128). If we choose to shrink ThreadId in the future, or
otherwise change its internals, it is likely that a mapping to u64 will
still be applicable (though may become more complex).

I will file a tracking issue as soon as this is loosely approved.

4 years agoAccount for `type X = impl Trait;` in lifetime suggestion
Esteban Küber [Sat, 28 Dec 2019 04:09:33 +0000 (20:09 -0800)]
Account for `type X = impl Trait;` in lifetime suggestion

4 years agoAuto merge of #66899 - msizanoen1:riscv-std, r=alexcrichton
bors [Mon, 6 Jan 2020 19:07:42 +0000 (19:07 +0000)]
Auto merge of #66899 - msizanoen1:riscv-std, r=alexcrichton

Standard library support for riscv64gc-unknown-linux-gnu

Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.

r? @alexcrichton

4 years agoAdd an unstable conversion from thread ID to u64
Mark Rousskov [Mon, 23 Dec 2019 17:54:54 +0000 (12:54 -0500)]
Add an unstable conversion from thread ID to u64

We see multiple cases inside rustc and ecosystem code where ThreadId is
transmuted to u64, exploiting the underlying detail. This is suboptimal
(can break unexpectedly if we change things in std).

It is unlikely that ThreadId will ever need to be larger than u64 --
creating even 2^32 threads over the course of a program is quite hard,
2^64 is even harder. As such, we do not choose to return a larger sized
type (e.g. u128). If we choose to shrink ThreadId in the future, or
otherwise change its internals, it is likely that a mapping to u64 will
still be applicable (though may become more complex).

4 years agoUpdate cc crate
msizanoen1 [Mon, 6 Jan 2020 15:44:57 +0000 (22:44 +0700)]
Update cc crate

4 years agoAuto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisa
bors [Mon, 6 Jan 2020 12:55:40 +0000 (12:55 +0000)]
Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisa

Nix `rustc_hir` reexports in rustc::hir

r? @Zoxc cc @Mark-Simulacrum

4 years agoAuto merge of #67917 - Dylan-DPC:rollup-id05y91, r=Dylan-DPC
bors [Mon, 6 Jan 2020 09:31:27 +0000 (09:31 +0000)]
Auto merge of #67917 - Dylan-DPC:rollup-id05y91, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #67800 (Fix ICE involving calling `Instance.ty` during const evaluation)
 - #67873 (change remove to have a PartialEq bound)
 - #67897 (Use `as_deref()` to replace `as_ref().map(...)`)
 - #67906 (Silence `TooGeneric` error)
 - #67912 (macros: typo fix)
 - #67915 (Use Self instead of $type)

Failed merges:

r? @ghost

4 years agoRollup merge of #67915 - lzutao:Self, r=Centril
Dylan DPC [Mon, 6 Jan 2020 06:30:23 +0000 (12:00 +0530)]
Rollup merge of #67915 - lzutao:Self, r=Centril

Use Self instead of $type

r? @Dylan-DPC

4 years agoRollup merge of #67912 - LPardue:patch-1, r=Centril
Dylan DPC [Mon, 6 Jan 2020 06:30:22 +0000 (12:00 +0530)]
Rollup merge of #67912 - LPardue:patch-1, r=Centril

macros: typo fix

spotted while reviewing the todo!macro docs

4 years agoRollup merge of #67906 - varkor:silence-toogeneric, r=nagisa
Dylan DPC [Mon, 6 Jan 2020 06:30:20 +0000 (12:00 +0530)]
Rollup merge of #67906 - varkor:silence-toogeneric, r=nagisa

Silence `TooGeneric` error

This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.

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

r? @eddyb

4 years agoRollup merge of #67897 - pickfire:patch-1, r=Dylan-DPC
Dylan DPC [Mon, 6 Jan 2020 06:30:19 +0000 (12:00 +0530)]
Rollup merge of #67897 - pickfire:patch-1, r=Dylan-DPC

Use `as_deref()` to replace `as_ref().map(...)`

Suggested by @lzutao

4 years agoRollup merge of #67873 - Dylan-DPC:feature/change-remove-to-partial, r=Amanieu
Dylan DPC [Mon, 6 Jan 2020 06:30:17 +0000 (12:00 +0530)]
Rollup merge of #67873 - Dylan-DPC:feature/change-remove-to-partial, r=Amanieu

change remove to have a PartialEq bound

Addresses [comment](https://github.com/rust-lang/rust/pull/67727#issuecomment-570660301).

References #40062

r? @Amanieu

4 years agoRollup merge of #67800 - Aaron1011:fix/mir-generic-instance, r=oli-obk
Dylan DPC [Mon, 6 Jan 2020 06:30:16 +0000 (12:00 +0530)]
Rollup merge of #67800 - Aaron1011:fix/mir-generic-instance, r=oli-obk

Fix ICE involving calling `Instance.ty` during const evaluation

Fixes #67639

`Instance.ty` assumes that we are in a fully monomorphic context (e.g.
codegen), and can therefore use an empty `ParamEnv` when performing
normalization. Howver, the MIR constant evaluator code ends up calling
`Instance.ty` as a result of us attemptign to 'speculatively'
const-evaluate generic functions during const propagation.

As a result,
we may end up with projections involving type parameters
(e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize.
Normalization expects us to have proper predicates in the `ParamEnv` for
such projections, and will ICE if we don't.

This commit adds a new method `Instance.ty_env`, which takes a
`ParamEnv` for use during normalization. The MIR const-evaluator code is
changed to use this method, passing in the proper `ParamEnv` for the
context at hand.

4 years agoUse Self instead of $type
Lzu Tao [Mon, 6 Jan 2020 04:33:31 +0000 (04:33 +0000)]
Use Self instead of $type

4 years agomacros: typo fix
Lucas Pardue [Mon, 6 Jan 2020 01:55:24 +0000 (01:55 +0000)]
macros: typo fix

spotted while reviewing the todo!macro docs

4 years agoAuto merge of #67563 - euclio:rustdoc-buffer-lexer, r=GuillaumeGomez
bors [Mon, 6 Jan 2020 00:09:14 +0000 (00:09 +0000)]
Auto merge of #67563 - euclio:rustdoc-buffer-lexer, r=GuillaumeGomez

buffer lexer errors in rustdoc syntax checking

The code isn't ideal (I really would like to display the errors inline), but this at least gets us to where we were before #63017.

4 years agoUse Instance.ty_env instead of Instance.monomorphic_ty in interpreter
Aaron Hill [Sun, 5 Jan 2020 23:09:57 +0000 (18:09 -0500)]
Use Instance.ty_env instead of Instance.monomorphic_ty in interpreter

4 years agoSilence `TooGeneric` error
varkor [Sun, 5 Jan 2020 23:00:47 +0000 (23:00 +0000)]
Silence `TooGeneric` error

This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.

4 years agoAuto merge of #67821 - matthiaskrgr:submodule_upd, r=Xanewok
bors [Sun, 5 Jan 2020 20:56:03 +0000 (20:56 +0000)]
Auto merge of #67821 - matthiaskrgr:submodule_upd, r=Xanewok

submodules: update rls from fed7a31 to 7010eee

Changes:
````
Update Clippy
Update cargo.
Correct two links to the json-error-emitter
````

Fixes #67708

4 years agoFix typo
Aaron Hill [Sun, 5 Jan 2020 20:00:55 +0000 (15:00 -0500)]
Fix typo

4 years agoRename Instance.ty to Instance.monomorphic_ty
Aaron Hill [Sun, 5 Jan 2020 19:59:40 +0000 (14:59 -0500)]
Rename Instance.ty to Instance.monomorphic_ty

4 years agos/projections/params/
Aaron Hill [Fri, 3 Jan 2020 04:03:05 +0000 (23:03 -0500)]
s/projections/params/

4 years agoRun rustfmt
Aaron Hill [Fri, 3 Jan 2020 03:27:26 +0000 (22:27 -0500)]
Run rustfmt

4 years agoChange 'panic!' to 'bug!'
Aaron Hill [Fri, 3 Jan 2020 01:38:54 +0000 (20:38 -0500)]
Change 'panic!' to 'bug!'

Co-Authored-By: Wesley Wiser <wwiser@gmail.com>
4 years agoFix ICE involving calling `Instance.ty` during const evaluation
Aaron Hill [Thu, 2 Jan 2020 05:42:31 +0000 (00:42 -0500)]
Fix ICE involving calling `Instance.ty` during const evaluation

Fixes #67639

`Instance.ty` assumes that we are in a fully monomorphic context (e.g.
codegen), and can therefore use an empty `ParamEnv` when performing
normalization. Howver, the MIR constant evaluator code ends up calling
`Instance.ty` as a result of us attemptign to 'speculatively'
const-evaluate generic functions during const propagation.

As a result,
we may end up with projections involving type parameters
(e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize.
Normalization expects us to have proper predicates in the `ParamEnv` for
such projections, and will ICE if we don't.

This commit adds a new method `Instance.ty_env`, which takes a
`ParamEnv` for use during normalization. The MIR const-evaluator code is
changed to use this method, passing in the proper `ParamEnv` for the
context at hand.

4 years agoAuto merge of #67903 - Dylan-DPC:rollup-k9djyrf, r=Dylan-DPC
bors [Sun, 5 Jan 2020 17:31:32 +0000 (17:31 +0000)]
Auto merge of #67903 - Dylan-DPC:rollup-k9djyrf, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #67818 (rustdoc: Avoid panic when parsing codeblocks for playground links)
 - #67845 (Also remove const-hack for abs)
 - #67879 (Remove negative number check from float sqrt)
 - #67881 (Add backticks to various diagnostics)
 - #67882 (remove bespoke flock bindings)

Failed merges:

r? @ghost

4 years agoRollup merge of #67882 - euclio:flock, r=rkruppe
Dylan DPC [Sun, 5 Jan 2020 17:14:34 +0000 (22:44 +0530)]
Rollup merge of #67882 - euclio:flock, r=rkruppe

remove bespoke flock bindings

Replaces some `struct flock` definitions with the definition from `libc`.

4 years agoRollup merge of #67881 - varkor:scattering-of-backticks, r=Centril
Dylan DPC [Sun, 5 Jan 2020 17:14:33 +0000 (22:44 +0530)]
Rollup merge of #67881 - varkor:scattering-of-backticks, r=Centril

Add backticks to various diagnostics

4 years agoRollup merge of #67879 - ollie27:float_sqrt_neg, r=rkruppe
Dylan DPC [Sun, 5 Jan 2020 17:14:32 +0000 (22:44 +0530)]
Rollup merge of #67879 - ollie27:float_sqrt_neg, r=rkruppe

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 agoRollup merge of #67845 - jumbatm:also-unconst-hack-abs, r=oli-obk
Dylan DPC [Sun, 5 Jan 2020 17:14:30 +0000 (22:44 +0530)]
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 #67818 - ollie27:rustdoc_playground_syntax_error, r=GuillaumeGomez
Dylan DPC [Sun, 5 Jan 2020 17:14:29 +0000 (22:44 +0530)]
Rollup merge of #67818 - ollie27:rustdoc_playground_syntax_error, r=GuillaumeGomez

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.

Fixes #63016

r? @GuillaumeGomez

4 years agoUse `as_deref()` to replace `as_ref().map(...)`
Ivan Tham [Sun, 5 Jan 2020 15:10:30 +0000 (23:10 +0800)]
Use `as_deref()` to replace `as_ref().map(...)`

Suggested by @lzutao

4 years agoAuto merge of #67895 - JohnTitor:clippy-up, r=oli-obk
bors [Sun, 5 Jan 2020 14:24:55 +0000 (14:24 +0000)]
Auto merge of #67895 - JohnTitor:clippy-up, r=oli-obk

Update Clippy

Fixes #67859

r? @oli-obk

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 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 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