]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoClean up E0178 explanation
Guillaume Gomez [Mon, 6 Jan 2020 14:28:12 +0000 (15:28 +0100)]
Clean up E0178 explanation

4 years agoremove usage of feature gate
dylan_DPC [Mon, 30 Dec 2019 12:27:00 +0000 (17:57 +0530)]
remove usage of feature gate

4 years agostabilise remove_item
dylan_DPC [Mon, 30 Dec 2019 11:59:03 +0000 (17:29 +0530)]
stabilise remove_item

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 agoFormatting an example for method Vec.retain
Grachev Mikhail [Mon, 6 Jan 2020 12:18:03 +0000 (15:18 +0300)]
Formatting an example for method Vec.retain

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 agoFix ICE in const pretty printing and resolve FIXME
varkor [Mon, 6 Jan 2020 00:11:27 +0000 (00:11 +0000)]
Fix ICE in const pretty printing and resolve FIXME

Consts now have a `fmt::Display` impl, so we can just use that to pretty-print.

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 agorustdoc: HTML escape const values
Oliver Middleton [Sun, 5 Jan 2020 23:19:42 +0000 (23:19 +0000)]
rustdoc: HTML escape const values

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 agoAdd more nuanced advice about spin_loop_hint
Aleksey Kladov [Sun, 5 Jan 2020 19:06:52 +0000 (20:06 +0100)]
Add more nuanced advice about spin_loop_hint

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 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 agoFix typo
Adam Perry [Sun, 5 Jan 2020 06:54:09 +0000 (22:54 -0800)]
Fix typo

Co-Authored-By: lzutao <taolzu@gmail.com>
4 years agoResult's panics have `#[track_caller]`.
Adam Perry [Sun, 5 Jan 2020 03:42:21 +0000 (19:42 -0800)]
Result's panics have `#[track_caller]`.

4 years agoOption's panics are all #[track_caller].
Adam Perry [Sun, 5 Jan 2020 03:30:44 +0000 (19:30 -0800)]
Option's panics are all #[track_caller].

Also includes a simple test with a custom panic hook to ensure we don't regress.

4 years agoFix incremental builds of core by allowing unused attribute.
Adam Perry [Sun, 5 Jan 2020 01:46:47 +0000 (17:46 -0800)]
Fix incremental builds of core by allowing unused attribute.

The same problem as in https://github.com/rust-lang/rust/issues/65023 was
introduced by https://github.com/rust-lang/rust/pull/67657. This works
around the current incrcomp issue with these attributes by allowing it
here.

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