about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2023-07-11Support build-pass in codegen testsJubilee Young-12/+13
2023-07-11fix handling of alignment for dyn-sized placesRalf Jung-5/+6
2023-07-11miri tree borrows: skip retag_reference early if there is no NewPermissionRalf Jung-13/+15
2023-07-11miri: protect Move() function arguments during the callRalf Jung-85/+422
2023-07-11Add a sparc-unknown-none-elf target.Jonathan Pallant (Ferrous Systems)-0/+1
Tested with the Gaisler bcc2 toolchain (both gcc and clang) and the Leon3 simulator.
2023-07-11Auto merge of #111717 - Urgau:uplift_fn_null_check, r=oli-obkbors-223/+64
Uplift `clippy::fn_null_check` lint This PR aims at uplifting the `clippy::fn_null_check` lint into rustc. ## `incorrect_fn_null_checks` (warn-by-default) The `incorrect_fn_null_checks` lint checks for expression that checks if a function pointer is null. ### Example ```rust let fn_ptr: fn() = /* somehow obtained nullable function pointer */ if (fn_ptr as *const ()).is_null() { /* ... */ } ``` ### Explanation Function pointers are assumed to be non-null, checking for their nullity is incorrect. ----- Mostly followed the instructions for uplifting a clippy lint described here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751 `@rustbot` label: +I-lang-nominated r? compiler
2023-07-10Don't use serde-derive in the rls shimJosh Stone-5/+5
The already-small RLS shim can get a little smaller, and faster to build, if we drop the serde-derive dependency and decode the one "method" field it needs manually from `serde_json::Value`.
2023-07-10Do not set up wrong span for adjustmentsMichael Goulet-15/+8
2023-07-10Drop uplifted `clippy::fn_null_check`Urgau-223/+64
2023-07-10Remove the library/term exception in tidy's pal checker codebjorn3-1/+0
This crate doesn't exist anymore.
2023-07-10Merge from rustcRalf Jung-140/+1522
2023-07-10Preparing for merge from rustcRalf Jung-1/+1
2023-07-10Auto merge of #108796 - devsnek:personality-pal-exception, r=workingjubileebors-2/+0
move personality to sys this moves `personality` to sys, removing another PAL exception
2023-07-09move personality to sysGus Caplan-2/+0
2023-07-10Auto merge of #108485 - devsnek:float-pat-exception, r=workingjubileebors-2/+0
move pal cfgs in f32 and f64 to sys I'd like to push forward on `sys` being a separate crate. To start with, most of these PAL exception cases are very simple little bits of code like this, so I thought I would try tidying them up.
2023-07-09move pal cfgs in f32 and f64 to sysGus Caplan-2/+0
2023-07-09test and fix return place alias restrictionsRalf Jung-2/+124
2023-07-09Auto merge of #113488 - RalfJung:miri, r=RalfJungbors-98/+251
update Miri
2023-07-09Auto merge of #113306 - tgross35:debuginfo-better-output, r=Mark-Simulacrumbors-108/+131
Update debuginfo test runner to provide more useful output This change makes debuginfo tests more user friendly. Changes: - Print all lines that fail to match the patterns instead of just the first - Provide better error messages that also say what did match - Strip leading whitespace from directives so they are not skipped if indented - Improve documentation and improve nesting on some related items As an example, given the following intentional fail (and a few not shown): ```rust // from tests/debuginfo/rc_arc.rs // cdb-command:dx rc,d // cdb-check:rc,d : 111 [Type: alloc::rc::Rc<i32>] // cdb-check: [Reference count] : 11 [Type: core::cell FAIL::Cell<usize>] // cdb-check: [Weak reference count] : 2 [Type: core::cell FAIL::Cell<usize>] ``` The current output (tested in #113313) will show: ``` 2023-07-04T08:10:00.1939267Z ---- [debuginfo-cdb] tests\debuginfo\rc_arc.rs stdout ---- 2023-07-04T08:10:00.1942182Z 2023-07-04T08:10:00.1957463Z error: line not found in debugger output: [Reference count] : 11 [Type: core:: cell FAIL::Cell<usize>] 2023-07-04T08:10:00.1958272Z status: exit code: 0 ``` With this chane, you are able to see all failures in that check group, as well as what parts were successful. The output is now: ``` 2023-07-04T09:45:57.2514224Z error: check directive(s) from `C:\a\rust\rust\tests\debuginfo\rc_arc.rs` not found in debugger output. errors: 2023-07-04T09:45:57.2514631Z (rc_arc.rs:31) ` [Reference count] : 11 [Type: core::cell FAIL::Cell<usize>]` 2023-07-04T09:45:57.2514908Z (rc_arc.rs:32) ` [Weak reference count] : 2 [Type: core::cell FAIL::Cell<usize>]` 2023-07-04T09:45:57.2515181Z (rc_arc.rs:41) ` [Reference count] : 21 [Type: core::sync::atomic FAIL::AtomicUsize]` 2023-07-04T09:45:57.2515452Z (rc_arc.rs:50) `dyn_rc,d [Type: alloc::rc::Rc<dyn$<core::fmt FAIL::Debug> >]` 2023-07-04T09:45:57.2515695Z the following subset of check directive(s) was found successfully:: 2023-07-04T09:45:57.2516080Z (rc_arc.rs:30) `rc,d : 111 [Type: alloc::rc::Rc<i32>]` 2023-07-04T09:45:57.2516312Z (rc_arc.rs:35) `weak_rc,d : 111 [Type: alloc::rc::Weak<i32>]` 2023-07-04T09:45:57.2516555Z (rc_arc.rs:36) ` [Reference count] : 11 [Type: core::cell::Cell<usize>]` 2023-07-04T09:45:57.2516881Z (rc_arc.rs:37) ` [Weak reference count] : 2 [Type: core::cell::Cell<usize>]` ... ``` Which makes it easier to see what did and didn't succeed without manual comparison against the source test file.
2023-07-09Auto merge of #112235 - Kobzol:opt-dist, r=Mark-Simulacrumbors-0/+1337
Port PGO/LTO/BOLT optimized build pipeline to Rust This PR ports the `stage-build.py` PGO/LTO/BOLT optimization script from Python to Rust, to make it easier to use dependencies, and make it a bit more robust. The PR switches both the Linux and Windows dist runners to the Rust script and removes the old Python script. Funnily enough, the Rust port has less lines of code than the Python script :) I think that clearly shows that the Python script really lacked dependencies.
2023-07-09Port PGO/LTO/BOLT optimized build pipeline to RustJakub Beránek-0/+1337
2023-07-09Auto merge of #113276 - Nilstrieb:rustix, r=Mark-Simulacrumbors-0/+2
Update rustix The issue has been fixed. https://github.com/bytecodealliance/rustix/issues/716
2023-07-08Auto merge of #113450 - Nilstrieb:src/bootstrap/test.rs, r=flip1995bors-19/+0
Fail the build if clippy tests don't pass This was removed in https://github.com/rust-lang/rust/pull/113260/commits/de69d556eb5006a21f868b8c12d48f0ef1308a5a#diff-8479eab02701e686aedb15b567dc8fc31220c6e4efb9565ccc9d662b7fee2214 which caused CI to ignore clippy failures. This adds back the exit, which should cause CI to fail again if a test is broken (like right now, as clippy tests are broken on master). Also see https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/CI.20doesn't.20care.20about.20clippy.20test.20failures.20but.20only.20sometime r? flip1995
2023-07-08Delete `to_string_in_format_args_incremental.rs`Nilstrieb-19/+0
It fails CI and passes locally. It passes random directores in `-Cincremental` so maybe something's up. It shouldn't block us here.
2023-07-08Auto merge of #113376 - ↵bors-9/+9
Nilstrieb:pointer-coercions-are-not-casts-because-that-sounds-way-to-general-aaaa, r=oli-obk Rename `adjustment::PointerCast` and variants using it to `PointerCoercion` It makes it sounds like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a little enum variants. Make it clear there these are only coercions and that people who see this and think "why are so many pointer related casts not in these variants" aren't insane. This enum was added in #59987. I'm not sure whether the variant sharing is actually worth it, but this at least makes it less confusing. r? oli-obk
2023-07-08Merge from rustcThe Miri Conjob Bot-42/+22
2023-07-08Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-07-07Rollup merge of #113466 - weihanglo:update-cargo, r=weihangloMichael Goulet-0/+0
Update cargo 1 commits in 5b377cece0e0dd0af686cf53ce4637d5d85c2a10..45782b6b8afd1da042d45c2daeec9c0744f72cc7 2023-06-30 00:01:00 +0000 to 2023-07-05 16:54:51 +0000 - docs(ref): Provide guidance on version requirements (rust-lang/cargo#12323) r? ``@ghost``
2023-07-07Rollup merge of #113441 - RalfJung:assign-no-overlap, r=oli-obkMichael Goulet-0/+43
miri: check that assignments do not self-overlap r? `````@oli-obk`````
2023-07-08Eagerly resolve vars in predicate during coercion loopMichael Goulet-1/+1
2023-07-07Update cargoWeihang Lo-0/+0
2023-07-07Fix failing clippy testsAlex Macleod-41/+21
Comments out the C string literals due to https://github.com/rust-lang/rust/pull/113334 Fixes https://github.com/rust-lang/rust-clippy/issues/11121
2023-07-07Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`Nilstrieb-9/+9
It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a some enum variants. Make it clear there these are only coercion to make it clear why only some pointer related "casts" are in the enum.
2023-07-07miri: check that assignments do not self-overlapRalf Jung-0/+43
2023-07-07Auto merge of #2969 - oli-obk:run-dep, r=RalfJungbors-10/+11
Stop parsing ui_test annotations in `run-dep` mode fixes #2967
2023-07-07MIRIFLAGS are already passed in the `./miri` wrapperOli Scherer-5/+0
2023-07-07Remove a now-useless flagOli Scherer-1/+0
2023-07-07Silence all the boilerplate around `./miri run` and `./miri run-dep`Oli Scherer-1/+1
2023-07-07Use new std::simd fn in miri testsJubilee Young-1/+1
Old fn were slightly divergent.
2023-07-07fmtThe Miri Conjob Bot-19/+26
2023-07-07Merge from rustcThe Miri Conjob Bot-935/+936
2023-07-07Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-07-06Stop parsing ui_test annotations in `run-dep` modeOli Scherer-10/+17
2023-07-06Auto merge of #113406 - matthiaskrgr:rollup-0rprs5k, r=matthiaskrgrbors-2/+5
Rollup of 4 pull requests Successful merges: - #112295 (Fix the tests-listing-format-json test on Windows) - #113246 (fix compiletest crash) - #113395 (Dont ICE for `dyn* Trait: Trait` (built-in object) goals during selection in new trait solver) - #113402 (Diagnose unsorted CGUs.) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-06Rollup merge of #113246 - mirkootter:fix-compiletest-crash, r=pietroalbiniMatthias Krüger-1/+1
fix compiletest crash ### Motivation When running compiler-tests locally for the `wasm32` platform, one test repeatedly crashed. It does not crash on the CI, only locally. Investigation shows that the `compiletest` itself crashes > panicked-at-attempt-to-subtract-with-overflow ```rust let mut head = replace(bytes, Vec::new()); let mut middle = head.split_off(HEAD_LEN); // The following line will panic let tail = middle.split_off(middle.len() - TAIL_LEN).into_boxed_slice(); let skipped = new_len - HEAD_LEN - TAIL_LEN; ``` ### Background The code in question collects the output of a process. Small output is kept completely, but larger output is kept only partially: the first 160 kB and the last 256 kB. The code that performs this split crashes if the data size is less than 416 kB. There is an early out based on the "filtered" length, but it is possible that the filtered length is greater than the real length. It seems that this code was written with the assumption that the filtered length is larger than the real length, which is not true in general. When running CI tests locally using `src/ci/docker/run.sh`, the filtered folder is `/checkout`, which is shorter than the placeholder length of 32 bytes. ### Note This PR should not change any behaviour. It only adds an early our for a case which will definitely crash (at least if compiletest is build with integer checks). Note that an early out makes sense here: If the real data is too small, it does not sense to split it.
2023-07-06Rollup merge of #112295 - ↵Matthias Krüger-1/+4
ForrestOfBarnes:tests-listing-format-json-windows-fix, r=pietroalbini Fix the tests-listing-format-json test on Windows tests/ui/test-attrs/tests-listing-json-format.rs was failing on Windows because each path in the json-formatted output contained "\\\\" instead of "\\". `runtest::TestCx::normalize_output` already checks the compile flags for json-related arguments to handle this case, so I added an equivalent check for the new run flag.
2023-07-06Auto merge of #113377 - BoxyUwU:move_ty_ctors_to_ty, r=compiler-errorsbors-31/+35
Move `TyCtxt::mk_x` to `Ty::new_x` where applicable Part of rust-lang/compiler-team#616 turns out there's a lot of places we construct `Ty` this is a ridiculously huge PR :S r? `@oli-obk`
2023-07-06Ignore test on appleOli Scherer-0/+1
2023-07-06Auto merge of #113391 - fee1-dead-contrib:rollup-9bqlw9z, r=fee1-deadbors-0/+1
Rollup of 9 pull requests Successful merges: - #111119 (style-guide: Add chapter about formatting for nightly-only syntax) - #112791 (llvm ffi: Expose `CallInst->setTailCallKind`) - #113145 (style-guide: Document newline rules for assignment operators) - #113163 (Add a regression test for #112895) - #113332 (resolve: Use `Interned` for some interned structures) - #113334 (Revert the lexing of `c"…"` string literals) - #113350 (Fix the issue of wrong diagnosis for extern pub fn) - #113371 (Fix submodule handling when the current branch is named after a tag) - #113384 (style-guide: Clarify grammar for small patterns (not a semantic change)) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-06Rollup merge of #113334 - fmease:revert-lexing-c-str-lits, r=compiler-errorsfee1-dead-0/+1
Revert the lexing of `c"…"` string literals Fixes \[after beta-backport\] #113235. Further progress is tracked in #113333. This PR *manually* reverts parts of #108801 (since a git-revert would've been too coarse-grained & messy) and git-reverts #111647. CC `@fee1-dead` (#108801) `@klensy` (#111647) r? `@compiler-errors` `@rustbot` label F-c_str_literals beta-nominated