summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-03-03Use .any(x) instead of .find(x).is_some() on iterators.Matthias Krüger-10/+6
2020-03-03Use .nth(x) instead of .skip(x).next() on iterators.Matthias Krüger-7/+3
2020-03-03Simplify conditions like x + 1 <= y to x < yMatthias Krüger-2/+2
2020-03-03Use let instead of match to get value of enum with single variant.Matthias Krüger-5/+2
2020-03-02Remove chalk integrationCAD97-2860/+20
2020-03-03Remove `usable_size` APIsTim Diekmann-269/+134
2020-03-02Auto merge of #69627 - ehuss:update-cargo-clippy, r=Dylan-DPCbors-13/+13
Update cargo, clippy Closes #69601 ## cargo 16 commits in e57bd02999c9f40d52116e0beca7d1dccb0643de..bda50510d1daf6e9c53ad6ccf603da6e0fa8103f 2020-02-21 20:20:10 +0000 to 2020-03-02 18:05:34 +0000 - Fix rare failure in collision_export test. (rust-lang/cargo#7956) - Ignore broken Cargo.toml in git sources (rust-lang/cargo#7947) - Add more fingerprint mtime debug logging. (rust-lang/cargo#7952) - Fix plugin tests for latest nightly. (rust-lang/cargo#7955) - Simplified usage code of SipHasher (rust-lang/cargo#7945) - Add a special case for git config discovery inside tests (rust-lang/cargo#7944) - Fixes issue rust-lang/cargo#7543 (rust-lang/cargo#7946) - Filter out cfgs which should not be used during build (rust-lang/cargo#7943) - Provide extra context on a query failure. (rust-lang/cargo#7934) - Try to clarify `cargo metadata`'s relationship with the workspace. (rust-lang/cargo#7927) - Update libgit2 dependency (rust-lang/cargo#7939) - Fix link in comment (rust-lang/cargo#7936) - Enable `cargo doc --open` tests on macos. (rust-lang/cargo#7932) - build-std: remove sysroot probe (rust-lang/cargo#7931) - Try to clarify how feature flags work on the "current" package. (rust-lang/cargo#7928) - Add extra details in the new feature resolver doc comment. (rust-lang/cargo#7918) ## clippy 6 commits in fc5d0cc583cb1cd35d58fdb7f3e0cfa12dccd6c0..8b7f7e667268921c278af94ae30a61e87a22b22b 2020-02-24 05:58:17 +0000 to 2020-03-02 20:00:31 +0000 - Rustup to rust-lang/rust#69469 (rust-lang-nursery/rust-clippy#5254) - Some rustups (rust-lang-nursery/rust-clippy#5247) - Update git2 to 0.12 (rust-lang-nursery/rust-clippy#5232) - Rustup to rust-lang/rust#61812 (rust-lang-nursery/rust-clippy#5231) - Add lint to improve floating-point expressions (rust-lang-nursery/rust-clippy#4897) - Do not run deploy action on other repos (rust-lang-nursery/rust-clippy#5222)
2020-03-02Apply suggestions from code reviewLeSeulArtichaut-2/+3
2020-03-02Update cargo, clippyEric Huss-13/+13
2020-03-02Toolstate: don't duplicate nightly tool list.Eric Huss-1/+1
2020-03-02Don't convert Results to Options just for matching.Matthias Krüger-3/+3
2020-03-02Auto merge of #69635 - Dylan-DPC:rollup-2oh8uu5, r=Dylan-DPCbors-95/+688
Rollup of 6 pull requests Successful merges: - #68682 (Add documentation to compiler intrinsics) - #69544 (Unrevert "Remove `checked_add` in `Layout::repeat`") - #69617 (constify mem::forget) - #69622 (Rename `syntax` in librustc_ast/README.md) - #69623 (stash API: remove panic to fix ICE.) - #69624 (Toolstate: Don't block beta week on already broken tools.) Failed merges: - #69626 (Toolstate: don't duplicate nightly tool list.) r? @ghost
2020-03-02Rollup merge of #69624 - ehuss:toolstate-beta-regress, r=Mark-SimulacrumDylan DPC-63/+133
Toolstate: Don't block beta week on already broken tools. This changes it so that tools are allowed to be broken entering the beta week if they are already broken. This restores the original behavior before the changes in #69332. Closes #68458
2020-03-02Rollup merge of #69623 - Centril:fix-69396-tmp, r=petrochenkovDylan DPC-14/+74
stash API: remove panic to fix ICE. Implements the temporary solution suggested in https://github.com/rust-lang/rust/pull/69537#issuecomment-593143975. Fixes https://github.com/rust-lang/rust/issues/69396. r? @petrochenkov
2020-03-02Rollup merge of #69622 - LeSeulArtichaut:patch-2, r=CentrilDylan DPC-1/+1
Rename `syntax` in librustc_ast/README.md Related to e94d3b7. r? @petrochenkov
2020-03-02Rollup merge of #69617 - DutchGhost:master, r=LukasKalbertodtDylan DPC-1/+2
constify mem::forget implements https://github.com/rust-lang/rust/issues/69616
2020-03-02Rollup merge of #69544 - lqd:unrevert-67174, r=Mark-SimulacrumDylan DPC-7/+5
Unrevert "Remove `checked_add` in `Layout::repeat`" This reapplies @kraai's original `libcore::alloc::Layout::repeat` change from #67174 which was temporarily reverted in #69241. Now that the proper LLVM fix has been cherry-picked, we can unrevert the revert. This change was originally reviewed by @hanna-kruppe on the initial PR. cc @RalfJung
2020-03-02Rollup merge of #68682 - LeSeulArtichaut:stable-intrinsics, r=steveklabnikDylan DPC-9/+473
Add documentation to compiler intrinsics This adds documentation to the compiler intrinsics having stable standard implementations. Relates to #34338 (cc @bstrie) r? @steveklabnik (for reassignment?)
2020-03-02clean up E0378 explanationGuillaume Gomez-20/+22
2020-03-02use values() or keys() respectively when iterating only over keys or values ↵Matthias Krüger-9/+9
of maps.
2020-03-02Update my mailmap entryErin Power-1/+2
2020-03-02actually mark the function constDutchGhost-1/+1
2020-03-02Auto merge of #69257 - RalfJung:layout-visitor, r=eddybbors-203/+238
Adjust Miri value visitor, and doc-comment layout components I realized that I still didn't have quite the right intuition for how our `LayoutDetails` work, so I had to adjust the Miri value visitor to the things I understood better now. I also added some doc-comments to `LayoutDetails` as a hopefully canonical place to note such things. The main visitor change is that we *first* look at all the fields (according to `FieldPlacement`), and *then* check the variants and handle `Multiple` appropriately. I did not quite realize how orthogonal "fields" and "variants" are. I also moved the check for the scalar ABI to *after* checking all the fields; this leads to better (more type-driven) error messages. And it looks like we can finally remove that magic hack for `ty::Generator`. :D r? @oli-obk for the Miri/visitor changes and @eddyb for the layout docs The Miri PR is at: https://github.com/rust-lang/miri/pull/1178
2020-03-02remove non-sysroot sources from rust-src componentRalf Jung-2/+0
2020-03-02Auto merge of #69469 - matthewjasper:type-flags, r=cramertjbors-148/+136
Clean up TypeFlags * Add a new method `has_infer_types_or_consts` that's used instead of `has_infer_types` most of the time, since there's generally no reason to only consider types. * Remove `has_closure_types`/`HAS_TY_CLOSURE`, because closures are no longer implicitly linked to the `InferCtxt`. * Reorder flags to group similar ones together * Make some flags more granular * Compute `HAS_FREE_LOCAL_NAMES` from the other flags * Add some more doc comments
2020-03-02Fix a leak in `DiagnosticBuilder::into_diagnostic`.Nicholas Nethercote-6/+5
Fixes #69600.
2020-03-02Auto merge of #69442 - jakevossen5:master, r=Mark-Simulacrumbors-17/+42
`--explain` disambiguates no long description and invalid error codes Closes #44710 First code contribution here, so feedback is very much appreciated! cc @zackmdavis cc @Mark-Simulacrum
2020-03-02Auto merge of #69432 - petrochenkov:alldeps, r=eddybbors-24/+5
rustc_metadata: Load metadata for indirect macro-only dependencies Imagine this dependency chain between crates ``` Executable crate -> Library crate -> Macro crate ``` where "Library crate" uses the macros from "Macro crate" for some code generation, but doesn't reexport them any further. Currently, when compiling "Executable crate" we don't even load metadata for it, because why would we want to load any metadata from "Macro crate" if it already did all its code generation job when compiling "Library crate". Right? Wrong! Hygiene data and spans (https://github.com/rust-lang/rust/issues/68686, https://github.com/rust-lang/rust/pull/68941) from "Macro crate" still may need to be decoded from "Executable crate". So we'll have to load them properly. Questions: - How this will affect compile times for larger crate trees in practice? How to measure it? Hygiene/span encoding/decoding will necessarily slow down compilation because right now we just don't do some work that we should do, but this introduces a whole new way to slow down things. E.g. loading metadata for `syn` (and its dependencies) when compiling your executable if one of its library dependencies uses it. - We are currently detecting whether a crate reexports macros from "Macro crate" or not, could we similarly detect whether a crate "reexports spans" and keep it unloaded if it doesn't? Or at least "reexports important spans" affecting hygiene, we can probably lose spans that only affect diagnostics.
2020-03-01Toolstate: Don't block beta week on already broken tools.Eric Huss-63/+133
2020-03-02stash API: remove panic to fix ICE.Mazdak Farrokhzad-14/+74
2020-03-01Rename `syntax` in librustc_ast/README.mdLeSeulArtichaut-1/+1
2020-03-01encode `;` stmt w/o expr as `StmtKind::Empty`Mazdak Farrokhzad-102/+73
2020-03-01Clean up TypeFlagsMatthew Jasper-87/+99
* Reorder flags to group similar ones together * Make some flags more granular * Compute `HAS_FREE_LOCAL_NAMES` from the other flags * Remove `HAS_TY_CLOSURE` * Add some more doc comments
2020-03-01Fix use of `has_infer_types`Matthew Jasper-61/+37
* Add a new method `has_infer_types_or_consts` that's used instead most of the time, since there's generally no reason to only consider types. * Remove use of `has_closure_types`, because closures are no longer implicitly linked to the `InferCtxt`.
2020-03-01doc(librustc_error_codes): add long error explanation for E0719Matthew Kuo-1/+38
Progresses #61137
2020-03-01Auto merge of #69408 - RalfJung:canonical-alloc-id, r=oli-obkbors-66/+58
Miri: let machine canonicalize AllocIDs This implements the rustc side of the plan I laid out [here](https://github.com/rust-lang/miri/pull/1147#issuecomment-581868901). Miri PR: https://github.com/rust-lang/miri/pull/1190
2020-03-01use for (idx, item) in iter.enumerate() instead of manually counting loop ↵Matthias Krüger-7/+4
iterations by variables
2020-03-01use subdsec_micros() instead of subsec_nanos() / 1000Matthias Krüger-1/+1
2020-03-01use starts_with() instead of chars().next() == Some(x)Matthias Krüger-1/+1
2020-03-01constify mem::forgetDutchGhost-0/+1
2020-03-01`delay_span_bug` when codegen cannot select obligationEsteban Küber-10/+55
Fix #69602, introduced in #60126 by letting the compiler continue past type checking after encountering errors.
2020-03-01Auto merge of #69612 - Dylan-DPC:rollup-f180gcc, r=Dylan-DPCbors-42/+55
Rollup of 7 pull requests Successful merges: - #69504 (Use assert_ne in hash tests) - #69554 (Cleanup e0374) - #69568 (Clarify explanation of Vec<T> 'fn resize') - #69569 (simplify boolean expressions) - #69577 (Clean up E0375 explanation) - #69598 (rustdoc: HTML escape crate version) - #69607 (Clean up E0376 explanation) Failed merges: r? @ghost
2020-03-01Rollup merge of #69607 - GuillaumeGomez:cleanup-e0376, r=Dylan-DPCDylan DPC-10/+11
Clean up E0376 explanation r? @Dylan-DPC
2020-03-01Rollup merge of #69598 - ollie27:rustdoc_crate-version_escape, r=GuillaumeGomezDylan DPC-2/+9
rustdoc: HTML escape crate version As `--crate-version` accepts arbitrary strings they need to be escaped. r? @GuillaumeGomez
2020-03-01Rollup merge of #69577 - GuillaumeGomez:cleanup-e0375, r=Dylan-DPCDylan DPC-8/+11
Clean up E0375 explanation r? @Dylan-DPC
2020-03-01Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-SimulacrumDylan DPC-13/+13
simplify boolean expressions
2020-03-01Rollup merge of #69568 - JOE1994:patch-2, r=Dylan-DPCDylan DPC-2/+3
Clarify explanation of Vec<T> 'fn resize' 1. Clarified on what should implement `Clone` trait. 2. Minor grammar fix: to be able clone => to be able **to** clone
2020-03-01Rollup merge of #69554 - GuillaumeGomez:cleanup-e0374, r=Dylan-DPCDylan DPC-6/+8
Cleanup e0374 r? @Dylan-DPC
2020-03-01Rollup merge of #69504 - MichaelMcDonnell:hash_assert_ne, r=LukasKalbertodtDylan DPC-1/+0
Use assert_ne in hash tests The hash tests were written before the assert_ne macro was added to the standard library. The assert_ne macro provides better output in case of a failure.
2020-03-01Remove assert that had been replaced by assert_neMichael Mc Donnell-1/+0