about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-03-05Auto merge of #121780 - nnethercote:diag-renaming2, r=davidtwcobors-17/+22
Diagnostic renaming 2 A sequel to #121489. r? `@davidtwco`
2024-03-05Rename `DiagnosticExt` as `DiagExt`.Nicholas Nethercote-4/+4
2024-03-05Rename `DiagnosticMessage` as `DiagMessage`.Nicholas Nethercote-13/+18
2024-03-05Auto merge of #120675 - oli-obk:intrinsics3.0, r=pnkfelixbors-2/+13
Add a scheme for moving away from `extern "rust-intrinsic"` entirely All `rust-intrinsic`s can become free functions now, either with a fallback body, or with a dummy body and an attribute, requiring backends to actually implement the intrinsic. This PR demonstrates the dummy-body scheme with the `vtable_size` intrinsic. cc https://github.com/rust-lang/rust/issues/63585 follow-up to #120500 MCP at https://github.com/rust-lang/compiler-team/issues/720
2024-03-04Auto merge of #121998 - matthiaskrgr:rollup-l7lzwpb, r=matthiaskrgrbors-198/+181
Rollup of 10 pull requests Successful merges: - #120976 (constify a couple thread_local statics) - #121683 (Fix LVI tests after frame pointers are enabled by default) - #121703 (Add a way to add constructors for `rustc_type_ir` types) - #121732 (Improve assert_matches! documentation) - #121928 (Extract an arguments struct for `Builder::then_else_break`) - #121939 (Small enhancement to description of From trait) - #121968 (Don't run test_get_os_named_thread on win7) - #121969 (`ParseSess` cleanups) - #121977 (Doc: Fix incorrect reference to integer in Atomic{Ptr,Bool}::as_ptr.) - #121994 (Update platform-support.md with supported musl version) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-04Rollup merge of #121994 - wesleywiser:update_musl_version_docs, r=ehussMatthias Krüger-23/+23
Update platform-support.md with supported musl version This just reflects the current status quo, there is no actual change here since the update to musl 1.2.3 occurred in #107129 and was approved in https://github.com/rust-lang/compiler-team/issues/572. I also normalized all mentions of musl libc to "musl" (non-capitalized per the project's site and Wikipedia page). r? ``@ehuss``
2024-03-04Rollup merge of #121969 - nnethercote:ParseSess-cleanups, r=wesleywiserMatthias Krüger-175/+158
`ParseSess` cleanups The main change here is to rename all `ParseSess` values as `psess`. Plus a few other small cleanups. r? `@wesleywiser`
2024-03-05Rename all `ParseSess` variables/fields/lifetimes as `psess`.Nicholas Nethercote-172/+157
Existing names for values of this type are `sess`, `parse_sess`, `parse_session`, and `ps`. `sess` is particularly annoying because that's also used for `Session` values, which are often co-located, and it can be difficult to know which type a value named `sess` refers to. (That annoyance is the main motivation for this change.) `psess` is nice and short, which is good for a name used this much. The commit also renames some `parse_sess_created` values as `psess_created`.
2024-03-04Update platform-support.md with supported musl versionWesley Wiser-23/+23
2024-03-04Auto merge of #120468 - alexcrichton:start-wasm32-wasi-rename, r=wesleywiserbors-4/+139
Add a new `wasm32-wasip1` target to rustc This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs: * https://github.com/rust-lang/compiler-team/issues/607 * https://github.com/rust-lang/compiler-team/issues/695 In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
2024-03-04Add a scheme for moving away from `extern "rust-intrinsic"` entirelyOli Scherer-1/+12
2024-03-04Add `is_intrinsic` helperOli Scherer-1/+1
2024-03-04Remove `file_path_mapping` param from `ParseSess::new`.Nicholas Nethercote-3/+1
It's always empty.
2024-03-04Tweak `parse_asm_args`.Nicholas Nethercote-1/+1
It doesn't need a `Parser` and a `ParseSess`, because the former contains the latter.
2024-03-04Auto merge of #120585 - Amanieu:ohos-tier2, r=Kobzolbors-4/+121
Promote OpenHarmony targets to tier 2 MCP: rust-lang/compiler-team#719
2024-03-03Rollup merge of #121248 - c410-f3r:testsssssss, r=petrochenkovMatthias Krüger-117/+117
Move some tests r? `@petrochenkov`
2024-03-03Move testsCaio-117/+117
2024-03-03Auto merge of #121936 - RalfJung:miri, r=RalfJungbors-343/+607
Miri subtree update r? `@ghost`
2024-03-03Auto merge of #3345 - RalfJung:win-get-thread-name, r=RalfJungbors-44/+145
Windows: support getting the thread name Also organize the thread name tests a bit.
2024-03-03Windows: support getting the thread nameRalf Jung-20/+94
2024-03-03fix wording of alloc access tracking messageRalf Jung-1/+1
2024-03-03readmeRalf Jung-0/+2
2024-03-03Auto merge of #121931 - lnicola:sync-from-ra, r=lnicolabors-1267/+3264
Subtree update of `rust-analyzer` r? `@ghost`
2024-03-03move thread-panic tests to their own file; test getting the thread nameRalf Jung-24/+51
2024-03-03Merge commit '4ef6a49b44e8aa380da7522442234bfd7a52c55e' into sync-from-raLaurențiu Nicola-1267/+3264
2024-03-03Auto merge of #121877 - estebank:fancy-svg, r=compiler-errorsbors-3/+26
On tests that specify `--color=always` emit SVG file with stderr output Leverage `anstyle-svg`, as `cargo` does now, to emit `.svg` files instead of `.stderr` files for tests that explicitly enable color output. This will make reviewing changes to the graphical output of tests much more human friendly. <img src="https://raw.githubusercontent.com/rust-lang/rust/b4bdb56f86e136ca63bf71dca3034200c6c25900/tests/ui/error-emitter/highlighting.svg">
2024-03-02Auto merge of #121914 - Nadrieril:rollup-ol98ncg, r=Nadrierilbors-7/+55
Rollup of 5 pull requests Successful merges: - #120761 (Add initial support for DataFlowSanitizer) - #121622 (Preserve same vtable pointer when cloning raw waker, to fix Waker::will_wake) - #121716 (match lowering: Lower bindings in a predictable order) - #121731 (Now that inlining, mir validation and const eval all use reveal-all, we won't be constraining hidden types here anymore) - #121841 (`f16` and `f128` step 2: intrinsics) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-02On tests that specify --color=always emit SVG file with stderr outputEsteban Kuber-3/+26
Leverage `anstyle-svg`, as `cargo` does now, to emit `.svg` files instead of `.stderr` files for tests that explicitly enable color output. This will make reviewing changes to the graphical output of tests much more human friendly.
2024-03-02Tree Borrows: print where the forbidden access happens; make tag tracking ↵Ralf Jung-104/+125
less verbose
2024-03-02Rollup merge of #121841 - tgross35:f16-f128-step2-intrinsics, r=compiler-errorsGuillaume Boisseau-0/+13
`f16` and `f128` step 2: intrinsics Continuation of https://github.com/rust-lang/rust/pull/121728, another portion of https://github.com/rust-lang/rust/pull/114607. This PR adds `f16` and `f128` intrinsics, and hooks them up to both HIR and LLVM. This is all still unexposed to the frontend, which will probably be the next step. Also update itanium mangling per `@rcvalle's` in https://github.com/rust-lang/rust/pull/121728/files#r1506570300, and fix a typo from step 1. Once these types are usable in code, I will add the codegen tests from #114607 (codegen is passing on that branch) This does add more `unimplemented!`s to Clippy, but I still don't think we can do better until library support is added. r? `@compiler-errors` cc `@Nilstrieb` `@rustbot` label +T-compiler +F-f16_and_f128
2024-03-02Rollup merge of #120761 - rcvalle:rust-dfsan, r=nikicGuillaume Boisseau-7/+42
Add initial support for DataFlowSanitizer Adds initial support for DataFlowSanitizer to the Rust compiler. It currently supports `-Zsanitizer-dataflow-abilist`. Additional options for it can be passed to LLVM command line argument processor via LLVM arguments using `llvm-args` codegen option (e.g., `-Cllvm-args=-dfsan-combine-pointer-labels-on-load=false`).
2024-03-02Promote OpenHarmony targets to tier 2Amanieu d'Antras-4/+121
MCP: rust-lang/compiler-team#719
2024-03-02add option to track all read/write accesses to tracked allocationsRalf Jung-14/+38
2024-03-02Add a new `wasm32-wasip1` target to rustcAlex Crichton-4/+139
This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs: * https://github.com/rust-lang/compiler-team/issues/607 * https://github.com/rust-lang/compiler-team/issues/695 In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
2024-03-02print thread name in miri error backtracesRalf Jung-170/+219
2024-03-02Rollup merge of #121855 - GuillaumeGomez:trait-item-info, r=notriddleMatthias Krüger-13/+14
Correctly generate item info of trait items Fixes #121772. The `document_info` function was wrongly used when documenting a trait item. r? `@notriddle`
2024-03-01Add initial support for DataFlowSanitizerRamon de C Valle-7/+42
Adds initial support for DataFlowSanitizer to the Rust compiler. It currently supports `-Zsanitizer-dataflow-abilist`. Additional options for it can be passed to LLVM command line argument processor via LLVM arguments using `llvm-args` codegen option (e.g., `-Cllvm-args=-dfsan-combine-pointer-labels-on-load=false`).
2024-03-02Auto merge of #121878 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 12 commits in 8964c8ccff6e420e2a38b8696d178d69fab84d9d..f772ec0224d3755ce52ac5128a80319fb2eb45d0 2024-02-27 19:22:46 +0000 to 2024-03-01 22:57:35 +0000 - feat(toml): Warn on unset Edition (rust-lang/cargo#13505) - fix(msrv): Report all incompatible packages, not just a random one (rust-lang/cargo#13514) - refactor: abstract `std::fs` away from on-disk index cache (rust-lang/cargo#13515) - chore(deps): update compatible (rust-lang/cargo#13507) - chore(deps): update rust crate rusqlite to 0.31.0 (rust-lang/cargo#13510) - [docs]: Clarify vendored sources as read-only and way to modify (rust-lang/cargo#13512) - chore(deps): update rust crate supports-hyperlinks to v3 (rust-lang/cargo#13511) - refactor: Clarify more Config -&gt; Context (rust-lang/cargo#13506) - test: Make `edition` explicit in packages (rust-lang/cargo#13504) - Add all unit's children recursively for `doc.extern-map` option (rust-lang/cargo#13481) - fix(rustc): Always pass --edition to rustc (rust-lang/cargo#13499) - Silently ignore `cargo::rustc-check-cfg` to avoid MSRV annoyance when stabilizing `-Zcheck-cfg` (rust-lang/cargo#13438) r? ghost
2024-03-01Update cargoWeihang Lo-0/+0
2024-03-02Auto merge of #121870 - matthiaskrgr:rollup-mfpa3jx, r=matthiaskrgrbors-17/+3
Rollup of 11 pull requests Successful merges: - #111505 (Made `INVALID_DOC_ATTRIBUTES` lint deny by default) - #120305 (Delete line if suggestion would replace it with an empty line) - #121153 (Suggest removing superfluous semicolon when statements used as expression) - #121497 (`-Znext-solver=coherence`: suggest increasing recursion limit) - #121634 (Clarify behavior of slice prefix/suffix operations in case of equality) - #121706 (match lowering: Remove hacky branch in sort_candidate) - #121730 (Add profiling support to AIX) - #121750 (match lowering: Separate the `bool` case from other integers in `TestKind`) - #121803 (Never say "`Trait` is implemented for `{type error}`") - #121811 (Move sanitizer ui tests to sanitizer directory) - #121824 (Implement missing ABI structures in StableMIR) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-01Rollup merge of #121811 - ↵Matthias Krüger-3/+3
rcvalle:rust-cfi-move-ui-tests-to-sanitizer-directory, r=compiler-errors Move sanitizer ui tests to sanitizer directory Moves the sanitizer ui tests to the sanitizer directory and removes the sanitizer prefix from tests file names similarly to how the sanitizer codegen tests are organized.
2024-03-01Rollup merge of #120305 - clubby789:unused-import-line, r=estebankMatthias Krüger-14/+0
Delete line if suggestion would replace it with an empty line Fixes #120296
2024-03-01Auto merge of #121395 - nikic:update-llvm-21, r=cuviperbors-11/+32
Update to LLVM 18.1.0 rc 4 Fixes https://github.com/rust-lang/rust/issues/120819. Fixes https://github.com/rust-lang/rust/issues/121180. Fixes https://github.com/rust-lang/rust/issues/121239. Fixes https://github.com/rust-lang/rust/issues/121367.
2024-03-01Auto merge of #121859 - matthiaskrgr:rollup-i724wpm, r=matthiaskrgrbors-24/+202
Rollup of 12 pull requests Successful merges: - #120646 (Fix incorrect suggestion for uninitialized binding in pattern) - #121416 (Improve error messages for generics with default parameters) - #121475 (Add tidy check for .stderr/.stdout files for non-existent test revisions) - #121580 (make unused_imports less assertive in test modules) - #121736 (Remove `Mutex::unlock` Function) - #121784 (Make the success arms of `if lhs || rhs` meet up in a separate block) - #121818 (CFI: Remove unused `typeid_for_fnsig`) - #121819 (Handle stashing of delayed bugs) - #121828 (Remove unused fluent messages) - #121831 (Fix typo in comment) - #121850 (Make `ZeroablePrimitive` trait unsafe.) - #121853 (normalizes-to: handle negative impls) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-01Propegate HIR and AST `f16` and `f128` types to clippyTrevor Gross-0/+9
2024-03-01Propegate HIR and AST `f16` and `f128` types to rustdocTrevor Gross-0/+4
2024-03-01Rollup merge of #121475 - jieyouxu:tidy-stderr-check, r=the8472,compiler-errorsMatthias Krüger-24/+202
Add tidy check for .stderr/.stdout files for non-existent test revisions Closes #77498.
2024-03-01Auto merge of #113026 - jieyouxu:run-make-v2, r=bjorn3bors-10/+506
Introduce `run-make` V2 infrastructure, a `run_make_support` library and port over 2 tests as example ## Preface See [issue #40713: Switch run-make tests from Makefiles to rust](https://github.com/rust-lang/rust/issues/40713) for more context. ## Basic Description of `run-make` V2 `run-make` V2 aims to eliminate the dependency on `make` and `Makefile`s for building `run-make`-style tests. Makefiles are replaced by *recipes* (`rmake.rs`). The current implementation runs `run-make` V2 tests in 3 steps: 1. We build the support library `run_make_support` which the `rmake.rs` recipes depend on as a tool lib. 2. We build the recipe `rmake.rs` and link in the support library. 3. We run the recipe to build and run the tests. `rmake.rs` is basically a replacement for `Makefile`, and allows running arbitrary Rust code. The support library is built using cargo, and so can depend on external crates if desired. The infrastructure implemented by this PR is very barebones, and is the minimally required infrastructure needed to build, run and pass the two example `run-make` tests ported over to the new infrastructure. ### Example `run-make` V2 test ```rs // ignore-tidy-linelength extern crate run_make_support; use std::path::PathBuf; use run_make_support::{aux_build, rustc}; fn main() { aux_build() .arg("--emit=metadata") .arg("stable.rs") .run(); let mut stable_path = PathBuf::from(env!("TMPDIR")); stable_path.push("libstable.rmeta"); let output = rustc() .arg("--emit=metadata") .arg("--extern") .arg(&format!("stable={}", &stable_path.to_string_lossy())) .arg("main.rs") .run(); let stderr = String::from_utf8_lossy(&output.stderr); let version = include_str!(concat!(env!("S"), "/src/version")); let expected_string = format!("stable since {}", version.trim()); assert!(stderr.contains(&expected_string)); } ``` ## Follow Up Work - [ ] Adjust rustc-dev-guide docs
2024-03-01Handle new LLVM sonameNikita Popov-11/+32
LLVM now includes the minor version in the soname, and also changed the names of shared object files. libLLVM-18.so is now a symlink to libLLVM.so.18.1. We need to make some changes to support this: First, we need to run the installed llvm-config binary, rather than the one from the build directory. This is because the symlink does not exist in the build directory, but llvm-config requires it. This looks like an LLVM bug to me, but it's probably a good idea to use the installed version anyway. Second, when installing LLVM into the libdir, we need to install the target of the symlink, ans this is what will get loaded at runtime. However, the rust-dev component in particular also needs to distribute the symlink itself, as download-ci-llvm will end up invoking llvm-config, which requires the symlink to exist. The symlink is not shipped in other components.
2024-03-01Update to LLVM 18.1.0 rc 4Nikita Popov-0/+0