about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2021-07-21Rollup merge of #87326 - ehuss:update-cargo, r=ehussEric Huss-0/+0
Update cargo 6 commits in 27277d966b3cfa454d6dea7f724cb961c036251c..4e143fd131e0c16cefd008456e974236ca54e62e 2021-07-16 00:50:39 +0000 to 2021-07-20 21:55:45 +0000 - Named profile updates (rust-lang/cargo#9685) - Inform build scripts of rustc compiler context (rust-lang/cargo#9601) - Factor version preferences into a struct (rust-lang/cargo#9703) - docs: Fix sentence & update link for GitLab CI docs (rust-lang/cargo#9704) - Deduplicate compiler diagnostics. (rust-lang/cargo#9675) - Re-enable future-incompatible tests. (rust-lang/cargo#9698)
2021-07-21Rollup merge of #87278 - lnicola:rust-analyzer-2021-07-19, r=lnicolaEric Huss-16/+15
:arrow_up: rust-analyzer
2021-07-20Update cargoEric Huss-0/+0
2021-07-20Auto merge of #87310 - spastorino:update_miri, r=RalfJungbors-12/+8
Update MIRI Fixes #87306 r? `@RalfJung`
2021-07-20Update MIRISantiago Pastorino-12/+8
2021-07-19:arrow_up: rust-analyzerLaurențiu Nicola-16/+15
2021-07-19Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyupflip1995-298/+468
2021-07-19Auto merge of #86848 - notriddle:notriddle/drop-dyn, r=varkorbors-1/+1
feat(rustc_lint): add `dyn_drop` Based on the conversation in #86747. Explanation ----------- A trait object bound of the form `dyn Drop` is most likely misleading and not what the programmer intended. `Drop` bounds do not actually indicate whether a type can be trivially dropped or not, because a composite type containing `Drop` types does not necessarily implement `Drop` itself. Naïvely, one might be tempted to write a deferred drop system, to pull cleaning up memory out of a latency-sensitive code path, using `dyn Drop` trait objects. However, this breaks down e.g. when `T` is `String`, which does not implement `Drop`, but should probably be accepted. To write a trait object bound that accepts anything, use a placeholder trait with a blanket implementation. ```rust trait Placeholder {} impl<T> Placeholder for T {} fn foo(_x: Box<dyn Placeholder>) {} ```
2021-07-18fix(clippy): add missing allow(dyn_drop)Michael Howell-1/+1
2021-07-18update MiriRalf Jung-9/+12
2021-07-17Auto merge of #86676 - cjgillot:localexpn, r=petrochenkovbors-2/+2
Make expansions stable for incr. comp. This PR aims to make expansions stable for incr. comp. by using the same architecture as definitions: - the interned identifier `ExpnId` contains a `CrateNum` and a crate-local id; - bidirectional maps `ExpnHash <-> ExpnId` are setup; - incr. comp. on-disk cache saves and reconstructs expansions using their `ExpnHash`. I tried to use as many `LocalExpnId` as I could in the resolver code, but I may have missed a few opportunities. All this will allow to use an `ExpnId` as a query key, and to force this query without recomputing caller queries. For instance, this will be used to implement #85999. r? `@petrochenkov`
2021-07-17Use LocalExpnId where possible.Camille GILLOT-2/+2
2021-07-16Auto merge of #87140 - camsteffen:pat-slice-refs, r=oli-obkbors-14/+14
Remove refs from Pat slices Changes `PatKind::Or(&'hir [&'hir Pat<'hir>])` to `PatKind::Or(&'hir [Pat<'hir>])` and others. This is more consistent with `ExprKind`, saves a little memory, and is a little easier to use.
2021-07-16Rollup merge of #87069 - sexxi-goose:copy_ref_always, r=nikomatsakisGuillaume Gomez-14/+9
ExprUseVisitor: Treat ByValue use of Copy types as ImmBorrow r? ```@nikomatsakis```
2021-07-15Update cargoEric Huss-0/+0
2021-07-15Remove refs from pat slicesCameron Steffen-14/+14
2021-07-15Auto merge of #87152 - flip1995:clippyup, r=Manishearthbors-607/+2225
Update Clippy r? `@Manishearth`
2021-07-15Rollup merge of #87147 - ehuss:update-cargo, r=ehussYuki Okushi-0/+0
Update cargo 13 commits in 3ebb5f15a940810f250b68821149387af583a79e..66a6737a0c9f3a974af2dd032a65d3e409c77aac 2021-07-02 20:35:38 +0000 to 2021-07-14 20:54:28 +0000 - Add format option to `cargo tree` to print the lib_name (rust-lang/cargo#9663) - Prefer patched versions of dependencies (rust-lang/cargo#9639) - When a dependency does not have a version, git or path, fails directly (rust-lang/cargo#9686) - Spot the crate typo easily (rust-lang/cargo#9665) - remove unnecessary 'collect' (rust-lang/cargo#9616) - Make it easier to run testsuite with a custom toolchain. (rust-lang/cargo#9679) - Serialize `cargo fix` (rust-lang/cargo#9677) - Don't recommend filing issues on rust-lang/cargo for Cargo.toml errors. (rust-lang/cargo#9658) - Update nightly failure notification. (rust-lang/cargo#9657) - Update Windows env uppercase key check. (rust-lang/cargo#9654) - Unignore fix_edition_2021. (rust-lang/cargo#9662) - Warning when using features in patch (rust-lang/cargo#9666) - Unify cargo and rustc's error reporting (rust-lang/cargo#9655)
2021-07-15Merge commit '54a20a02ecd0e1352a871aa0990bcc8b8b03173e' into clippyupflip1995-607/+2225
2021-07-14Update cargoEric Huss-0/+0
2021-07-14Add -Zfuture-incompat-test to assist with testing future-incompat reports.Eric Huss-4/+1
2021-07-14ExprUseVisitor::Delegate consume only when movingAman Arora-14/+9
2021-07-13Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obkbors-1/+1
Fix internal `default_hash_types` lint to use resolved path I run into false positives now and then (mostly in Clippy) when I want to name some util after HashMap.
2021-07-13Auto merge of #86922 - joshtriplett:target-abi, r=oli-obkbors-0/+1
target abi Implement cfg(target_abi) (RFC 2992) Add an `abi` field to `TargetOptions`, defaulting to "". Support using `cfg(target_abi = "...")` for conditional compilation on that field. Gated by `feature(cfg_target_abi)`. Add a test for `target_abi`, and a test for the feature gate. Add `target_abi` to tidy as a platform-specific cfg. Update targets to use `target_abi` All eabi targets have `target_abi = "eabi".` All eabihf targets have `target_abi = "eabihf"`. `armv6_unknown_freebsd` and `armv7_unknown_freebsd` have `target_abi = "eabihf"`. All abi64 targets have `target_abi = "abi64"`. All ilp32 targets have `target_abi = "ilp32"`. All softfloat targets have `target_abi = "softfloat"`. All *-uwp-windows-* targets have `target_abi = "uwp"`. All spe targets have `target_abi = "spe"`. All macabi targets have `target_abi = "macabi"`. aarch64-apple-ios-sim has `target_abi = "sim"`. `x86_64-fortanix-unknown-sgx` has `target_abi = "fortanix"`. `x86_64-unknown-linux-gnux32` has `target_abi = "x32"`. Add FIXME entries for targets for which existing values need to change once `cfg_target_abi` becomes stable. (All of them are tier 3 targets.) Add a test for `target_abi` in `--print cfg`.
2021-07-12:arrow_up: rust-analyzerLaurențiu Nicola-17/+17
2021-07-11update MiriRalf Jung-8/+9
2021-07-10rustc_span: Revert addition of `proc_macro` field to `ExpnKind::Macro`Vadim Petrochenkov-26/+4
The flag has a vague meaning and is used for a single diagnostic change that is low benefit and appears only under `-Z macro_backtrace`.
2021-07-09clippy: allow default_hash_types on bootstrapCameron Steffen-1/+1
2021-07-08Rollup merge of #84961 - GuillaumeGomez:rework-session-globals, r=oli-obkGuillaume Gomez-6/+11
Rework SESSION_GLOBALS API Fixes #84954. <s>Needs #84953 to be merged first (I cherry-picked its commits to have CI pass).</s> (done) r? ``@Aaron1011``
2021-07-08Rework SESSION_GLOBALS API to prevent overwriting itGuillaume Gomez-6/+11
2021-07-08Auto merge of #85363 - EFanZh:gdb-pretty-print-slices, r=michaelwoeristerbors-2/+2
Support pretty printing slices using GDB Support pretty printing `&[T]`, `&mut [T]` and `&mut str` types using GDB. Support pretty printing `&mut [T]` and `&mut str` types using LLDB. Fixes #85219.
2021-07-08Auto merge of #86949 - RalfJung:miri, r=RalfJungbors-8/+8
update Miri Fixes https://github.com/rust-lang/rust/issues/86923 Cc `@rust-lang/miri` r? `@ghost`
2021-07-07update MiriRalf Jung-8/+8
2021-07-07Implement cfg(target_abi) (RFC 2992)Josh Triplett-0/+1
Add an `abi` field to `TargetOptions`, defaulting to "". Support using `cfg(target_abi = "...")` for conditional compilation on that field. Gated by `feature(cfg_target_abi)`. Add a test for `target_abi`, and a test for the feature gate. Add `target_abi` to tidy as a platform-specific cfg. This does not add an abi to any existing target.
2021-07-07Add memchr to list of permitted cg_clif depsbjorn3-0/+1
Object started depending on it
2021-07-07Auto merge of #86920 - JohnTitor:rollup-buvzpkr, r=JohnTitorbors-6/+8
Rollup of 8 pull requests Successful merges: - #80918 (Add Integer::log variants) - #86717 (Rename some Rust 2021 lints to better names ) - #86819 (Clean up rustdoc IDs) - #86880 (Test ManuallyDrop::clone_from.) - #86906 (Replace deprecated compare_and_swap and fix typo in core::sync::atomic::{fence, compiler_fence} docs) - #86907 (Migrate `cpu-usage-over-time.py` to Python 3) - #86916 (rewrote documentation for thread::yield_now()) - #86919 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-07Auto merge of #86901 - sexxi-goose:query_remove, r=nikomatsakisbors-6/+8
Make type_implements_trait not a query r? `@nikomatsakis`
2021-07-06Make type_implements_trait not a queryAman Arora-6/+8
2021-07-06Add s to non_fmt_panicRyan Levick-5/+5
2021-07-06Allow lint names to have ascii numbersRyan Levick-1/+3
2021-07-06Auto merge of #86231 - nagisa:nagisa/abi-allowlist, r=petrochenkovbors-1/+1
Replace per-target ABI denylist with an allowlist It makes very little sense to maintain denylists of ABIs when, as far as non-generic ABIs are concerned, targets usually only support a small subset of the available ABIs. This has historically been a cause of bugs such as us allowing use of the platform-specific ABIs on x86 targets – these in turn would cause LLVM errors or assertions to fire. In this PR we got rid of the per-target ABI denylists, and instead compute which ABIs are supported with a simple match based on, mostly, the `Target::arch` field. Among other things, this makes it impossible to forget to consider this problem (in either direction) and forces one to consider what the ABI support looks like when adding an ABI (rarely) rather than target (often), which should hopefully also reduce the cognitive load on both contributors as well as reviewers. Fixes #57182 Sponsored by: standard.ai --- ## Summary for teams One significant user-facing change after this PR is that there's now a future compat warning when building… * `stdcall`, `fastcall`, `thiscall` using code with targets other than 32-bit x86 (i386...i686) or *-windows-*; * `vectorcall` using code when building for targets other than x86 (either 32 or 64 bit) or *-windows-*. Previously these ABIs have been accepted much more broadly, even for architectures and targets where this made no sense (e.g. on wasm32) and would fall back to the C ABI. In practice this doesn't seem to be used too widely and the [breakages in crater](https://github.com/rust-lang/rust/pull/86231#issuecomment-866300943) that we see are mostly about Windows-specific code that was missing relevant `cfg`s and just happened to successfully `check` on Linux for one reason or another. The intention is that this warning becomes a hard error after some time.
2021-07-06Replace per-target ABI denylist with an allowlistSimonas Kazlauskas-1/+1
It makes very little sense to maintain denylists of ABIs when, as far as non-generic ABIs are concerned, targets usually only support a small subset of the available ABIs. This has historically been a cause of bugs such as us allowing use of the platform-specific ABIs on x86 targets – these in turn would cause LLVM errors or assertions to fire. Fixes #57182 Sponsored by: standard.ai
2021-07-06Rollup merge of #86878 - lnicola:rust-analyzer-2021-07-05, r=lnicolaYuki Okushi-16/+17
:arrow_up: rust-analyzer
2021-07-05:arrow_up: rust-analyzerLaurențiu Nicola-16/+17
2021-07-05Auto merge of #86861 - RalfJung:miri, r=RalfJungbors-8/+8
update miri Let's get https://github.com/rust-lang/miri/pull/1842 shipped. :) Also fixes https://github.com/rust-lang/rust/issues/86863 Cc `@rust-lang/miri` r? `@ghost`
2021-07-05Auto merge of #86663 - fee1-dead:use-rustdoc-css, r=GuillaumeGomezbors-0/+1
Use rustdoc.css for error index Closes #86512.
2021-07-05update miriRalf Jung-8/+8
2021-07-05Rollup merge of #86874 - klensy:bump-deps, r=Mark-SimulacrumYuki Okushi-1/+1
Bump deps tidy: updated cargo_metadata to 0.12 (rustfmt only one left, that depends on 0.8 version in tree, waiting when it merges into rustc repo) miow v0.3.6 -> v0.3.7, drops socket2 v0.3.19 curl v0.4.36 -> v0.4.38 curl-sys v0.4.42+curl-7.76.0 -> v0.4.44+curl-7.77.0 fixes CVE's https://curl.se/docs/vuln-7.76.0.html
2021-07-04Auto merge of #86866 - nikomatsakis:issue-84841, r=oli-obkbors-1/+3
Hack: Ignore inference variables in certain queries Fixes #84841 Fixes #86753 Some queries are not built to accept types with inference variables, which can lead to ICEs. These queries probably ought to be converted to canonical form, but as a quick workaround, we can return conservative results in the case that inference variables are found. We should file a follow-up issue (and update the FIXMEs...) to do the proper refactoring. cc `@arora-aman` r? `@oli-obk`
2021-07-04tidy: update cargo_metadata to 0.12klensy-1/+1