about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-03-05[AIX] Remove AixLinker's debuginfo() implementationKai Luo-10/+1
`-s` option doesn't perfectly fit into debuginfo()'s semantics and may unexpectedly remove metadata in shared libraries. Remove the implementation and suggest user to use `strip` utility instead.
2024-03-05Auto merge of #121780 - nnethercote:diag-renaming2, r=davidtwcobors-639/+609
Diagnostic renaming 2 A sequel to #121489. r? `@davidtwco`
2024-03-05Adjust `Diag::new` signature.Nicholas Nethercote-1/+1
Make it use `impl Into<DiagMessage>` like all the other methods nearby.
2024-03-05Rename `DiagnosticMetadata` as `DiagMetadata`.Nicholas Nethercote-92/+86
2024-03-05Rename `StructuredDiagnostic` as `StructuredDiag`.Nicholas Nethercote-12/+10
2024-03-05Rename `BuiltinLintDiagnostics` as `BuiltinLintDiag`.Nicholas Nethercote-113/+105
Not the dropping of the trailing `s` -- this type describes a single diagnostic and its name should be singular.
2024-03-05Rename `DiagnosticExt` as `DiagExt`.Nicholas Nethercote-4/+4
2024-03-05Rename `DiagnosticMode` as `DiagMode`.Nicholas Nethercote-22/+19
2024-03-05Rename `SubdiagnosticMessageOp` as `SubdiagMessageOp`.Nicholas Nethercote-57/+55
2024-03-05Rename `SubdiagnosticMessage` as `SubdiagMessage`.Nicholas Nethercote-85/+83
2024-03-05Fix some out-of-date comments.Nicholas Nethercote-4/+4
2024-03-05Rename `DiagnosticMessage` as `DiagMessage`.Nicholas Nethercote-261/+253
2024-03-05Disable `tests/ui-fulldeps/internal-lints/diagnostics.rs` on stage 1.Nicholas Nethercote-7/+8
When you make a change to the diagnostic lints, it uses the old version of the lints with stage 1 and the new version with stage 2, which often leads to failures in stage 1. Let's just stick to stage 2.
2024-03-05Auto merge of #120675 - oli-obk:intrinsics3.0, r=pnkfelixbors-51/+207
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-889/+900
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 #121977 - Lee-Janggun:master, r=WaffleLapkinMatthias Krüger-2/+2
Doc: Fix incorrect reference to integer in Atomic{Ptr,Bool}::as_ptr. I am assuming "resulting integer" is an error, since we are talking about pointers and booleans here. Seems like it was missed while copy & pasting the docs from the integer versions. I also checked the rest of the docs, and this was the only mention of integers.
2024-03-04Rollup merge of #121969 - nnethercote:ParseSess-cleanups, r=wesleywiserMatthias Krüger-718/+665
`ParseSess` cleanups The main change here is to rename all `ParseSess` values as `psess`. Plus a few other small cleanups. r? `@wesleywiser`
2024-03-04Rollup merge of #121968 - roblabla:fix-win7, r=jhprattMatthias Krüger-1/+1
Don't run test_get_os_named_thread on win7 This test won't work on windows 7, as the Thread::set_name function is not implemented there (win7 does not provide a documented mechanism to set thread names).
2024-03-04Rollup merge of #121939 - jonaspleyer:patch-typo-core-From-descr, ↵Matthias Krüger-3/+3
r=workingjubilee Small enhancement to description of From trait - fix small typo - avoid repetition of formulations
2024-03-04Rollup merge of #121928 - Zalathar:then-else-args, r=NadrierilMatthias Krüger-66/+72
Extract an arguments struct for `Builder::then_else_break` Most of this method's arguments are usually or always forwarded as-is to recursive invocations. Wrapping them in a dedicated struct allows us to document each struct field, and lets us use struct-update syntax to indicate which arguments are being modified when making a recursive call. --- While trying to understand the lowering of `if` expressions, I found it difficult to keep track of the half-dozen arguments passed through to every call to `then_else_break`. I tried switching over to an arguments struct, and I found that it really helps to make sense of what each argument does, and how each call is modifying the arguments. I have some further ideas for how to streamline these recursive calls, but I've kept those out of this PR so that it's a pure refactoring with no behavioural changes.
2024-03-04Rollup merge of #121732 - Voultapher:improve-assert_matches-documentation, ↵Matthias Krüger-32/+58
r=cuviper Improve assert_matches! documentation This new documentation tries to limit the impact of the conceptual pitfall, that the if guard relaxes the constraint, when really it tightens it. This is achieved by changing the text and examples. The previous documentation also chose a rather weird and non-representative example for the if guard, that made it needlessly complicated to understand.
2024-03-04Rollup merge of #121703 - compiler-errors:new, r=lcnrMatthias Krüger-35/+53
Add a way to add constructors for `rustc_type_ir` types Introduces a module called `rustc_type_ir`, in which we can place traits which are named `Ty`/`Region`/`Const`/etc. which expose constructors for the `rustc_type_ir` types. This means we can construct things `Interner::Ty` with `Ty::new_x(...)`, which is needed to uplift the new trait solver into an interner-agnostic crate. These traits are placed into a *separate* module because they're only intended to be used in interner-agnostic code, and they should mirror the constructors that are provided by the inherent constructor methods in `rustc_middle`. Putting this up for vibe-check mostly. I haven't copied over any of the type constructors, except for one to create bound types for use in the canonicalizer. r? lcnr
2024-03-04Rollup merge of #121683 - fortanix:raoul/lvi_fixes, r=cuviperMatthias Krüger-4/+18
Fix LVI tests after frame pointers are enabled by default #121203 enables frame pointers by default. This affects LVI mitigations for the `x86_64-fortanix-unknown-sgx` target. LVI remained mitigated correctly, but the tests were too strict. ``@nshyrei`` , ``@jethrogb``
2024-03-04Rollup merge of #120976 - matthiaskrgr:constify_TL_statics, r=lcnrMatthias Krüger-5/+5
constify a couple thread_local statics
2024-03-05Rename all `ParseSess` variables/fields/lifetimes as `psess`.Nicholas Nethercote-687/+653
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-125/+213
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-04make `intrinsic` query legal for any `DefId`Oli Scherer-11/+11
2024-03-04Remove some depgraph edges on the HIR by invoking the intrinsic query ↵Oli Scherer-6/+5
instead of checking the attribute
2024-03-04Avoid some boolean argument footgunsOli Scherer-10/+26
2024-03-04Add a scheme for moving away from `extern "rust-intrinsic"` entirelyOli Scherer-8/+131
2024-03-04Return a struct from `query intrinsic` to be able to add another field in ↵Oli Scherer-26/+33
the next commit
2024-03-04Add `is_intrinsic` helperOli Scherer-4/+15
2024-03-04Allow a way to add constructors for rustc_type_ir typesMichael Goulet-35/+53
2024-03-04Fix comment in Atomic{Ptr,Bool}::as_ptr.Janggun Lee-2/+2
2024-03-04Fix LVI tests after making frame pointers easily enableableRaoul Strackx-4/+18
2024-03-04include feedback from workingjubilee Jonas Pleyer-2/+2
- Refer to trait directly - small typo in encapsulate Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2024-03-04Don't run test_get_os_named_thread on win7roblabla-1/+1
This test won't work on windows 7, as the Thread::set_name function is not implemented there (win7 does not provide a documented mechanism to set thread names).
2024-03-04Auto merge of #121964 - matthiaskrgr:rollup-rtcju5m, r=matthiaskrgrbors-37/+180
Rollup of 3 pull requests Successful merges: - #121130 (Suggest moving definition if non-found macro_rules! is defined later) - #121912 (Properly deal with GATs when looking for method chains to point at) - #121927 (Add a proper `with_no_queries` to printing) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-04Extract an arguments struct for `Builder::then_else_break`Zalathar-66/+72
Most of this method's arguments are usually or always forwarded as-is to recursive invocations. Wrapping them in a dedicated struct allows us to document each struct field, and lets us use struct-update syntax to indicate which arguments are being modified when making a recursive call.
2024-03-04Rollup merge of #121927 - Zoxc:print-no-query, r=estebankMatthias Krüger-20/+23
Add a proper `with_no_queries` to printing
2024-03-04Rollup merge of #121912 - fmease:diag-method-chains-gat, ↵Matthias Krüger-16/+63
r=compiler-errors,estebank Properly deal with GATs when looking for method chains to point at Fixes #121898. ~~While it prevents an ICE and the structured suggestion is correct, the method chain diagnostic notes are weird / useless / incorrect judging by a quick look. I guess I should improve that in this PR.~~ Sufficiently taken care of. r? estebank or compiler-errors (#105332, #105674).
2024-03-04Rollup merge of #121130 - chenyukang:yukang-fix-121061-macro-later, ↵Matthias Krüger-1/+94
r=matthiaskrgr Suggest moving definition if non-found macro_rules! is defined later Fixes #121061
2024-03-04Rename a misnamed `Session` parameter.Nicholas Nethercote-4/+4
2024-03-04Auto merge of #121900 - chenyukang:yukang-fix-121425-repr-pack-error, ↵bors-49/+160
r=compiler-errors Fix misleading message in struct repr alignment and packed Fixes #121425 By the way, fix the spans for the argument in the second commit.
2024-03-04Move `sess` function and use it more.Nicholas Nethercote-10/+8
2024-03-04Remove `file_path_mapping` param from `ParseSess::new`.Nicholas Nethercote-25/+11
It's always empty.
2024-03-04Tweak `parse_asm_args`.Nicholas Nethercote-6/+3
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/+124
Promote OpenHarmony targets to tier 2 MCP: rust-lang/compiler-team#719