about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-05-10Auto merge of #96803 - jyn514:faster-assemble, r=Mark-Simulacrumbors-9/+3
Make "Assemble stage1 compiler" orders of magnitude faster This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object: ``` [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so" [22:28:09] c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } } ``` It turned out that `install()` used full copies unconditionally. Change it to try using a hard-link before falling back to copying.
2022-05-10Auto merge of #96715 - cjgillot:trait-alias-loop, r=compiler-errorsbors-11/+45
Fortify handing of where bounds on trait & trait alias definitions Closes https://github.com/rust-lang/rust/issues/96664 Closes https://github.com/rust-lang/rust/issues/96665 Since https://github.com/rust-lang/rust/pull/93803, when listing all bounds and predicates we now need to account for the possible presence of predicates on any of the generic parameters. Both bugs were hidden by the special handling of bounds at the generic parameter declaration position. Trait alias expansion used to confuse predicates on `Self` and where predicates. Exiting too late when listing all the bounds caused a cycle error.
2022-05-09Auto merge of #96877 - matthiaskrgr:rollup-evlh6ot, r=matthiaskrgrbors-4/+170
Rollup of 6 pull requests Successful merges: - #95483 (Improve floating point documentation) - #96008 (Warn on unused `#[doc(hidden)]` attributes on trait impl items) - #96841 (Revert "Implement [OsStr]::join", which was merged without FCP.) - #96844 (Actually fix ICE from #96583) - #96854 (Some subst cleanup) - #96858 (Remove unused param from search.js::checkPath) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-09Point to the empty trait alias.Camille GILLOT-0/+9
2022-05-09Rollup merge of #96858 - notriddle:notriddle/cleanup-search-js, r=GuillaumeGomezMatthias Krüger-2/+2
Remove unused param from search.js::checkPath
2022-05-09Rollup merge of #96844 - Badel2:actually-fix-96583, r=compiler-errorsMatthias Krüger-2/+17
Actually fix ICE from #96583 PR #96746 fixed a very similar bug, so the same logic is used in a different place. I originally concluded that the two issues (#96583 and #96738) were identical by comparing the backtrace, but I didn't look close enough.
2022-05-09Rollup merge of #96008 - ↵Matthias Krüger-0/+151
fmease:warn-on-useless-doc-hidden-on-assoc-impl-items, r=lcnr Warn on unused `#[doc(hidden)]` attributes on trait impl items [Zulip conversation](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.E2.9C.94.20Validy.20checks.20for.20.60.23.5Bdoc.28hidden.29.5D.60). Whether an associated item in a trait impl is shown or hidden in the documentation entirely depends on the corresponding item in the trait declaration. Rustdoc completely ignores `#[doc(hidden)]` attributes on impl items. No error or warning is emitted: ```rust pub trait Tr { fn f(); } pub struct Ty; impl Tr for Ty { #[doc(hidden)] fn f() {} } // ^^^^^^^^^^^^^^ ignored by rustdoc and currently // no error or warning issued ``` This may lead users to the wrong belief that the attribute has an effect. In fact, several such cases are found in the standard library (I've removed all of them in this PR). There does not seem to exist any incentive to allow this in the future either: Impl'ing a trait for a type means the type *fully* conforms to its API. Users can add `#[doc(hidden)]` to the whole impl if they want to hide the implementation or add the attribute to the corresponding associated item in the trait declaration to hide the specific item. Hiding an implementation of an associated item does not make much sense: The associated item can still be found on the trait page. This PR emits the warn-by-default lint `unused_attribute` for this case with a future-incompat warning. `@rustbot` label T-compiler T-rustdoc A-lint
2022-05-09Auto merge of #96845 - Patryk27:upgrade-llvm, r=nikicbors-0/+0
Upgrade llvm-project (rustc + avr = lovelove back again!) See: https://github.com/rust-lang/llvm-project/pull/139 tl;dr: - closes https://github.com/rust-lang/rust/issues/83633, - closes https://github.com/rust-lang/rust/issues/82104, - closes https://github.com/rust-lang/rust/issues/79889, - closes https://github.com/rust-lang/compiler-builtins/issues/400. 🙂
2022-05-09chore: Upgrade llvm-projectPatryk Wychowaniec-0/+0
See: https://github.com/rust-lang/llvm-project/pull/139
2022-05-08Remove unused param from search.js::checkPathMichael Howell-2/+2
2022-05-09Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errorsbors-51/+90
Remove `#[rustc_deprecated]` This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`. I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
2022-05-08Make "Assemble stage1 compiler" orders of magnitude fasterJoshua Nelson-9/+3
This used to take upwards of 5 seconds for me locally. I found that the culprit was copying the downloaded LLVM shared object: ``` [22:28:03] Install "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/ci-llvm/lib/libLLVM-14-rust-1.62.0-nightly.so" to "/home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-14-rust-1.62.0-nightly.so" [22:28:09] c Sysroot { compiler: Compiler { stage: 1, host: x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) } } ``` It turned out that `install()` used full copies unconditionally. Change it to try using a hard-link before falling back to copying.
2022-05-09Auto merge of #95542 - xFrednet:rfc-2383-expect-query, r=wesleywiserbors-0/+578
Support tool lints with the `#[expect]` attribute (RFC 2383) This PR fixes the ICE https://github.com/rust-lang/rust/issues/94953 by making the assert for converted expectation IDs conditional. Additionally, it moves the lint expectation check into a separate query to support rustdoc and other tools. On the way, I've also added some tests to ensure that the attribute works for Clippy and rustdoc lints. The number of changes comes from the long test file. This may look like a monster PR, this may smell like a monster PR and this may be a monster PR, but it's a harmless monster. :sauropod: --- Closes: https://github.com/rust-lang/rust/issues/94953 cc: https://github.com/rust-lang/rust/issues/85549 r? `@wesleywiser` cc: `@rust-lang/rustdoc`
2022-05-08Auto merge of #96846 - matthiaskrgr:rollup-yxu9ot9, r=matthiaskrgrbors-3/+108
Rollup of 5 pull requests Successful merges: - #96617 (Fix incorrect syntax suggestion with `pub async fn`) - #96828 (Further elaborate the lack of guarantees from `Hasher`) - #96829 (Fix the `x.py clippy` command) - #96830 (Add and tweak const-generics tests) - #96835 (Add more eslint rules) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-08Warn on unused doc(hidden) on trait impl itemsLeón Orell Valerian Liehr-0/+151
2022-05-08Rollup merge of #96835 - GuillaumeGomez:eslint-rules, r=notriddleMatthias Krüger-0/+5
Add more eslint rules Slowly continuing to enforce more rules with eslint. Part of https://github.com/rust-lang/rust/issues/93058. r? `@notriddle`
2022-05-08Rollup merge of #96830 - JohnTitor:issue-96654, r=compiler-errorsMatthias Krüger-1/+16
Add and tweak const-generics tests Closes #96654 Also correct the src/test/ui/const-generics/issues/issue-77357.rs test's issue number.
2022-05-08Rollup merge of #96829 - JohnTitor:fix-xpy-clippy, r=jyn514Matthias Krüger-2/+2
Fix the `x.py clippy` command Fixes #96826, confirmed clippy runs correctly on local r? `@Mark-Simulacrum`
2022-05-08Rollup merge of #96617 - ↵Matthias Krüger-0/+85
ken-matsui:fix-incorrect-syntax-suggestion-with-pub-async-fn, r=cjgillot Fix incorrect syntax suggestion with `pub async fn` This PR closes: https://github.com/rust-lang/rust/issues/96555
2022-05-08Auto merge of #96302 - Serial-ATA:more-diagnostic-items, r=manishearthbors-40/+0
Add more diagnostic items This just adds a handful diagnostic items I noticed were missing. Would it be worth doing this for all of the remaining types? I'm willing to do it if it'd be helpful.
2022-05-08Actually fix ICE from #96583Badel2-2/+17
PR #96746 fixed a very similar bug, so the same logic is used in a different place.
2022-05-08Auto merge of #96770 - flip1995:fix-trait-type-in-bounds, r=cjgillotbors-27/+16
Track if a where bound comes from a impl Trait desugar With https://github.com/rust-lang/rust/pull/93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a `impl Trait` or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during AST->HIR lowering. r? `@cjgillot` cc `@estebank` (as the reviewer of #93803)
2022-05-08Support `#[expect]` attributes for rustdoc lints (RFC 2383)xFrednet-0/+189
2022-05-08Test `expect` attribute for tool lints, clippy edition (RFC 2383)xFrednet-0/+182
2022-05-08Test `expect` attribute for tool lints, rustc edition (RFC 2383)xFrednet-0/+171
2022-05-08Only assert for unstable expectation ids after conversion (RFC 2383)xFrednet-0/+36
This ICE was reported by `@matthiaskrgr`. A big THANK YOU to him. See `rust#94953`
2022-05-08Enforce no trailing spaces with eslintGuillaume Gomez-0/+1
2022-05-08Enforce linebreak style in js source codeGuillaume Gomez-0/+4
2022-05-08Auto merge of #96689 - gimbles:campfire, r=Mark-Simulacrumbors-4/+4
Move check-bootstrap from a makefile rule to test::Bootstrap Fixes #96688
2022-05-08Auto merge of #96659 - thatzopoulos:issue-90679-fix, r=Mark-Simulacrumbors-1/+12
Improve error for missing cmake This PR updates the error message for a missing `cmake` to be more in line with the error message for a missing installation of `ninja`. The original issue, (#90679), suggests that both `ninja` and `cmake` are only needed for building LLVM, so I have included the suggestion from `ninja` to set `download-ci-llvm = true` if the user would rather download LLVM. If `cmake` actually is used in other areas, I can remove that part of the message. Fixes: #90679
2022-05-08Auto merge of #96457 - yungkneez:fix-bootstrap, r=Mark-Simulacrumbors-2/+11
Initialize rust-analyzer submodule on bootstrap Fixes #96456
2022-05-08Auto merge of #96155 - jackh726:param-heuristics-followup, r=estebankbors-225/+192
Followups for method call error change Each commit is self-contained. Fixes most of the followup reviews from that PR. r? `@estebank`
2022-05-08Correct the issue number of a testYuki Okushi-1/+1
2022-05-08Add regression test for #96654Yuki Okushi-0/+15
2022-05-08Fix the `x.py clippy` commandYuki Okushi-2/+2
2022-05-08Auto merge of #94206 - PrestonFrom:significant_drop, r=flip1995bors-0/+1201
Create clippy lint against unexpectedly late drop for temporaries in match scrutinee expressions A new clippy lint for issue 93883 (https://github.com/rust-lang/rust/issues/93883). Relies on a new trait in `marker` (called `SignificantDrop` to enable linting), which is why this PR is for the rust-lang repo and not the clippy repo. changelog: new lint [`significant_drop_in_scrutinee`]
2022-05-08Fix incorrect syntax suggestion with `pub async fn`Ken Matsui-0/+85
2022-05-07Auto merge of #96824 - matthiaskrgr:rollup-silw3ki, r=matthiaskrgrbors-55/+217
Rollup of 10 pull requests Successful merges: - #96336 (Link to correct `as_mut` in docs for `pointer::as_ref`) - #96586 (Add aliases for std::fs::canonicalize) - #96667 (Add regression test) - #96671 (Remove hard links from `env::current_exe` security example) - #96726 (Add regression and bug tests) - #96756 (Enable compiler-docs by default for `compiler`, `codegen`, and `tools` profiles) - #96757 (Don't constantly rebuild clippy on `x test src/tools/clippy`.) - #96769 (Remove `adx_target_feature` feature from active features list) - #96777 (Make the test `check-pass` not to produce a JSON file) - #96822 (Enforce quote rule for JS source code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-07updated error message for missing cmakeThomas Hatzopoulos-1/+12
2022-05-07Rollup merge of #96822 - GuillaumeGomez:js-quote-rule, r=notriddleMatthias Krüger-52/+56
Enforce quote rule for JS source code We mostly used double quotes but still had a weird mix. This eslint rule will now enforce it. r? `@notriddle`
2022-05-07Rollup merge of #96777 - JohnTitor:do-not-run-pass-save-analysis, ↵Matthias Krüger-1/+1
r=Mark-Simulacrum Make the test `check-pass` not to produce a JSON file `run-pass` produces a JSON file when enabling save analysis. The original ICE happened on `cargo check`, moreover **without** the `generic_const_exprs` feature, so `check-pass` should be enough.
2022-05-07Rollup merge of #96757 - jyn514:fewer-clippy-rebuilds, r=Mark-SimulacrumMatthias Krüger-2/+4
Don't constantly rebuild clippy on `x test src/tools/clippy`. This happened because the `SYSROOT` variable was set for `x test`, but not `x build`. Set it consistently for both to avoid unnecessary rebuilds. This is a very small step towards https://github.com/rust-lang/rust/issues/76495.
2022-05-07Rollup merge of #96756 - jyn514:compiler-docs-default, r=Mark-SimulacrumMatthias Krüger-0/+10
Enable compiler-docs by default for `compiler`, `codegen`, and `tools` profiles I had this overridden locally for a while and realized just now it should probably just be a default.
2022-05-07Rollup merge of #96726 - oli-obk:no_cross_inference, r=Mark-SimulacrumMatthias Krüger-0/+103
Add regression and bug tests this tracks the behaviour from https://github.com/rust-lang/rust/issues/96572 in our test suite
2022-05-07Rollup merge of #96667 - oli-obk:collect_hidden_types, r=Mark-SimulacrumMatthias Krüger-0/+43
Add regression test fixes #69785 This issue seems to have been fixed in the meantime.
2022-05-07Auto merge of #96670 - Urgau:bootstrap-check-cfg-features, r=Mark-Simulacrumbors-5/+14
Enable cfg checking of cargo features for everything but std This PR enable `cfg` checking of cargo features for everything but std, it also adds a `FIXME` to myself. > Note: `std`, `alloc` and `core` imports some dependencies by #[path] (like > backtrace, core_simd, std_float, ...), those dependencies have their own features > but cargo isn't involved in the #[path] and so cannot pass the complete list of > features, so for that reason we don't enable checking of features for std. r? `@Mark-Simulacrum`
2022-05-07Enforce quote rule for JS source codeGuillaume Gomez-52/+56
2022-05-07Track if a where bound comes from a impl Trait desugarflip1995-5/+10
With #93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a impl Trait or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during HIR lowering.
2022-05-07Rollup merge of #96807 - RalfJung:miri, r=RalfJungGuillaume Gomez-9/+7
update Miri Fixes https://github.com/rust-lang/rust/issues/96773 r? ``@ghost``
2022-05-07Rollup merge of #96805 - Folyd:eslint, r=GuillaumeGomezGuillaume Gomez-31/+5
Change eslint rules from configuration comments to configuration file Repeatedly declaring eslint rules in source files is an annoying thing, we should move those rules into the eslint configuration file. r? ``@GuillaumeGomez``