summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-07-06Ignore in-proc-macros itemsblyxyas-1/+2
2023-07-06Move redundant_clone to nurseryAlex Macleod-33/+35
2023-07-06Auto merge of #10865 - Centri3:let_with_type_underscore_tracing, r=Jarchobors-10/+65
[`let_with_type_underscore`]: Don't emit on locals from procedural macros closes #10498 changelog: [`let_with_type_underscore`]: Don't emit on locals from procedural macros
2023-07-06[`default_constructed_unit_structs`]: do not lint type aliasesy21-7/+62
2023-06-08[beta-1.71] cargo backportWeihang Lo-0/+0
2023-05-27Add support for nested panics to miriAmanieu d'Antras-32/+53
2023-05-27Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, ↵bors-1136/+1381
r=albertlarsan68,oli-obk new tool `rustdoc-gui-test` Implements new tool `rustdoc-gui-test` that allows using compiletest headers for `rustdoc-gui` tests.
2023-05-26Auto merge of #111858 - clubby789:fluent-alphabetical, r=jyn514,compiler-errorsbors-0/+74
Ensure Fluent messages are in alphabetical order Fixes #111847 This adds a tidy check to ensure Fluent messages are in alphabetical order, as well as sorting all existing messages. I think the error could be worded better, would appreciate suggestions. <details> <summary>Script used to sort files</summary> ```py import sys import re fn = sys.argv[1] with open(fn, 'r') as f: data = f.read().split("\n") chunks = [] cur = "" for line in data: if re.match(r"^([a-zA-Z0-9_]+)\s*=\s*", line): chunks.append(cur) cur = "" cur += line + "\n" chunks.append(cur) chunks.sort() with open(fn, 'w') as f: f.write(''.join(chunks).strip("\n\n") + "\n") ``` </details>
2023-05-25Ensure Fluent messages are in alphabetical orderclubby789-0/+74
2023-05-25Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obkMichael Goulet-5/+8
Remove ExpnKind::Inlined. Suggested in https://github.com/rust-lang/rust/pull/111815#issuecomment-1561903339 r? ``@oli-obk``
2023-05-25Auto merge of #86844 - bjorn3:global_alloc_improvements, r=pnkfelixbors-38/+51
Support #[global_allocator] without the allocator shim This makes it possible to use liballoc/libstd in combination with `--emit obj` if you use `#[global_allocator]`. This is what rust-for-linux uses right now and systemd may use in the future. Currently they have to depend on the exact implementation of the allocator shim to create one themself as `--emit obj` doesn't create an allocator shim. Note that currently the allocator shim also defines the oom error handler, which is normally required too. Once `#![feature(default_alloc_error_handler)]` becomes the only option, this can be avoided. In addition when using only fallible allocator methods and either `--cfg no_global_oom_handling` for liballoc (like rust-for-linux) or `--gc-sections` no references to the oom error handler will exist. To avoid this feature being insta-stable, you will have to define `__rust_no_alloc_shim_is_unstable` to avoid linker errors. (Labeling this with both T-compiler and T-lang as it originally involved both an implementation detail and had an insta-stable user facing change. As noted above, the `__rust_no_alloc_shim_is_unstable` symbol requirement should prevent unintended dependence on this unstable feature.)
2023-05-25Manually add inlined frames in the interpreter stacktrace.Camille GILLOT-5/+8
2023-05-24Auto merge of #110936 - loongarch-rs:promote-tier2, r=Mark-Simulacrumbors-0/+2
Promote loongarch64-unknown-linux-gnu to Tier 2 with host tools This PR promotes `loongarch64-unknown-linux-gnu` to Tier 2 (with host tools). MCP: https://github.com/rust-lang/compiler-team/issues/518
2023-05-23Auto merge of #111890 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 10 commits in 09276c703a473ab33daaeb94917232e80eefd628..64fb38c97ac4d3a327fc9032c862dd28c8833b17 2023-05-16 21:43:35 +0000 to 2023-05-23 18:53:23 +0000 - Consider rust-version when selecting packages for cargo add (rust-lang/cargo#12078) - fix(lints): Switch to -Zlints so stable projects can experiment (rust-lang/cargo#12168) - Automatically inherit workspace fields when running cargo new/init (rust-lang/cargo#12069) - ci: check if any version bump needed for member crates (rust-lang/cargo#12126) - feat: `lints` feature (rust-lang/cargo#12148) - fix: pass `-C debuginfo` after weakening if explicitly set (rust-lang/cargo#12165) - Tweak build help to clarify role of --bin (rust-lang/cargo#12157) - fix: Pass CI on nightly (rust-lang/cargo#12160) - docs(source): doc comments for Source and its impls (rust-lang/cargo#12159) - docs(source): doc comments for `Source` and friends (rust-lang/cargo#12153) r? `@ghost`
2023-05-23Update cargoWeihang Lo-0/+0
2023-05-23Promote loongarch64-unknown-linux-gnu to Tier 2 with host toolsWANG Rui-0/+2
MCP: https://github.com/rust-lang/compiler-team/issues/518
2023-05-23Update to latest clippyOli Scherer-16/+16
2023-05-23Merge from rustcOli Scherer-1156/+2683
2023-05-23Preparing for merge from rustcOli Scherer-1/+1
2023-05-23Rollup merge of #111756 - Urgau:rename_drop_forget_copy_ref_lints, r=fee1-deadDylan DPC-31/+31
Rename `{drop,forget}_{copy,ref}` lints to more consistent naming This PR renames previous uplifted lints in https://github.com/rust-lang/rust/pull/109732 to more consistent naming. I followed the renaming done [here](https://github.com/rust-lang/rust/issues/53224) and also advocated in this [clippy issue](https://github.com/rust-lang/rust-clippy/issues/2845): - `drop_copy` to `dropping_copy_types` - `forget_copy` to `forgetting_copy_types` - `drop_ref` to `dropping_references` - `forget_ref` to `forgetting_references`
2023-05-23Rollup merge of #111501 - WaffleLapkin:drivebycleanupuwu, r=oli-obkDylan DPC-6/+4
MIR drive-by cleanups Some random drive-by cleanups I did while working with MIR/THIR.
2023-05-21Use a signal handler to observe ctrl+c and cleanly drop the measureme profilerBen Kimock-0/+56
2023-05-21Rename `forget_ref` lint to `forgetting_references`Urgau-7/+7
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-8/+8
2023-05-21Rename `forget_copy` lint to `forgetting_copy_types`Urgau-8/+8
2023-05-21Rename `drop_copy` lint to `dropping_copy_types`Urgau-11/+11
2023-05-20Auto merge of #111799 - flip1995:clippyup, r=Manishearthbors-1114/+2623
Update Clippy r? `@Manishearth`
2023-05-20Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyupPhilipp Krones-1114/+2623
2023-05-20Auto merge of #111413 - workingjubilee:bump-object-0-31-1, r=MarkSimulacrumbors-0/+2
Bump object and thorin-dwp Required to fix watchOS breakage.
2023-05-20derive `Default` trait for `compiletest::common::Config`ozkanonur-1/+7
2023-05-20create new tool rustdoc-gui-testozkanonur-0/+233
2023-05-19Drive-by-cleanup: Don't emit `thir::ExprKind::NeverToAny` for `! -> !`Maybe Waffle-6/+4
2023-05-19Auto merge of #111641 - michaelwoerister:debugger-visualizer-fixes, r=cjgillotbors-0/+1
Fix dependency tracking for debugger visualizers This PR fixes dependency tracking for debugger visualizer files by changing the `debugger_visualizers` query to an `eval_always` query that scans the AST while it is still available. This way the set of visualizer files is already available when dep-info is emitted. Since the query is turned into an `eval_always` query, dependency tracking will now reliably detect changes to the visualizer script files themselves. TODO: - [x] perf.rlo - [x] Needs a bit more documentation in some places - [x] Needs regression test for the incr. comp. case Fixes https://github.com/rust-lang/rust/issues/111226 Fixes https://github.com/rust-lang/rust/issues/111227 Fixes https://github.com/rust-lang/rust/issues/111295 r? `@wesleywiser` cc `@gibbyfree`
2023-05-18Auto merge of #111345 - jyn514:cfg-release-caching, r=cjgillot,est31bors-4/+2
Only depend on CFG_VERSION in rustc_interface This avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`. cc https://github.com/rust-lang/rust/issues/76720 - this won't fix it, and I'm not suggesting we turn this on by default, but it will make it less painful for people who do have `omit-git-hash` on as a workaround.
2023-05-18Rollup merge of #111695 - fmease:dont-lump-together-alias-tys, r=compiler-errorsDylan DPC-0/+13
Exclude inherent projections from some alias type `match`es Updating (hopefully) all remaining `match`es which I overlooked to update when adding `AliasKind::Inherent` in #109410. Fixes #111399. Sadly the regression test is a clippy test instead of a rustc one as I don't know of another way to test that a trait bound like `Ty::InhProj: Trait` doesn't cause a crash without reaching a cycle error first (this is getting old ^^'). `@rustbot` label F-inherent_associated_types r? `@compiler-errors`
2023-05-18Merge from rustcRalf Jung-11/+90
2023-05-18Preparing for merge from rustcRalf Jung-1/+1
2023-05-18Rollup merge of #111561 - dtolnay:compiletestdirexists, r=Mark-SimulacrumDylan DPC-1/+7
Include better context for "already exists" error in compiletest I encountered the following error from `x.py test tests/ui` today. ```console ---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ---- thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 17, kind: AlreadyExists, message: "File exists" }', src/tools/compiletest/src/runtest.rs:134:43 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` I found it impossible to unblock myself without knowing which directory it was stuck on. Error message after this PR: ```console ---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ---- thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: failed to create output base directory /git/rust/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes Caused by: File exists (os error 17)', src/tools/compiletest/src/runtest.rs:139:10 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Now I was able to run `rm build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes` and unblock myself. Seems to be related to #109509 moving *tests/ui/impl-trait/multiple-lifetimes.rs* to *tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs*.
2023-05-17Only depend on CFG_VERSION in rustc_interfacejyn-4/+2
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
2023-05-17Exclude inherent projections from some alias ty matchesLeón Orell Valerian Liehr-0/+13
2023-05-17Rollup merge of #111648 - Nilstrieb:language-items, r=WaffleLapkinDylan DPC-4/+5
Remove `LangItems::require` It's just a short wrapper used by `tcx.require_lang_item`. Deleting it gives us a negative diff.
2023-05-17Update cargoWeihang Lo-0/+0
2023-05-16Remove `LangItems::require`Nilstrieb-4/+5
It's just a short wrapper used by `tcx.require_lang_item`. Deleting it gives us a negative diff.
2023-05-16Fix dependency tracking for debugger visualizersMichael Woerister-0/+1
2023-05-16Auto merge of #111639 - Nilstrieb:rollup-vg149lm, r=Nilstriebbors-2/+1
Rollup of 10 pull requests Successful merges: - #111428 (refactor(resolve): clean up the early error return caused by non-call) - #111449 (Recover `impl<T ?Sized>` correctly) - #111572 (Document that `missing_copy_implementations` and `missing_debug_implementations` only apply to public items.) - #111602 (Suppress "erroneous constant used" for constants tainted by errors) - #111605 (fixup version placeholder for `cfi_encoding` feature) - #111607 (Add clubby789 to the bootstrap review rotation) - #111614 (Add more interesting nonsense to weird-exprs.rs) - #111617 (Fixed typo) - #111620 (Add eholk back to compiler-contributors reviewers) - #111621 (Fix release date of 1.58.1 in release notes.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-05-16Rollup merge of #111602 - tmiasko:erroneous-constant-used, r=oli-obkNilstrieb-2/+1
Suppress "erroneous constant used" for constants tainted by errors When constant evaluation fails because its MIR is tainted by errors, suppress note indicating that erroneous constant was used, since those errors have to be fixed regardless of the constant being used or not. Fixes #110891.
2023-05-16Merge from rustcRalf Jung-32/+60
2023-05-16Preparing for merge from rustcRalf Jung-1/+1
2023-05-16add lib module to `src/tool/compiletest`ozkanonur-1135/+1141
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-16Auto merge of #111472 - djkoloski:compiletest_cfg_current_target, ↵bors-5/+84
r=compiler-errors Get current target config from` --print=cfg` Compiletest was switched to querying all targets using `--print=all-target-specs-json` and `--print=target-spec-json` in #108905. This unintentionally prevented codegen flags like `-Cpanic` from being reflected in the current target configuration. This change gets the current compiletest target config using `--print=cfg` like it was previously while still using the faster prints for getting information on all other targets. Fixes #110850. `@jyn514` might be interested in reviewing since they commented on the issue. cc `@tmandry` since this issue is affecting Fuchsia.