about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-01-08Use matches macro in libcore and libstdIgor Aleksanov-118/+29
2020-01-07Auto merge of #67950 - JohnTitor:clippyup, r=JohnTitorbors-7/+7
Update Clippy Fixes #67941 r? @ghost
2020-01-07Update ClippyYuki Okushi-7/+7
2020-01-06Auto merge of #66899 - msizanoen1:riscv-std, r=alexcrichtonbors-4/+26
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
2020-01-06Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisabors-911/+933
Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum
2020-01-06Rollup merge of #67915 - lzutao:Self, r=CentrilDylan DPC-32/+32
Use Self instead of $type r? @Dylan-DPC
2020-01-06Rollup merge of #67912 - LPardue:patch-1, r=CentrilDylan DPC-1/+1
macros: typo fix spotted while reviewing the todo!macro docs
2020-01-06Rollup merge of #67906 - varkor:silence-toogeneric, r=nagisaDylan DPC-1/+41
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
2020-01-06Rollup merge of #67897 - pickfire:patch-1, r=Dylan-DPCDylan DPC-3/+3
Use `as_deref()` to replace `as_ref().map(...)` Suggested by @lzutao
2020-01-06Rollup merge of #67873 - Dylan-DPC:feature/change-remove-to-partial, r=AmanieuDylan DPC-1/+22
change remove to have a PartialEq bound Addresses [comment](https://github.com/rust-lang/rust/pull/67727#issuecomment-570660301). References #40062 r? @Amanieu
2020-01-06Rollup merge of #67800 - Aaron1011:fix/mir-generic-instance, r=oli-obkDylan DPC-13/+73
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.
2020-01-06Use Self instead of $typeLzu Tao-32/+32
2020-01-06macros: typo fixLucas Pardue-1/+1
spotted while reviewing the todo!macro docs
2020-01-06Auto merge of #67563 - euclio:rustdoc-buffer-lexer, r=GuillaumeGomezbors-112/+48
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.
2020-01-05Use Instance.ty_env instead of Instance.monomorphic_ty in interpreterAaron Hill-1/+1
2020-01-05Silence `TooGeneric` errorvarkor-1/+41
This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
2020-01-05Auto merge of #67821 - matthiaskrgr:submodule_upd, r=Xanewokbors-0/+0
submodules: update rls from fed7a31 to 7010eee Changes: ```` Update Clippy Update cargo. Correct two links to the json-error-emitter ```` Fixes #67708
2020-01-05Fix typoAaron Hill-1/+1
2020-01-05Rename Instance.ty to Instance.monomorphic_tyAaron Hill-16/+13
2020-01-05s/projections/params/Aaron Hill-1/+1
2020-01-05Run rustfmtAaron Hill-1/+2
2020-01-05Change 'panic!' to 'bug!'Aaron Hill-1/+1
Co-Authored-By: Wesley Wiser <wwiser@gmail.com>
2020-01-05Fix ICE involving calling `Instance.ty` during const evaluationAaron Hill-2/+64
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.
2020-01-05Auto merge of #67903 - Dylan-DPC:rollup-k9djyrf, r=Dylan-DPCbors-299/+228
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
2020-01-05Rollup merge of #67882 - euclio:flock, r=rkruppeDylan DPC-106/+15
remove bespoke flock bindings Replaces some `struct flock` definitions with the definition from `libc`.
2020-01-05Rollup merge of #67881 - varkor:scattering-of-backticks, r=CentrilDylan DPC-115/+115
Add backticks to various diagnostics
2020-01-05Rollup merge of #67879 - ollie27:float_sqrt_neg, r=rkruppeDylan DPC-2/+2
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.
2020-01-05Rollup merge of #67845 - jumbatm:also-unconst-hack-abs, r=oli-obkDylan DPC-0/+3
Also remove const-hack for abs Closes #67842. r? @oli-obk
2020-01-05Rollup merge of #67818 - ollie27:rustdoc_playground_syntax_error, ↵Dylan DPC-76/+93
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
2020-01-05Use `as_deref()` to replace `as_ref().map(...)`Ivan Tham-3/+3
Suggested by @lzutao
2020-01-05Auto merge of #67895 - JohnTitor:clippy-up, r=oli-obkbors-9/+7
Update Clippy Fixes #67859 r? @oli-obk
2020-01-05fix ui-fulldeps falloutMazdak Farrokhzad-8/+12
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-826/+850
2020-01-05librustc/hir.rs -> librustc/hir/mod.rsMazdak Farrokhzad-0/+0
2020-01-05simplify reexports in rustc::hirMazdak Farrokhzad-78/+72
2020-01-05Update ClippyYuki Okushi-9/+7
2020-01-05add feature gatedylan_DPC-0/+1
2020-01-05Auto merge of #67777 - Zoxc:time-refactor, r=wesleywiserbors-477/+472
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
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-477/+472
2020-01-05Auto merge of #67808 - Marwes:projection_normalization_recurse, r=nikomatsakisbors-0/+3
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
2020-01-04remove bespoke flock bindingsAndy Russell-106/+15
2020-01-04buffer lexer errors in rustdoc syntax checkingAndy Russell-112/+48
2020-01-05Add backticks to various diagnosticsvarkor-115/+115
2020-01-04Remove negative number check from float sqrtOliver Middleton-2/+2
It hasn't been UB to pass negative numbers to sqrt since https://reviews.llvm.org/D28797 which was included in LLVM 5.
2020-01-05Re-add comment about behaviour of inline.jumbatm-0/+3
2020-01-04Auto merge of #67803 - Centril:librustc_hir, r=Zoxcbors-950/+1084
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
2020-01-04submodules: update rls from fed7a31 to 7c0489cMatthias Krüger-0/+0
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
2020-01-04rustdoc: Avoid panic when parsing codeblocks for playground linksOliver Middleton-76/+93
`make_test` is also called when parsing codeblocks for the playground links so it should handle unwinds from the parser internally.
2020-01-05removed blank linedylan_DPC-1/+0
2020-01-04ef em ti ... :Pdylan_DPC-7/+6