about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2021-09-29Update cargoEric Huss-0/+0
2021-09-29Auto merge of #89331 - GuillaumeGomez:rollup-b10unye, r=GuillaumeGomezbors-0/+1
Rollup of 8 pull requests Successful merges: - #87260 (Libgccjit codegen) - #89212 (x.py: run `rustup toolchain link` in setup) - #89233 (Hide `<...> defined here` note if the source is not available) - #89235 (make junit output more consistent with default format) - #89255 (Fix incorrect disambiguation suggestion for associated items) - #89276 (Fix the population of the `union.impls` field) - #89283 (Add regression test for issue #83564) - #89318 (rustc_session: Remove lint store from `Session`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-09-28Rollup merge of #87260 - antoyo:libgccjit-codegen, r=Mark-SimulacrumGuillaume Gomez-0/+1
Libgccjit codegen This PR introduces a subtree for a gcc-based codegen backend to the repository, per decision in https://github.com/rust-lang/compiler-team/issues/442. We do not yet expect to ship this backend on nightly or run tests in CI, but we do verify that the backend checks (i.e., `cargo check`) successfully. Work is expected to progress primarily in https://github.com/rust-lang/rustc_codegen_gcc, with semi-regular upstreaming, like with other subtrees.
2021-09-28Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyupflip1995-1001/+2220
2021-09-27:arrow_up: rust-analyzerLaurențiu Nicola-16/+17
2021-09-26Auto merge of #89101 - ehuss:compiletest-incremental-build, r=Mark-Simulacrumbors-32/+56
Support incremental in compiletest for non-incremental modes. This adds first-class support for using incremental builds in non-incremental-mode tests. These tests previously manually passed `-C incremental=tmp/foo` which resulted in reusing the same tmp folder between runs. This means that these tests could fail whenever the on-disk incremental format changed (such as when updating one's local source tree). This changes it so that these tests can pass a `// incremental-build` header which instructs compiletest to create a set aside a dedicated incremental directory which will be cleared before the test starts to ensure it has a clean slate.
2021-09-25Rollup merge of #89216 - r00ster91:bigo, r=dtolnayManish Goregaokar-1/+1
Consistent big O notation This makes the big O time complexity notation in places with markdown support more consistent. Inspired by #89210
2021-09-25Auto merge of #89030 - nbdd0121:box2, r=jonas-schievinkbors-0/+1
Introduce `Rvalue::ShallowInitBox` Polished version of #88700. Implements MCP rust-lang/compiler-team#460, and should allow #43596 to go forward. In short, creating an empty box is split from a nullary-op `NullOp::Box` into two steps, first a call to `exchange_malloc`, then a `Rvalue::ShallowInitBox` which transmutes `*mut u8` to a shallow-initialized `Box<T>`. This allows the `exchange_malloc` call to unwind. Details can be found in the MCP. `NullOp::Box` is not yet removed, purely to make reverting easier in case anything goes wrong as the result of this PR. If revert is needed a reversion of "Use Rvalue::ShallowInitBox for box expression" commit followed by a test bless should be sufficient. Experiments in #88700 showed a very slight compile-time perf regression due to (supposedly) slightly more time spent in LLVM. We could omit unwind edge generation (in non-`oom=panic` case) in box expression MIR construction to restore perf; but I don't think it's necessary since runtime perf isn't affected and perf difference is rather small.
2021-09-25Introduce `Rvalue::ShallowInitBox`Gary Guo-0/+1
2021-09-24Rollup merge of #89001 - jackh726:binder-cleanup, r=nikomatsakisJubilee-3/+3
Be explicit about using Binder::dummy This is somewhat of a late followup to the binder refactor PR. It removes `ToPredicate` and `ToPolyTraitImpls` that hide the use of `Binder::dummy`. While this does make code a bit more verbose, it allows us be more careful about where we create binders. Another alternative here might be to add a new trait `ToBinder` or something with a `dummy()` fn. Which could still allow grepping but allows doing something like `trait_ref.dummy()` (but I also wonder if longer-term, it would be better to be even more explicit with a `bind_with_vars(ty::List::empty())` *but* that's not clear yet. r? ``@nikomatsakis``
2021-09-24consistent big O notationr00ster91-1/+1
2021-09-23Support incremental in compiletest for non-incremental modes.Eric Huss-32/+56
2021-09-23Auto merge of #89139 - camsteffen:write-perf, r=Mark-Simulacrumbors-20/+15
Use ZST for fmt unsafety as suggested here - https://github.com/rust-lang/rust/pull/83302#issuecomment-923529151.
2021-09-22Auto merge of #89187 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 7 commits in 9a28ac83c9eb73e42ffafac552c0a55f00dbf40c..0121d66aa2ef5ffa9735f86c2b56f5fdc5a837a6 2021-09-18 15:42:28 -0500 to 2021-09-22 16:08:27 +0000 - Implement example completion for zsh (rust-lang/cargo#9939) - Bump curl-sys dependency (rust-lang/cargo#9937) - Add fetch smoke test. (rust-lang/cargo#9921) - Differentiate tests in progress bar. (rust-lang/cargo#9934) - Remove TOML incompatibility hacks (rust-lang/cargo#9932) - Change diesel compatibility messages (rust-lang/cargo#9927) - Remove broken link in contrib docs. (rust-lang/cargo#9928)
2021-09-22Update cargoEric Huss-0/+0
2021-09-22Rollup merge of #89170 - rusticstuff:aarch64_macos_disable_leak_sanitizer, ↵the8472-1/+2
r=petrochenkov Disable the leak sanitizer on Macos aarch64 for now It is currently broken, see #88132.
2021-09-22Disable the leak sanitizer on Macos aarch64 for now.Hans Kratz-1/+2
It is currently broken, see #88132.
2021-09-21Auto merge of #89158 - the8472:rollup-3e4ijth, r=the8472bors-44/+22
Rollup of 12 pull requests Successful merges: - #88795 (Print a note if a character literal contains a variation selector) - #89015 (core::ascii::escape_default: reduce struct size) - #89078 (Cleanup: Remove needless reference in ParentHirIterator) - #89086 (Stabilize `Iterator::map_while`) - #89096 ([bootstrap] Improve the error message when `ninja` is not found to link to installation instructions) - #89113 (dont `.ensure()` the `thir_abstract_const` query call in `mir_build`) - #89114 (Fixes a technicality regarding the size of C's `char` type) - #89115 (:arrow_up: rust-analyzer) - #89126 (Fix ICE when `indirect_structural_match` is allowed) - #89141 (Impl `Error` for `FromSecsError` without foreign type) - #89142 (Fix match for placeholder region) - #89147 (add case for checking const refs in check_const_value_eq) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-09-21Rollup merge of #89115 - lnicola:rust-analyzer-2021-09-20, r=Mark-Simulacrumthe8472-32/+16
:arrow_up: rust-analyzer `@bors` r+ rollup
2021-09-21Rollup merge of #89078 - camsteffen:map-ref, r=cjgillotthe8472-12/+6
Cleanup: Remove needless reference in ParentHirIterator It forces an intermediate binding of `Map` which is a Copy type.
2021-09-21Auto merge of #89103 - Mark-Simulacrum:migrate-2021, r=estebankbors-32/+62
Migrate in-tree crates to 2021 This replaces #89075 (cherry picking some of the commits from there), and closes #88637 and fixes #89074. It excludes a migration of the library crates for now (see tidy diff) because we have some pending bugs around macro spans to fix there. I instrumented bootstrap during the migration to make sure all crates moved from 2018 to 2021 had the compatibility warnings applied first. Originally, the intent was to support cargo fix --edition within bootstrap, but this proved fairly difficult to pull off. We'd need to architect the check functionality to support running cargo check and cargo fix within the same x.py invocation, and only resetting sysroots on check. Further, it was found that cargo fix doesn't behave too well with "not quite workspaces", such as Clippy which has several crates. Bootstrap runs with --manifest-path ... for all the tools, and this makes cargo fix only attempt migration for that crate. We can't use e.g. --workspace due to needing to maintain sysroots for different phases of compilation appropriately. It is recommended to skip the mass migration of Cargo.toml's to 2021 for review purposes; you can also use `git diff d6cd2c6c877110748296760aefddc21a0ea1d316 -I'^edition = .20...$'` to ignore the edition = 2018/21 lines in the diff.
2021-09-21Use ZST for fmt unsafetyCameron Steffen-20/+15
This allows the format_args! macro to keep the pre-expansion code out of the unsafe block without doing gymnastics with nested `match` expressions. This reduces codegen.
2021-09-21Auto merge of #87234 - cjgillot:lower-mono, r=petrochenkovbors-1/+1
Lower only one HIR owner at a time Based on https://github.com/rust-lang/rust/pull/83723 Additional diff is here: https://github.com/cjgillot/rust/compare/ownernode...lower-mono Lowering is very tangled and has a tendency to intertwine the transformation of different items. This PR aims at simplifying the logic by: - moving global analyses to the resolver (item_generics_num_lifetimes, proc_macros, trait_impls); - removing a few special cases (non-exported macros and use statements); - restricting the amount of available information at any one time; - avoiding back-and-forth between different owners: an item must now be lowered all at once, and its parent cannot refer to its nodes. I also removed the sorting of bodies by span. The diagnostic ordering changes marginally, since definitions are pretty much sorted already according to the AST. This uncovered a subtlety in thir-unsafeck. (While these items could logically be in different PRs, the dependency between commits and the amount of conflicts force a monolithic PR.)
2021-09-20Adjust documentation for compatibility with 2021Mark Rousskov-0/+4
This also adjusts the lint docs generation to accept (and ignore) an allow attribute, rather than expecting the documentation to be immediately followed by the lint name.
2021-09-20Remove Drop-caused migration-added capturesMark Rousskov-4/+1
All of these were added due to insignificant Drop types being present.
2021-09-20Adjust tidy edition lint to force 2021Noah Lev-9/+35
This has a few exceptions today (library crates, a few submodules), but is mostly accurate.
2021-09-20Migrate to 2021Mark Rousskov-23/+23
2021-09-20:arrow_up: rust-analyzerLaurențiu Nicola-32/+16
2021-09-20Enable 2021 compatibility lints for all in-tree codeMark Rousskov-1/+4
This just applies the suggested fixes from the compatibility warnings, leaving any that are in practice spurious in. This is primarily intended to provide a starting point to identify possible fixes to the migrations (e.g., by avoiding spurious warnings). A secondary commit cleans these up where they are false positives (as is true in many of the cases).
2021-09-20Auto merge of #88321 - glaubitz:m68k-linux, r=wesleywiserbors-0/+2
Add initial support for m68k This patch series adds initial support for m68k making use of the new M68k backend introduced with LLVM-13. Additional changes will be needed to be able to actually use the backend for this target.
2021-09-20Do not store visibility in *ItemRef.Camille GILLOT-1/+1
2021-09-18Update cargoEric Huss-0/+0
2021-09-18Remove needless hir Map refCameron Steffen-12/+6
2021-09-18Auto merge of #82183 - michaelwoerister:lazier-defpathhash-loading2, ↵bors-0/+1
r=wesleywiser Simplify lazy DefPathHash decoding by using an on-disk hash table. This PR simplifies the logic around mapping `DefPathHash` values encountered during incremental compilation to valid `DefId`s in the current session. It is able to do so by using an on-disk hash table encoding that allows for looking up values directly, i.e. without deserializing the entire table. The main simplification comes from not having to keep track of `DefPathHashes` being used during the compilation session.
2021-09-17Auto merge of #88956 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 13 commits in e515c3277bf0681bfc79a9e763861bfe26bb05db..33ee5f82edb50af87b952c5b28de0f5fb41ebf18 2021-09-08 14:32:15 +0000 to 2021-09-17 13:51:54 +0000 - Update curl-sys (rust-lang/cargo#9917) - Bump Cargo's curl requirement to 7.79.0 (rust-lang/cargo#9914) - Revert "When a dependency does not have a version, git or path, fails directly" (rust-lang/cargo#9911) - Add some contributor docs for debugging testsuite tests. (rust-lang/cargo#9904) - Fix warnings when documenting with `--document-private-items` (rust-lang/cargo#9903) - Improve "wrong output" error. (rust-lang/cargo#9905) - Fix warnings from better precision of `dead_code` lint (rust-lang/cargo#9906) - Bump to 0.58.0, update changelog (rust-lang/cargo#9900) - Fix rustc --profile=dev unstable check. (rust-lang/cargo#9898) - config.md: fix typo (rust-lang/cargo#9896) - Enable some tests on windows. (rust-lang/cargo#9893) - Enable strip test on macos. (rust-lang/cargo#9889) - Fix `cargo fix --edition` on stable. (rust-lang/cargo#9890)
2021-09-17Update cargoEric Huss-0/+0
2021-09-17compiletest: Add m68k to ARCH_TABLEJohn Paul Adrian Glaubitz-0/+1
2021-09-17build-manifest: Add m68k-unknown-linux-gnu targetJohn Paul Adrian Glaubitz-0/+1
2021-09-17Rollup merge of #88883 - c410-f3r:tests, r=petrochenkovYuki Okushi-2/+2
Move some tests to more reasonable directories - 7 cc #73494 r? ``@petrochenkov``
2021-09-16Fix clippyjackh726-3/+3
2021-09-16Auto merge of #88992 - Manishearth:rollup-k9hijii, r=Manishearthbors-65/+12
Rollup of 8 pull requests Successful merges: - #87320 (Introduce -Z remap-cwd-prefix switch) - #88690 (Accept `m!{ .. }.method()` and `m!{ .. }?` statements. ) - #88775 (Revert anon union parsing) - #88841 (feat(rustc_typeck): suggest removing bad parens in `(recv.method)()`) - #88907 (Highlight the `const fn` if error happened because of a bound on the impl block) - #88915 (`Wrapping<T>` has the same layout and ABI as `T`) - #88933 (Remove implementation of `min_align_of` intrinsic) - #88951 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-09-15Rollup merge of #88775 - pnkfelix:revert-anon-union-parsing, r=davidtwcoManish Goregaokar-65/+12
Revert anon union parsing Revert PR #84571 and #85515, which implemented anonymous union parsing in a manner that broke the context-sensitivity for the `union` keyword and thus broke stable Rust code. Fix #88583.
2021-09-15Move some tests to more reasonable directoriesCaio-2/+2
2021-09-15Disable validate_maintainers.Eric Huss-1/+7
2021-09-15Move is_const_fn to under TyCtxtDeadbeef-2/+1
2021-09-15Auto merge of #88619 - GuillaumeGomez:simplify-std-os-reexports, r=Amanieubors-1/+1
Remove `cfg(doc)` from std::os module reexports to fix rustdoc linking issues Fixes https://github.com/rust-lang/rust/issues/88304. I tested it based on https://github.com/rust-lang/rust/pull/88292. Not sure if it's the best approach, but at least it makes thing a bit simpler. cc `@jyn514`
2021-09-14update testasquared31415-3/+4
2021-09-14Use on-disk-hash-table format for DefPathHashMap in hir::definitions.Michael Woerister-0/+1
2021-09-13Update permissions path for clippy lintGuillaume Gomez-1/+1
2021-09-13Auto merge of #88766 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 6 commits in 18751dd3f238d94d384a7fe967abfac06cbfe0b9..e515c3277bf0681bfc79a9e763861bfe26bb05db 2021-09-01 14:26:00 +0000 to 2021-09-08 14:32:15 +0000 - Remove log output that may leak tokens (rust-lang/cargo#9873) - rev = "refs/pull/𑑛/head" (rust-lang/cargo#9859) - Update suggestion message on bad project name error (rust-lang/cargo#9877) - clarify what goes into "*-sys" crates (rust-lang/cargo#9871) - Improve error message when unable to initialize git index repo (rust-lang/cargo#9869) - Use serde_json to generate cargo_vcs_info.json (rust-lang/cargo#9865)