about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-03-26update the remaining test-cargo-miri dependencies as well (while we are at it)Ralf Jung-11/+11
2024-03-26Change `f16` and `f128` clippy stubs to be nonpanickingTrevor Gross-4/+11
It turns out there is a bit of a circular dependency - I cannot add anything to `core` because Clippy fails, and I can't actually add correct Clippy implementations without new implementations from `core`. Change some of the Clippy stubs from `unimplemented!` to success values and leave a FIXME in their place to mitigate this. Fixes <https://github.com/rust-lang/rust/issues/122587>
2024-03-26update proc-macro2Ralf Jung-2/+2
2024-03-26rename our proc-macro test crate to a more clear nameRalf Jung-45/+20
and remove serde_derive, since the --extern .so file was really just a consequence of building a proc macro
2024-03-26test-cargo-miri: add proc-macro2 instead of anyhowRalf Jung-11/+6
2024-03-26In ConstructCoroutineInClosureShim, pass receiver by ref, not pointerMichael Goulet-14/+70
2024-03-26avoid mutating the global environmentRalf Jung-11/+6
2024-03-26Auto merge of #3420 - RalfJung:eyre, r=RalfJungbors-0/+25
add eyre to test-cargo-miri Same as anyhow: custom build probe, widely used.
2024-03-26add eyre to test-cargo-miriRalf Jung-0/+25
2024-03-26Auto merge of #3415 - JoJoDeveloping:tree-borrows-initialized-root, r=RalfJungbors-20/+40
Tree Borrows: Make tree root always be initialized This PR fixes a slight annoyance we discovered while formally proving that certain optimizations are sound with Tree Borrows. In particular... (copied from the commit message): There should never be an `Active` but not initialized node in the borrow tree. If such a node exists, and if it has a protector, then on a foreign read, it could become disabled. This leads to some problems when formally proving that read moving optimizations are sound. The root node is the only node for which this can happen, since all other nodes can only become `Active` when actually used. But special-casing the root node here is annoying to reason about, everything becomes much nicer if we can simply say that *all* `Active` nodes must be initialized. This requires making the root node default-initialized. This is also more intuitive, since the root arguably becomes initialized during the allocation, which can be considered a write.
2024-03-26Tree Borrows: Make tree root always be `Active` and initializedJohannes Hostert-20/+40
There should never be an `Active` but not initialized node in the borrow tree. If such a node exists, and if it has a protector, then on a foreign read, it could become disabled. This leads to some problems when formally proving that read-reordering optimizations are sound. The root node is the only node for which this can happen, since all other nodes can only become `Active` when actually used. But special- casing the root node here is annoying to reason about, everything becomes much nicer if we can simply say that *all* `Active` nodes must be initialized. This requires making the root node default- initialized. This is also more intuitive, since the root arguably becomes ini- tialized during the allocation, which can be considered a write.
2024-03-26Auto merge of #3419 - RalfJung:rustup, r=RalfJungbors-27/+23
Rustup https://github.com/rust-lang/rust/pull/123081 landed so hopefully this works now.
2024-03-26fmtRalf Jung-1/+1
2024-03-26Merge from rustcRalf Jung-27/+23
2024-03-26Preparing for merge from rustcRalf Jung-1/+1
2024-03-26cargo-miri: clean up info_query treatment a bit, and update comment about RUSTCRalf Jung-30/+31
2024-03-26run command: simplify flag computationRalf Jung-10/+13
2024-03-26run_dep_mode: treat program.args and program.env consistentlyRalf Jung-29/+28
2024-03-26enable cargo miri test doctestsonur-ozkan-3/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-03-26we have to ignore RUSTC_WORKSPACE_WRAPPER as wellRalf Jung-0/+7
2024-03-26Update cargoScott Schafer-0/+0
2024-03-26CFI: Enable KCFI testing of run-pass testsMatthew Maurer-0/+1
This enables KCFI-based testing for all the CFI run-pass tests in the suite today. We can add the test header on top of in-flight CFI tests once they land. It also enables KCFI as a sanitizer for x86_64 and aarch64 Linux to make this possible. The sanitizer should likely be available for all aarch64, x86_64, and riscv targets, but that isn't critical for initial testing.
2024-03-26Auto merge of #111769 - saethlin:ctfe-backtrace-ctrlc, r=RalfJungbors-15/+11
Print a backtrace in const eval if interrupted Demo: ```rust #![feature(const_eval_limit)] #![const_eval_limit = "0"] const OW: u64 = { let mut res: u64 = 0; let mut i = 0; while i < u64::MAX { res = res.wrapping_add(i); i += 1; } res }; fn main() { println!("{}", OW); } ``` ``` ╭ ➜ ben@archlinux:~/rust ╰ ➤ rustc +stage1 spin.rs ^Cerror[E0080]: evaluation of constant value failed --> spin.rs:8:33 | 8 | res = res.wrapping_add(i); | ^ Compilation was interrupted note: erroneous constant used --> spin.rs:15:20 | 15 | println!("{}", OW); | ^^ note: erroneous constant used --> spin.rs:15:20 | 15 | println!("{}", OW); | ^^ | = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error For more information about this error, try `rustc --explain E0080`. ```
2024-03-25Auto merge of #123040 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 13 commits in d438c80c45c24be676ef5867edc79d0a14910efe..a510712d05c6c98f987af24dd73cdfafee8922e6 2024-03-19 16:11:22 +0000 to 2024-03-25 03:45:54 +0000 - Remove unnecessary test (rust-lang/cargo#13637) - Use `gitoxide` for `list_files_git` (rust-lang/cargo#13592) - fix: Warn on -Zlints (rust-lang/cargo#13632) - feat: Add a basic linting system (rust-lang/cargo#13621) - docs: remove untrue TODO for `native_dirs` (rust-lang/cargo#13631) - refactor(testsuite): Rename lints to lints_table (rust-lang/cargo#13627) - Fix debuginfo strip when using `--target` (rust-lang/cargo#13618) - refactor(toml): Push diagnostic complexity on annotate-snippets (rust-lang/cargo#13619) - Fix publish script due to crates.io CDN change (rust-lang/cargo#13614) - fix(alias): dont panic when resolving an empty alias (rust-lang/cargo#13613) - Update annotate snippets (rust-lang/cargo#13609) - refactor(vendor): tiny not important refactors (rust-lang/cargo#13610) - feat: Report some dependency changes on any command (rust-lang/cargo#13561) r? ghost
2024-03-25Auto merge of #123041 - RalfJung:miri, r=RalfJungbors-27/+141
Miri subtree update r? `@ghost`
2024-03-25Update cargoWeihang Lo-0/+0
2024-03-25support '--sysroot=' form of setting the sysroot as wellRalf Jung-1/+1
2024-03-25Merge from rustcRalf Jung-5/+8
2024-03-25Preparing for merge from rustcRalf Jung-1/+1
2024-03-25Rollup merge of #123001 - Alexendoo:check-attributes, r=oli-obkMatthias Krüger-11/+11
Rename `{enter,exit}_lint_attrs` to `check_attributes{,_post}` Several places in Clippy want to check all the attributes of a node, we end up using `hir().attrs()` from several different `check_` functions (e.g. [in our doc lints](https://github.com/rust-lang/rust-clippy/blob/95c62ffae9bbce793f68a6f1473e3fc24af19bdd/clippy_lints/src/doc/mod.rs#L396)) but this is error prone, we recently found that doc lints weren't triggering on struct fields for example I went to add a `check_attributes` function but realised `enter_lint_attrs` is already this, the rename is to encourage their use Also removes `LateContextAndPass::visit_attribute` since it's unused - `visit_attribute` for HIR visitors is only called by `hir().walk_attributes()` which lint passes do not use
2024-03-25Rollup merge of #122842 - pacak:explicit_name, r=michaelwoeristerMatthias Krüger-1/+1
Don't emit an error about failing to produce a file with a specific name if user never gave an explicit name Fixes #122509 You can ask `rustc` to produce some intermediate results with `--emit foo`, this operation comes in two flavors: `--emit asm` and `--emit asm=foo.s`. First one produces one or more `.s` files without any name guarantees, second one renames it into `foo.s`. Second version only works when compiler produces a single file - for asm files this means using a single compilation unit for example. In case compilation produced more than a single file `rustc` runs following check to emit some warnings: ```rust if crate_output.outputs.contains_key(&output_type) { // 2) Multiple codegen units, with `--emit foo=some_name`. We have // no good solution for this case, so warn the user. sess.dcx().emit_warn(errors::IgnoringEmitPath { extension }); } else if crate_output.single_output_file.is_some() { // 3) Multiple codegen units, with `-o some_name`. We have // no good solution for this case, so warn the user. sess.dcx().emit_warn(errors::IgnoringOutput { extension }); } else { // 4) Multiple codegen units, but no explicit name. We // just leave the `foo.0.x` files in place. // (We don't have to do any work in this case.) } ``` Comment in the final `else` branch implies that if user didn't ask for a specific name - there's no need to emit warnings. However because of the internal representation of `crate_output.outputs` - this doesn't work as expected: if user asked to produce an asm file without giving it an implicit name it will contain `Some(None)`. To fix the problem new code actually checks if user gave an explicit name. I think this was an original intentional behavior, at least comments imply that.
2024-03-25Auto merge of #3413 - RalfJung:cargo-miri-misc, r=RalfJungbors-4/+28
phase_rustdoc: add a heuristic to make us more certain that this is really rustdoc Also add anyhow to test-cargo-miri; it has a custom build probe and is widely used so let's make sure the build script does not fail.
2024-03-25phase_rustdoc: add a heuristic to make us more certain that this is really ↵Ralf Jung-4/+18
rustdoc
2024-03-25test-cargo-miri: test anyhowRalf Jung-0/+10
2024-03-25CONTRIBUTING: vsocde settings: add --all-targetsRalf Jung-0/+2
2024-03-24Auto merge of #3402 - RalfJung:miri-script, r=RalfJungbors-6/+21
miri script: build with stable toolchain `./miri toolchain` sets up a `rustup override miri`. But then if something goes wrong and the `miri` toolchain doesn't work, one can't even run `./miri toolchain` again as building miri-script needs a toolchain... So let's always use stable to build miri-script, making it override-independent. I assume everyone will have that installed.
2024-03-24Rollup merge of #122962 - jieyouxu:stamp-rmake-support-lib, r=onur-ozkanMatthias Krüger-0/+2
Track run-make-support lib in common inputs stamp So that when the support library gets modified, `run-make` tests are forced to re-run instead of being still ignored as if nothing changed. Fixes #122961.
2024-03-24Rollup merge of #122737 - ytmimi:conditionally_ignore_fatal_diagnostic, ↵Matthias Krüger-1/+2
r=davidtwco conditionally ignore fatal diagnostic in the SilentEmitter This change is primarily meant to allow rustfmt to ignore all diagnostics when using the `SilentEmitter`. Back in #121301 the `SilentEmitter` was shared between rustc and rustfmt. This changed rustfmt's behavior from ignoring all diagnostic to emitting fatal diagnostics, which lead to https://github.com/rust-lang/rustfmt/issues/6109. These changes allow rustfmt to maintain its previous behaviour when using the `SilentEmitter`, while allowing rustc code to still emit fatal diagnostics.
2024-03-24Rework rmake support library to have a weakly-typed API with helper methods许杰友 Jieyou Xu (Joe)-177/+306
2024-03-24Auto merge of #3406 - RalfJung:many-seeds, r=RalfJungbors-6/+7
many-seeds: propagate failure properly This may help explain https://github.com/rust-lang/miri/issues/3405.
2024-03-24desperate hack: hard-code bash path on WindowsRalf Jung-1/+10
2024-03-24Rename `{enter,exit}_lint_attrs` to `check_attributes{,_post}`Alex Macleod-11/+11
2024-03-24try to fix many-seeds tests on WindowsRalf Jung-1/+2
2024-03-24Auto merge of #3398 - tiif:add_libc_fs_test, r=RalfJungbors-5/+71
Add libc direct test for shims and update CONTRIBUTING.md Add more ``libc`` direct test for shims as mentioned in #3179. Changes: - Added ``libc`` direct tests for ``rename`` and ``ftruncate64`` - Added the command for running ``pass-dep`` test in ``CONTRIBUTING.md``
2024-03-24Add libc test for rename and ftruncatetiif-5/+71
2024-03-24miri-script/toolchain: make new_commit logic easier to followRalf Jung-3/+3
2024-03-24many-seeds: propagate failure properlyRalf Jung-2/+2
2024-03-24CI tweaks and show which stable Rust we are usingRalf Jung-3/+9
2024-03-24miri script: build with stable toolchainRalf Jung-2/+2
2024-03-24Merge from rustcRalf Jung-101/+212