about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2022-02-02Lazily resolve type-alias-impl-trait defining usesOli Scherer-0/+1
by using an opaque type obligation to bubble up comparisons between opaque types and other types Also uses proper obligation causes so that the body id works, because out of some reason nll uses body ids for logic instead of just diagnostics.
2022-02-01Rollup merge of #93290 - lcnr:same_type, r=jackh726Matthias Krüger-32/+25
remove `TyS::same_type` This function ignored regions and constants in adts, but didn't do so for references or any other types. cc https://github.com/rust-lang/rust/pull/93148#discussion_r791408057
2022-02-01Rollup merge of #93267 - lcnr:auto-trait-lint, r=nikomatsakisMatthias Krüger-26/+27
implement a lint for suspicious auto trait impls cc https://github.com/rust-lang/rust/pull/85048#issuecomment-1019805102 r? ``@nikomatsakis``
2022-02-01remove `TyS::same_type`lcnr-32/+25
it ignored regions and constants in adts, but didn't do so for references or any other types. This seemed quite weird
2022-02-01silence lint in clippylcnr-26/+27
2022-02-01Auto merge of #93534 - ehuss:rollup-9ecozo9, r=ehussbors-0/+0
Rollup of 9 pull requests Successful merges: - #91343 (Fix suggestion to slice if scrutinee is a `Result` or `Option`) - #93019 (If an integer is entered with an upper-case base prefix (0Xbeef, 0O755, 0B1010), suggest to make it lowercase) - #93090 (`impl Display for io::ErrorKind`) - #93456 (Remove an unnecessary transmute from opaque::Encoder) - #93492 (Hide failed command unless in verbose mode) - #93504 (kmc-solid: Increase the default stack size) - #93513 (Allow any pretty printed line to have at least 60 chars) - #93532 (Update books) - #93533 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-02-01Update cargoEric Huss-0/+0
2022-02-01Auto merge of #93259 - eddyb:diagbld-scalar-pair, r=jackh726bors-1/+1
rustc_errors: only box the `diagnostic` field in `DiagnosticBuilder`. I happened to need to do the first change (replacing `allow_suggestions` with equivalent functionality on `Diagnostic` itself) as part of a larger change, and noticed that there's only two fields left in `DiagnosticBuilderInner`. So with this PR, instead of a single pointer, `DiagnosticBuilder` is two pointers, which should work just as well for passing *it* by value (and may even work better wrt some operations, though probably not by much). But anything that was already taking advantage of `DiagnosticBuilder` being a single pointer, and wrapping it further (e.g. `Result<T, DiagnosticBuilder>` w/ non-ZST `T`), ~~will probably see a slowdown~~, so I want to do a perf run before even trying to propose this.
2022-01-31Auto merge of #90891 - nbdd0121:format, r=Mark-Simulacrumbors-12/+22
Create `core::fmt::ArgumentV1` with generics instead of fn pointer Split from (and prerequisite of) #90488, as this seems to have perf implication. `@rustbot` label: +T-libs
2022-01-29Change index_refutable_slice to use FxIndexMapGary Guo-6/+6
This will prevent unstable order when HirIds are pertubated.
2022-01-29Create `core::fmt::ArgumentV1` with generics instead of fn pointerGary Guo-6/+16
2022-01-27Merge commit 'a98e7ab8b94485be6bd03e0c6b8682ecab5b52e6' into clippyupflip1995-997/+1841
2022-01-25Update cargoEric Huss-0/+0
2022-01-25Auto merge of #93095 - Aaron1011:remove-assoc-ident, r=cjgillotbors-1/+1
Store a `Symbol` instead of an `Ident` in `AssocItem` This is the same idea as #92533, but for `AssocItem` instead of `VariantDef`/`FieldDef`. With this change, we no longer have any uses of `#[stable_hasher(project(...))]`
2022-01-24rustc_errors: only box the `diagnostic` field in `DiagnosticBuilder`.Eduard-Mihai Burtescu-1/+1
2022-01-23Update clippyVadim Petrochenkov-64/+54
2022-01-23rustc_lint: Reuse the set of registered tools from resolverVadim Petrochenkov-1/+1
2022-01-21Auto merge of #92363 - the8472:less-compiletest-normalization, r=Mark-Simulacrumbors-65/+32
Override rustc version in ui and mir-opt tests to get stable hashes Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. UI test timings on my machine: OLD: 39.63s NEW: 30.27s
2022-01-21Remove a span from hir::ExprKind::MethodCallCameron Steffen-168/+162
2022-01-21Auto merge of #91359 - dtolnay:args, r=Mark-Simulacrumbors-1/+10
Emit simpler code from format_args I made this PR so that `cargo expand` dumps a less overwhelming amount of formatting-related code. <br> `println!("rust")` **Before:** ```rust { ::std::io::_print(::core::fmt::Arguments::new_v1(&["rust\n"], &match () { _args => [], })); }; ``` **After:** ```rust { ::std::io::_print(::core::fmt::Arguments::new_v1(&["rust\n"], &[])); }; ``` `println!("{}", x)` **Before:** ```rust { ::std::io::_print(::core::fmt::Arguments::new_v1( &["", "\n"], &match (&x,) { _args => [::core::fmt::ArgumentV1::new( _args.0, ::core::fmt::Display::fmt, )], }, )); }; ``` **After:** ```rust { ::std::io::_print(::core::fmt::Arguments::new_v1( &["", "\n"], &[::core::fmt::ArgumentV1::new(&x, ::core::fmt::Display::fmt)], )); }; ```
2022-01-21Auto merge of #93138 - matthiaskrgr:rollup-m8akifd, r=matthiaskrgrbors-1/+13
Rollup of 17 pull requests Successful merges: - #91032 (Introduce drop range tracking to generator interior analysis) - #92856 (Exclude "test" from doc_auto_cfg) - #92860 (Fix errors on blanket impls by ignoring the children of generated impls) - #93038 (Fix star handling in block doc comments) - #93061 (Only suggest adding `!` to expressions that can be macro invocation) - #93067 (rustdoc mobile: fix scroll offset when jumping to internal id) - #93086 (Add tests to ensure that `let_chains` works with `if_let_guard`) - #93087 (Fix src/test/run-make/raw-dylib-alt-calling-convention) - #93091 (⬆ chalk to 0.76.0) - #93094 (src/test/rustdoc-json: Check for `struct_field`s in `variant_tuple_struct.rs`) - #93098 (Show a more informative panic message when `DefPathHash` does not exist) - #93099 (rustdoc: auto create output directory when "--output-format json") - #93102 (Pretty printer algorithm revamp step 3) - #93104 (Support --bless for pp-exact pretty printer tests) - #93114 (update comment for `ensure_monomorphic_enough`) - #93128 (Add script to prevent point releases with same number as existing ones) - #93136 (Backport the 1.58.1 release notes to master) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-01-21use lazy_static to compile `Regex::new` instances once instead on each testThe 8472-31/+32
2022-01-21Override rustc version in ui and mir-opt tests to get stable hashesThe 8472-34/+0
Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so no test-dependent normalization is needed. Hashes for the standard library still change so some normalizations are still needed.
2022-01-20:arrow_up: rust-analyzerLaurențiu Nicola-16/+18
2022-01-19Support --bless for pp-exact pretty printer testsDavid Tolnay-1/+13
2022-01-19Store a `Symbol` instead of an `Ident` in `AssocItem`Aaron Hill-1/+1
This is the same idea as #92533, but for `AssocItem` instead of `VariantDef`/`FieldDef`. With this change, we no longer have any uses of `#[stable_hasher(project(...))]`
2022-01-19Rollup merge of #92800 - ehuss:docs-fallback, r=Mark-SimulacrumMatthias Krüger-43/+66
Add manifest docs fallback. This adds a fallback so that the rustup manifest will contain the rust-docs component for all hosts. There is a mapping so that the docs that get downloaded are roughly close to the actual host. There inevitably will be things that don't match. Ideally the standard library docs would be the same for every platform (`cfg(doc)` goes a long way towards this), but there are still lots of minor differences. Closes #69525
2022-01-19Rollup merge of #92316 - petrochenkov:extmangle, r=wesleywiserMatthias Krüger-16/+16
mangling_v0: Skip extern blocks during mangling There's no need to include the dummy `Nt` into the symbol name, items in extern blocks belong to their parent modules for all purposes except for inheriting the ABI and attributes. Follow up to https://github.com/rust-lang/rust/pull/92032 (There's also a drive-by fix to the `rust-demangler` tool's tests, which don't run on CI, I initially attempted using them for testing this PR.)
2022-01-19Add assert that fallback targets must be available.Eric Huss-1/+4
2022-01-18Update cargoEric Huss-0/+0
2022-01-18Auto merge of #87648 - JulianKnodt:const_eq_constrain, r=oli-obkbors-38/+51
allow eq constraints on associated constants Updates #70256 (cc `@varkor,` `@Centril)`
2022-01-18Auto merge of #93001 - flip1995:clippyup, r=Manishearthbors-100/+754
Out of cycle Clippy update I want to do an out-of-cycle sync for rust-lang/rust-clippy#8295, and possibly backport this to stable together with https://github.com/rust-lang/rust/issues/92938. If this doesn't get backported to stable, then I at least want to backport it to beta. r? `@Manishearth`
2022-01-17Add term to ExistentialProjectionkadmin-1/+1
Also prevent ICE when adding a const in associated const equality.
2022-01-17Update w/ commentskadmin-1/+1
Removes uses of ty() where a method is implemented on TypeFoldable, and also directly formats a Term.
2022-01-17Update term for use in more placeskadmin-6/+12
Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the future, but slightly worried it allows items which are consts which only accept types.
2022-01-17Bless clippy ui tests after format_args changeDavid Tolnay-1/+10
2022-01-17Use Term in ProjectionPredicatekadmin-27/+23
ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time.
2022-01-17Remove VERSION from manifest readme docs.Eric Huss-2/+1
The version was removed in https://github.com/rust-lang/rust/pull/77145/
2022-01-17Add manifest docs fallback.Eric Huss-41/+62
2022-01-17Add termkadmin-8/+17
Instead of having a separate enum variant for types and consts have one but have either a const or type.
2022-01-17add eq constraints on associated constantskadmin-10/+12
2022-01-17Auto merge of #90986 - camsteffen:nested-filter, r=cjgillotbors-435/+130
Replace `NestedVisitorMap` with generic `NestedFilter` This is an attempt to make the `intravisit::Visitor` API simpler and "more const" with regard to nested visiting. With this change, `intravisit::Visitor` does not visit nested things by default, unless you specify `type NestedFilter = nested_filter::OnlyBodies` (or `All`). `nested_visit_map` returns `Self::Map` instead of `NestedVisitorMap<Self::Map>`. It panics by default (unreachable if `type NestedFilter` is omitted). One somewhat trixty thing here is that `nested_filter::{OnlyBodies, All}` live in `rustc_middle` so that they may have `type Map = map::Map` and so that `impl Visitor`s never need to specify `type Map` - it has a default of `Self::NestedFilter::Map`.
2022-01-17Merge commit '8d14c94b5c0a66241b4244f1c60ac5859cec1d97' into clippyupflip1995-100/+754
2022-01-17Auto merge of #92816 - tmiasko:rm-llvm-asm, r=Amanieubors-33/+4
Remove deprecated LLVM-style inline assembly The `llvm_asm!` was deprecated back in #87590 1.56.0, with intention to remove it once `asm!` was stabilized, which already happened in #91728 1.59.0. Now it is time to remove `llvm_asm!` to avoid continued maintenance cost. Closes #70173. Closes #92794. Closes #87612. Closes #82065. cc `@rust-lang/wg-inline-asm` r? `@Amanieu`
2022-01-16Fix Visitor::NestedFilter in ClippyCameron Steffen-419/+126
2022-01-16Format clippyCameron Steffen-16/+4
2022-01-16Use new Racer from crates.ioIgor Matuszewski-0/+0
2022-01-16Drop duplicate checks for now missing rustc_ast dep in tidyIgor Matuszewski-1/+0
2022-01-16Update RLS and drop rustc-ap-packagesIgor Matuszewski-0/+0
2022-01-16Auto merge of #92805 - BoxyUwU:revert-lazy-anon-const-substs, r=lcnrbors-39/+41
partially revertish `lazily "compute" anon const default substs` reverts #87280 except for some of the changes around `ty::Unevaluated` having a visitor and a generic for promoted why revert: <https://github.com/rust-lang/rust/pull/92805#issuecomment-1010736049> r? `@lcnr`