about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
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
2021-07-04revert broken formattingNiko Matsakis-31/+25
2021-07-04allow inference vars in type_implements_traitNiko Matsakis-26/+34
2021-07-03Support pretty printing slices using GDBEFanZh-2/+2
2021-07-02Update cargoEric Huss-0/+0
2021-07-02Auto merge of #85269 - dpaoliello:dpaoliello/DebugSymbols, r=michaelwoeristerbors-7/+20
Improve debug symbol names to avoid ambiguity and work better with MSVC's debugger There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types). Instead, each debug symbol name should be unique and useful: * Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified. * Qualify the principal trait for dynamic types. * If there is no principal trait for a dynamic type, emit all other traits instead. * Respect the `qualified` argument when emitting ref and pointer types. * For implementations, emit the disambiguator. * Print const generics when emitting generic parameters or arguments. Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly: * Avoid characters with special meaning (`#`, `[`, `"`, `+`). * Never start a name with `<` or `{` as this is treated as an operator. * `>>` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this). * Emit function declarations using C/C++ style syntax (e.g., leading return type). * Emit arrays as a synthetic `array$<type, size>` type. * Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).
2021-07-02Auto merge of #86805 - hyd-dev:miri, r=RalfJungbors-8/+8
Update Miri Fixes #86792. r? `@RalfJung`
2021-07-02Rollup merge of #86737 - jyn514:doc-tools, r=Mark-SimulacrumGuillaume Gomez-0/+1
Document rustfmt on nightly-rustc - Refactor the doc step for Rustdoc into a macro - Call the macro for both rustdoc and rustfmt - Add a `recursion_limit` macro to avoid overflow errors This does not currently pass --document-private-items for rustfmt due to https://github.com/rust-lang/cargo/pull/8422#issuecomment-871082935. r? `@Mark-Simulacrum` cc `@calebcartwright`
2021-07-02Update Mirihyd-dev-8/+8
2021-07-02Auto merge of #86782 - flip1995:clippyup, r=Manishearthbors-1086/+3185
Update Clippy Biweekly Clippy Update r? `@Manishearth`
2021-07-01Document rustfmt on nightly-rustcJoshua Nelson-0/+1
The recursion_limit attribute avoids the following error: ``` error[E0275]: overflow evaluating the requirement `std::ptr::Unique<rustc_ast::Pat>: std::marker::Send` | = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`rustfmt_nightly`) ```
2021-07-01Auto merge of #86749 - bjorn3:link_info_refactor_part1, r=petrochenkovbors-1/+1
Rename all_crate_nums query to crates and remove useless wrapper Split out of https://github.com/rust-lang/rust/pull/86105 r? `@petrochenkov`
2021-07-01Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyupflip1995-1086/+3185
2021-07-01Rename all_crate_nums query to crates and remove useless wrapperbjorn3-1/+1
2021-06-30Update cargoEric Huss-0/+0
2021-06-30Improve debug symbol names to avoid ambiguity and work better with MSVC's ↵Daniel Paoliello-7/+20
debugger There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types). Instead, each debug symbol name should be unique and useful: * Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified. * Qualify the principal trait for dynamic types. * If there is no principal trait for a dynamic type, emit all other traits instead. * Respect the `qualified` argument when emitting ref and pointer types. * For implementations, emit the disambiguator. * Print const generics when emitting generic parameters or arguments. Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly: * Avoid characters with special meaning (`#`, `[`, `"`, `+`). * Never start a name with `<` or `{` as this is treated as an operator. * `>>` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this). * Emit function declarations using C/C++ style syntax (e.g., leading return type). * Emit arrays as a synthetic `array$<type, size>` type. * Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).
2021-06-30update MiriRalf Jung-10/+8
2021-06-30Move some UI tests to more suitable subdirsYuki Okushi-2/+2
2021-06-29Auto merge of #86603 - Mark-Simulacrum:stage-step, r=pietroalbinibors-2/+0
Update to new bootstrap compiler r? `@pietroalbini`
2021-06-29Auto merge of #86446 - Smittyvb:rustc_insignificant_dtor-ice, r=Mark-Simulacrumbors-0/+1
Don't make `rustc_insignificant_dtor` feature gate This isn't a feature gate, it's an attribute that is feature gated behind the `rustc_attrs` attribute. Closes #85680.
2021-06-29Rollup merge of #86529 - cuviper:ssl3, r=Mark-SimulacrumYuki Okushi-1/+1
Add support for OpenSSL 3.0.0 This updates the `openssl` and `openssl-sys` crates to support building the toolchain with system libraries up to OpenSSL 3.0.0. This does not affect the static version used via `openssl-src` in CI builds. ref: https://github.com/sfackler/rust-openssl/pull/1264
2021-06-29Rollup merge of #86059 - GuillaumeGomez:html-checker2, r=Mark-SimulacrumYuki Okushi-0/+105
Add new tool to check HTML Re-opening of https://github.com/rust-lang/rust/pull/84480. r? `@Mark-Simulacrum`
2021-06-28Bump the workspace dependency for OpenSSL 3Josh Stone-1/+1
2021-06-28Make incomplete features part of delcarationSmitty-0/+1
This prevents mistakes where the feature is in the list of incomplete features but not actually a feature by making the incompleteness a part of the declaration.
2021-06-28Only run HTML check on rustdoc generated itemsGuillaume Gomez-14/+11
2021-06-28Add new tool to check HTML:Guillaume Gomez-0/+108
* Make html-checker run by default on rust compiler docs as well * Ensure html-checker is run on CI * Lazify tidy binary presence check
2021-06-28Update to new bootstrap compilerMark Rousskov-2/+0
2021-06-28:arrow_up: rust-analyzerLaurențiu Nicola-20/+16
2021-06-27Use rustdoc.css for error indexDeadbeef-0/+1
2021-06-25Fix clippy testRyan Levick-3/+3
2021-06-24compiletest: ignore tests on a per-revision basisSimonas Kazlauskas-343/+296
Otherwise something that ought to seemingly work like `//[x86] needs-llvm-components: x86` or `//[nll_beyond]should-fail` do not get evaluated properly.
2021-06-24tidy: tests with --target need llvm componentsSimonas Kazlauskas-0/+99
Herein we verify that all of the tests that specify a `--target` compile-flag, are also annotated with the minimal set of required llvm components necessary to run that test.
2021-06-24Rollup merge of #86560 - ehuss:update-cargo, r=ehussYuki Okushi-0/+1
Update cargo This also updates `opener` used in bootstrap (to try to keep dependencies unified). 18 commits in 44456677b5d1d82fe981c955dc5c67734b31f340..9233aa06c801801cff75df65df718d70905a235e 2021-06-12 18:00:01 +0000 to 2021-06-22 21:32:55 +0000 - Detect incorrectly named cargo.toml (rust-lang/cargo#9607) - Unify weak and namespaced features. (rust-lang/cargo#9574) - Change `rustc-cdylib-link-arg` error to a warning. (rust-lang/cargo#9563) - Updates to future-incompatible reporting. (rust-lang/cargo#9606) - Add a compatibility notice for diesel and the new resolver. (rust-lang/cargo#9602) - Don't allow config env to modify vars set by cargo (rust-lang/cargo#9579) - Disambiguate is_symlink. (rust-lang/cargo#9604) - Update opener requirement from 0.4 to 0.5 (rust-lang/cargo#9583) - Avoid quadratic complexity when splitting output into lines (rust-lang/cargo#9586) - Bump to 0.56.0, update changelog (rust-lang/cargo#9597) - Fix dep-info files including non-local build script paths. (rust-lang/cargo#9596) - Relax doc collision error. (rust-lang/cargo#9595) - Handle "jobs = 0" case in cargo config files (rust-lang/cargo#9584) - Enhancements to testsuite error output. (rust-lang/cargo#9589) - Fix typo (rust-lang/cargo#9590) - Enable support for fix --edition for 2021. (rust-lang/cargo#9588) - Add more details for installing git repository errors (rust-lang/cargo#9582) - More information for links conflicting (rust-lang/cargo#9568)
2021-06-23Handle windows paths as wellGuillaume Gomez-1/+7