summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2022-09-19[beta] Update cargoWeihang Lo-0/+0
3 commits in 4bcb3c65e440a12044092b85ffea8fac6cb96f42..387270bc7f446d17869c7f208207c73231d6a252 2022-08-17 21:01:34 +0000 to 2022-09-16 20:18:27 +0000 - Beta backport rust-lang/cargo#11082 (rust-lang/cargo#11097) - [Beta] Run `reach_max_unpack_size` test only on debug build (rust-lang/cargo#11090) - [beta] Fix for CVE-2022-36113 and CVE-2022-36114 (rust-lang/cargo#11088)
2022-09-14Fix hang in `vec_init_then_push`Jason Newcomb-2/+15
2022-08-30[beta] Update cargoEric Huss-0/+0
2022-08-15Revert let_chains stabilizationNilstrieb-19/+21
This reverts commit 326646074940222d602f3683d0559088690830f4. It was discovered that they are not implemented correctly, which does not make them ready for stabilization.
2022-08-11Update cargo to include rust-lang/cargo#10970Mark Rousskov-0/+0
2022-08-08Put explicit_auto_deref into nurseryPhilipp Krones-3/+2
2022-08-08Move `significant_drop_in_scrutinee` into `nursey`Jason Newcomb-3/+2
2022-08-05Auto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebankbors-51/+60
Warn about dead tuple struct fields Continuation of #92972. Fixes #92790. The language team has already commented on this in https://github.com/rust-lang/rust/pull/92972#issuecomment-1021511970; I have incorporated their requests here. Specifically, there is now a new allow-by-default `unused_tuple_struct_fields` lint (name bikesheddable), and fields of unit type are ignored (https://github.com/rust-lang/rust/pull/92972#issuecomment-1021815408), so error messages look like this: ``` error: field is never read: `1` --> $DIR/tuple-struct-field.rs:6:21 | LL | struct Wrapper(i32, [u8; LEN], String); | ^^^^^^^^^ | help: change the field to unit type to suppress this warning while preserving the field numbering | LL | struct Wrapper(i32, (), String); | ~~ ``` r? `@joshtriplett`
2022-08-03Auto merge of #100065 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo, rls 14 commits in 85b500ccad8cd0b63995fd94a03ddd4b83f7905b..4fd148c47e733770c537efac5220744945d572ef 2022-07-24 21:10:46 +0000 to 2022-08-03 15:03:52 +0000 - Revert "Drop check for mingw32-make." (rust-lang/cargo#10934) - Add reasons to all ignored tests. (rust-lang/cargo#10929) - Grammar fixup unused patch message (rust-lang/cargo#10933) - Always allow hg to be missing on CI. (rust-lang/cargo#10931) - Fix formats_source test requiring rustfmt. (rust-lang/cargo#10918) - Disable scrape_examples_complex_reverse_dependencies (rust-lang/cargo#10921) - Contrib: Add docs on the rustbot ready command (rust-lang/cargo#10916) - Support for negative --jobs parameter, counting backwards from max CPUs (rust-lang/cargo#10844) - Add requirements to cargo_test. (rust-lang/cargo#9892) - Contrib: Document submodule update process (rust-lang/cargo#10913) - Contrib: Add docs on how to use crater (rust-lang/cargo#10912) - Contrib: Document new-release process (rust-lang/cargo#10914) - Override to resolver=1 in published package (rust-lang/cargo#10911) - fix(add): Update the lock file (rust-lang/cargo#10902) 1 commits in fcf1f94c9ab2acc18cfd4368a4aeb38e77da9649..4d8b0a19986a4daab37287a5b5fe2da0775d1873 2022-07-14 17:19:11 +0200 to 2022-08-02 22:34:34 -0400 - Update cargo (rust-lang/rls#1782)
2022-08-03Update cargoEric Huss-0/+0
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-51/+60
2022-08-02Update rlsEric Huss-0/+0
2022-08-02Update cargoEric Huss-0/+0
2022-08-02Rollup merge of #100070 - mqudsi:99768_revisited, r=RalfJungMatthias Krüger-4/+3
Clarify Cargo.toml comments Existing comments were left in an incoherent state after #99768. r? `@RalfJung`
2022-08-02Rollup merge of #100049 - lnicola:rust-analyzer-2022-08-02, r=lnicolaMatthias Krüger-241/+765
:arrow_up: rust-analyzer r? `@ghost`
2022-08-02Rollup merge of #99933 - alex:parallel-html-checking, r=Mark-SimulacrumMatthias Krüger-21/+26
parallelize HTML checking tool there's a lot of IO, so timings on my laptop are far from stable, but it seems to be considerably faster. this step often appears to take 5+ minutes in CI, so hopefully this offers a speedup
2022-08-02Clarify Cargo.toml commentsMahmoud Al-Qudsi-4/+3
Existing comments were left in an incoherent state after #99768.
2022-08-02Rollup merge of #100053 - flip1995:clippy_backport, r=xFrednetMatthias Krüger-3/+5
move [`assertions_on_result_states`] to restriction "Backports" the first commit of https://github.com/rust-lang/rust-clippy/pull/9273, so that the lint doesn't go into beta as a warn-by-default lint. The other changes in the linked PR can ride the train as usual. r? ``@xFrednet`` (only Clippy changes, so we don't need to bother compiler people) --- For Clippy: changelog: none
2022-08-02Rollup merge of #99987 - Alexendoo:parse-format-position-span, r=fee1-deadMatthias Krüger-2/+2
Always include a position span in `rustc_parse_format::Argument` Moves the spans from the `Position` enum to always be included in the `Argument` struct. Doesn't make any changes to use it in rustc, but it will be useful for some upcoming Clippy lints
2022-08-02move [`assertions_on_result_states`] to restrictiontabokie-3/+5
Signed-off-by: tabokie <xy.tao@outlook.com>
2022-08-02:arrow_up: rust-analyzerLaurențiu Nicola-241/+765
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-14/+17
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-1/+1
2022-08-01Auto merge of #100024 - matthiaskrgr:rollup-36ab4wx, r=matthiaskrgrbors-3/+3
Rollup of 8 pull requests Successful merges: - #99340 (Fix ICE in Definitions::create_def) - #99629 (Improve `cannot move out of` error message) - #99864 (bootstrap: don't emit warn about duplicated deps with same/different features if some of sets actually empty) - #99911 (Remove some uses of `guess_head_span`) - #99976 (Make Rustdoc exit with correct error code when scraping examples from invalid files) - #100003 (Improve size assertions.) - #100012 (Avoid `Ty` to `String` conversions) - #100020 (better error when python is not found in x - issue #99648) Failed merges: - #99994 (Replace `guess_head_span` with `opt_span`) r? `@ghost` `@rustbot` modify labels: rollup
2022-08-01Auto merge of #99884 - nnethercote:lexer-improvements, r=matkladbors-4/+4
Lexer improvements Some cleanups and small speed improvements. r? `@matklad`
2022-08-01fix: better error when python not found in xCallum Leslie-3/+3
chore: clean comments to be relevant
2022-08-01Shrink `Token`.Nicholas Nethercote-4/+4
From 72 bytes to 12 bytes (on x86-64). There are two parts to this: - Changing various source code offsets from 64-bit to 32-bit. This is not a problem because the rest of rustc also uses 32-bit source code offsets. This means `Token` is no longer `Copy` but this causes no problems. - Removing the `RawStrError` from `LiteralKind`. Raw string literal invalidity is now indicated by a `None` value within `RawStr`/`RawByteStr`, and the new `validate_raw_str` function can be used to re-lex an invalid raw string literal to get the `RawStrError`. There is one very small change in behaviour. Previously, if a raw string literal matched both the `InvalidStarter` and `TooManyHashes` cases, the latter would override the former. This has now changed, because `raw_double_quoted_string` now uses `?` and so returns immediately upon detecting the `InvalidStarter` case. I think this is a slight improvement to report the earlier-detected error, and it explains the change in the `test_too_many_hashes` test. The commit also removes a couple of comments that refer to #77629 and say that the size of these types don't affect performance. These comments are wrong, though the performance effect is small.
2022-07-31Always include a position span in rustc_parse_format::ArgumentAlex Macleod-2/+2
2022-07-31Rollup merge of #99186 - camsteffen:closure-localdefid, r=cjgillotDylan DPC-1/+1
Use LocalDefId for closures more
2022-07-30Use LocalDefId for closures moreCameron Steffen-1/+1
2022-07-30Auto merge of #99948 - Dylan-DPC:rollup-ed5136t, r=Dylan-DPCbors-3/+4
Rollup of 5 pull requests Successful merges: - #99311 (change maybe_body_owned_by to take local def id) - #99862 (Improve type mismatch w/ function signatures) - #99895 (don't call type ascription "cast") - #99900 (remove some manual hash stable impls) - #99903 (Add diagnostic when using public instead of pub) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-30Rollup merge of #99311 - kckeiks:clean-up-body-owner-methods, r=cjgillotDylan DPC-3/+4
change maybe_body_owned_by to take local def id Issue https://github.com/rust-lang/rust/issues/96341 r? `@cjgillot`
2022-07-30Auto merge of #99887 - nnethercote:rm-TreeAndSpacing, r=petrochenkovbors-39/+63
Remove `TreeAndSpacing`. A `TokenStream` contains a `Lrc<Vec<(TokenTree, Spacing)>>`. But this is not quite right. `Spacing` makes sense for `TokenTree::Token`, but does not make sense for `TokenTree::Delimited`, because a `TokenTree::Delimited` cannot be joined with another `TokenTree`. This commit fixes this problem, by adding `Spacing` to `TokenTree::Token`, changing `TokenStream` to contain a `Lrc<Vec<TokenTree>>`, and removing the `TreeAndSpacing` typedef. The commit removes these two impls: - `impl From<TokenTree> for TokenStream` - `impl From<TokenTree> for TreeAndSpacing` These were useful, but also resulted in code with many `.into()` calls that was hard to read, particularly for anyone not highly familiar with the relevant types. This commit makes some other changes to compensate: - `TokenTree::token()` becomes `TokenTree::token_{alone,joint}()`. - `TokenStream::token_{alone,joint}()` are added. - `TokenStream::delimited` is added. This results in things like this: ```rust TokenTree::token(token::Semi, stmt.span).into() ``` changing to this: ```rust TokenStream::token_alone(token::Semi, stmt.span) ``` This makes the type of the result, and its spacing, clearer. These changes also simplifies `Cursor` and `CursorRef`, because they no longer need to distinguish between `next` and `next_with_spacing`. r? `@petrochenkov`
2022-07-30Auto merge of #99768 - klensy:bump-deps-07-22, r=Mark-Simulacrumbors-2/+6
update few deps Updates few crates: * openssl-src v111.18.0+1.1.1n -> v111.22.0+1.1.1q: fixes few CVE's (https://www.openssl.org/news/vulnerabilities-1.1.1.html: https://cve.org/CVERecord?id=CVE-2022-1292 https://cve.org/CVERecord?id=CVE-2022-2068 https://cve.org/CVERecord?id=CVE-2022-2097) * openssl-probe v0.1.2 -> v0.1.5 updates ancient (2017) crate (https://github.com/alexcrichton/openssl-probe/compare/0.1.2...0.1.5). Adds support to search cert for additional platforms. * indoc v1.0.3 -> v1.0.6 (https://github.com/dtolnay/indoc/compare/1.0.3...1.0.6) Nothing special changed, removes unindent v0.1.7 * bstr v0.2.13 -> v0.2.17 (https://github.com/BurntSushi/bstr/compare/0.2.13...0.2.17) Few speedups (https://github.com/BurntSushi/bstr/commit/8e659921312830b91d2a48aafa36fb1a49cba5bc, https://github.com/BurntSushi/bstr/commit/5fcef919adf1b84a960c87126decb0f3ef8c2e61) and bugfix (https://github.com/BurntSushi/bstr/commit/b2111b6bbf2c9a819fb1338aa81bd099874106a1) * crc32fast v1.2.0 -> v1.3.2 (https://github.com/srijs/rust-crc32fast/compare/v1.2.0...v1.3.2) Speedup debug (https://github.com/srijs/rust-crc32fast/commit/e61ce6a39bbe9da495198a4037292ec299e8970f) * diff v0.1.12 -> v0.1.13 (https://github.com/utkarshkukreti/diff.rs/compare/0.1.12...0.1.13) Few optimizations (https://github.com/utkarshkukreti/diff.rs/pull/16, https://github.com/utkarshkukreti/diff.rs/commit/0f0aa580f197af7dab9ab905568f70a2387e23bc) * ignore v0.4.17 -> v0.4.18 (it's hard to get usable diff, but most notable perf change is https://github.com/BurntSushi/ripgrep/commit/a28e664abd0d8912e4a2d85039fe282b9d37b994) * globset v0.4.5 -> v0.4.9 * regex v1.5.5 -> v1.5.6 few bugfixes (https://github.com/rust-lang/regex/blob/1.5.6/CHANGELOG.md#156-2022-05-20). There exist 1.6.0 version, but it's too fresh.
2022-07-29parallelize HTML checking toolAlex Gaynor-21/+26
2022-07-29Avoid ICE when fetching LocalDefIdMiguel Guarniz-1/+2
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Change enclosing_body_owner to return LocalDefIdMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Rename local_did to def_idMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Change maybe_body_owned_by to take local def idMiguel Guarniz-1/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Remove `TreeAndSpacing`.Nicholas Nethercote-39/+63
A `TokenStream` contains a `Lrc<Vec<(TokenTree, Spacing)>>`. But this is not quite right. `Spacing` makes sense for `TokenTree::Token`, but does not make sense for `TokenTree::Delimited`, because a `TokenTree::Delimited` cannot be joined with another `TokenTree`. This commit fixes this problem, by adding `Spacing` to `TokenTree::Token`, changing `TokenStream` to contain a `Lrc<Vec<TokenTree>>`, and removing the `TreeAndSpacing` typedef. The commit removes these two impls: - `impl From<TokenTree> for TokenStream` - `impl From<TokenTree> for TreeAndSpacing` These were useful, but also resulted in code with many `.into()` calls that was hard to read, particularly for anyone not highly familiar with the relevant types. This commit makes some other changes to compensate: - `TokenTree::token()` becomes `TokenTree::token_{alone,joint}()`. - `TokenStream::token_{alone,joint}()` are added. - `TokenStream::delimited` is added. This results in things like this: ```rust TokenTree::token(token::Semi, stmt.span).into() ``` changing to this: ```rust TokenStream::token_alone(token::Semi, stmt.span) ``` This makes the type of the result, and its spacing, clearer. These changes also simplifies `Cursor` and `CursorRef`, because they no longer need to distinguish between `next` and `next_with_spacing`.
2022-07-29Auto merge of #99660 - PrestonFrom:issue_99265, r=compiler-errorsbors-1/+1
Generate correct suggestion with named arguments used positionally Address issue #99265 by checking each positionally used argument to see if the argument is named and adding a lint to use the name instead. This way, when named arguments are used positionally in a different order than their argument order, the suggested lint is correct. For example: ``` println!("{b} {}", a=1, b=2); ``` This will now generate the suggestion: ``` println!("{b} {a}", a=1, b=2); ``` Additionally, this check now also correctly replaces or inserts only where the positional argument is (or would be if implicit). Also, width and precision are replaced with their argument names when they exists. Since the issues were so closely related, this fix for issue #99265 also fixes issue #99266. Fixes #99265 Fixes #99266
2022-07-28Auto merge of #99865 - flip1995:clippyup, r=Manishearthbors-297/+1526
Update Clippy r? `@Manishearth`
2022-07-28Merge commit '3c7e7dbc1583a0b06df5bd7623dd354a4debd23d' into clippyupPhilipp Krones-297/+1526
2022-07-28Auto merge of #99780 - Nilstrieb:mir-opt-test-line-no, r=oli-obkbors-0/+1
Use line numbers relative to the function in mir-opt tests As shown in #99770, the line numbers can be a big source of needless and confusing diffs. This PR adds a new flag `-Zmir-pretty-relative-line-numbers` to make them relative to the function declaration, which avoids most needless diffs from attribute changes. `@JakobDegen` told me that there has been a zulip conversation about disabling line numbers with mixed opinions, so I'd like to get some feedback here, for this hopefully better solution. r? rust-lang/wg-mir-opt
2022-07-28fix memchr features in workspace-hackklensy-0/+4
2022-07-28Auto merge of #99756 - fasterthanlime:ra-sync-and-pms-component, ↵bors-210/+624
r=Mark-Simulacrum Sync `rust-analyzer`, add `rust-analyzer-proc-macro-srv` binary to Rustc component As discussed earlier with `@jyn514` and `@pietroalbini,` I'm also going to use this PR to have `dist::Rustc` build the `rust-analyzer-proc-macro-srv` binary introduced in: * https://github.com/rust-lang/rust-analyzer/pull/12871
2022-07-28update few depsklensy-2/+2
openssl-src v111.18.0+1.1.1n -> v111.22.0+1.1.1q openssl-probe v0.1.2 -> v0.1.5 indoc v1.0.3 -> v1.0.6 bstr v0.2.13 -> v0.2.17 crc32fast v1.2.0 -> v1.3.2 diff v0.1.12 -> v0.1.13 ignore v0.4.17 -> v0.4.18 globset v0.4.5 -> v0.4.9 regex v1.5.5 -> v1.5.6
2022-07-28Use line numbers relative to function in mir opt testsNilstrieb-0/+1
This adds a new option, `-Zmir-pretty-relative-line-numbers`, that is then used in compiletest for the mir-opt tests.
2022-07-27Rollup merge of #99728 - cjgillot:ast-lifetimes-anon-clean, r=petrochenkovGuillaume Gomez-3/+3
Clean up HIR-based lifetime resolution Based on https://github.com/rust-lang/rust/pull/97313. Fixes #98932. r? `@petrochenkov`
2022-07-27Rollup merge of #99710 - davidtwco:internal-lint-opts, r=lcnrGuillaume Gomez-0/+2
lint: add bad opt access internal lint Prompted by [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/sess.2Ecrate_types.28.29.20vs.20sess.2Eopts.2Ecrate_types/near/290682847). Some command-line options accessible through `sess.opts` are best accessed through wrapper functions on `Session`, `TyCtxt` or otherwise, rather than through field access on the option struct in the `Session`. Adds a new lint which triggers on those options that should be accessed through a wrapper function so that this is prohibited. Options are annotated with a new attribute `rustc_lint_opt_deny_field_access` which can specify the error message (i.e. "use this other function instead") to be emitted. A simpler alternative would be to simply rename the options in the option type so that it is clear they should not be used, however this doesn't prevent uses, just discourages them. Another alternative would be to make the option fields private, and adding accessor functions on the option types, however the wrapper functions sometimes rely on additional state from `Session` or `TyCtxt` which wouldn't be available in an function on the option type, so the accessor would simply make the field available and its use would be discouraged too. **Leave a comment if there's an option I should add this to.**