about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-15rustdoc-search: simplify the checkTypes fast pathMichael Howell-61/+10
This reduces code size while still matching the common case for plain, concrete types.
2023-11-15Auto merge of #116555 - paulmenage:llvm-module-flag, r=wesleywiserbors-0/+68
Add -Z llvm_module_flag Allow adding values to the `!llvm.module.flags` metadata for a generated module. The syntax is `-Z llvm_module_flag=<name>:<type>:<value>:<behavior>` Currently only u32 values are supported but the type is required to be specified for forward compatibility. The `behavior` element must match one of the named LLVM metadata behaviors.viors. This flag is expected to be perma-unstable.
2023-11-15Auto merge of #117819 - fmease:rustc_parse_format-stable-rustc, r=Nilstriebbors-5/+2
Make `rustc_parse_format` compile on stable again Fixes [#115948 (review comment)](https://github.com/rust-lang/rust/pull/115948/files/822233559619e7e77d984f9020d05302b784cf50#r1385932710). cc `@Veykril` `@notriddle` r? compiler
2023-11-15Auto merge of #117908 - lcnr:region-kind-rename, r=BoxyUwUbors-275/+301
finish `RegionKind` renaming second step of https://github.com/rust-lang/types-team/issues/95 continues the work from #117876. While working on this and I encountered a bunch of further cleanup which I'll either open a tracking issue for or will do in a separate PR: - rewrite the `RegionKind` docs, they still talk about `ReEmpty` and are generally out of date - rename `DescriptionCtx` to `DescriptionCtxt` - what is `CheckRegions::Bound`? - `collect_late_bound_regions` et al - `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased`? - `EraseEarlyRegions` visitor should be removed, feels duplicate r? `@BoxyUwU`
2023-11-15Auto merge of #117848 - compiler-errors:method-ambiguity-no-rcvr, r=TaKO8Kibors-2/+52
Don't expect a rcvr in `print_disambiguation_help` We don't necessarily have a receiver when we are both accidentally using the `.` operator *AND* we have more than one ambiguous method candidate. Fixes #117728
2023-11-15Auto merge of #117814 - RalfJung:rustc-logger-without-set-var, r=TaKO8Kibors-47/+82
rustc_log: provide a way to init logging based on the values, not names, of the env vars Miri wants to affect how rustc does logging. So far this required setting environment variables before calling `rustc_driver::init_rustc_env_logger`. However, `set_var` is a function one should really [avoid calling](https://github.com/rust-lang/rust/issues/90308), so this adds the necessary APIs to rustc such that Miri can just pass it the *values* of all the log-relevant environment variables, rather than having to change the global environment.
2023-11-15Auto merge of #117517 - klinvill:smir-projections, r=ouz-abors-7/+355
Add richer structure for Stable MIR Projections Resolves https://github.com/rust-lang/project-stable-mir/issues/49. Projections in Stable MIR are currently just strings. This PR replaces that representation with a richer structure, namely projections become vectors of `ProjectionElem`s, just as in MIR. The `ProjectionElem` enum is heavily based off of the MIR `ProjectionElem`. This PR is a draft since there are several outstanding issues to resolve, including: - How should `UserTypeProjection`s be represented in Stable MIR? In MIR, the projections are just a vector of `ProjectionElem<(),()>`, meaning `ProjectionElem`s that don't have Local or Type arguments (for `Index`, `Field`, etc. objects). Should `UserTypeProjection`s be represented this way in Stable MIR as well? Or is there a more user-friendly representation that wouldn't drag along all the `ProjectionElem` variants that presumably can't appear? - What is the expected behavior of a `Place`'s `ty` function? Should it resolve down the chain of projections so that something like `*_1.f` would return the type referenced by field `f`? - Tests should be added for `UserTypeProjection`
2023-11-15Auto merge of #117917 - slanterns:slanterns-1.74-release_note, r=Mark-Simulacrumbors-1/+3
Add missing entries in 1.74 release notes
2023-11-14Make UserTypeProjection projections OpaqueKirby Linvill-6/+7
Also shifts comments explaining why Stable MIR drops an optional variant name field, for `Downcast` projection elements, to the `Place::stable` function.
2023-11-15Auto merge of #117359 - tmiasko:call-def, r=cjgillotbors-30/+93
Fix def-use check for call terminators Fixes #117331.
2023-11-15fix doc linklcnr-1/+1
2023-11-15tidySlanterns-1/+1
2023-11-14Auto merge of #117915 - matthiaskrgr:rollup-ztljqrr, r=matthiaskrgrbors-291/+404
Rollup of 5 pull requests Successful merges: - #116244 (Apply structured suggestion that allows test to work since 1.64) - #117686 (Build pre-coroutine-transform coroutine body on error) - #117834 (target_feature: make it more clear what that 'Option' means) - #117893 (Suggest dereferencing the LHS for binops such as `&T == T`) - #117911 (Fix some typos) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-15Add missing entries in 1.74 release notesSlanterns-0/+2
2023-11-14Rollup merge of #117911 - catandcoder:master, r=lqdMatthias Krüger-13/+13
Fix some typos
2023-11-14Rollup merge of #117893 - sjwang05:issue-52544-take-1, r=wesleywiserMatthias Krüger-19/+71
Suggest dereferencing the LHS for binops such as `&T == T` Fixes #52544
2023-11-14Rollup merge of #117834 - RalfJung:target-feature-stability, r=b-naberMatthias Krüger-246/+280
target_feature: make it more clear what that 'Option' means Reading those tables in compiler/rustc_codegen_ssa/src/target_features.rs, it's not immediately clear that `None` means "stable". Let's use an enum with appropriately named variants to make that more obvious.
2023-11-14Rollup merge of #117686 - compiler-errors:gen-body, r=wesleywiserMatthias Krüger-11/+26
Build pre-coroutine-transform coroutine body on error I was accidentally building the post-transform coroutine body, rather than the pre-transform coroutine body. There's no pinning expected here yet, and the return type isn't yet transformed into `CoroutineState`. Fixes #117670
2023-11-14Rollup merge of #116244 - estebank:issue-73497, r=b-naberMatthias Krüger-2/+14
Apply structured suggestion that allows test to work since 1.64 Close #73497.
2023-11-14Auto merge of #117907 - nikic:update-llvm-17, r=cuviperbors-0/+0
Update to LLVM 17.0.5 Fixes https://github.com/rust-lang/rust/issues/116177. Fixes the compile-time issue reported at https://internals.rust-lang.org/t/significant-increase-in-fat-lto-time-post-update-to-rustc-1-75-0-nightly/19765. r? `@cuviper`
2023-11-14Auto merge of #117701 - lnicola:sync-from-ra, r=onur-ozkan,HKalbasibors-2066/+14906
Subtree update of `rust-analyzer` r? `@HKalbasi`
2023-11-14Fix def-use check for call terminatorsTomasz Miąsko-30/+93
2023-11-14Depend on rustc_driverLaurențiu Nicola-0/+4
2023-11-14Auto merge of #117849 - compiler-errors:cycle, r=cjgillotbors-9/+8
make `LayoutError::Cycle` carry `ErrorGuaranteed` Addresses a FIXME, and also I think it's wise for error variants to carry their `ErrorGuaranteed` -- makes it easier to use that `ErrorGuaranteed` for creating, e.g. `TyKind::Error` and other error kinds. Splitting out from #117703.
2023-11-14Fix some typoscui fliter-13/+13
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-11-14review + fix CIlcnr-4/+4
2023-11-14finish `RegionKind` renamelcnr-274/+300
- `ReFree` -> `ReLateParam` - `ReEarlyBound` -> `ReEarlyParam`
2023-11-14Auto merge of #117787 - ouz-a:smir_coroutinewitness, r=celinvalbors-1/+14
Add CoroutineWitness to covered types in smir Previously we accepted `CouroutineWitness` as `unreachable!` but https://github.com/rust-lang/project-stable-mir/issues/50 shows it is indeed reachable, this pr fixes that and covers `CouroutineWitness`
2023-11-14Update to LLVM 17.0.5Nikita Popov-0/+0
2023-11-14Auto merge of #117731 - nnethercote:rustc_macros, r=Nilstriebbors-93/+60
`rustc_macros` cleanups Just some improvements I found while reading over this code. r? `@Nilstrieb`
2023-11-14Auto merge of #117330 - tmiasko:custom-mir-cleanup-blocks, r=cjgillotbors-107/+428
Custom MIR: Support cleanup blocks Cleanup blocks are declared with `bb (cleanup) = { ... }`. `Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following: * `UnwindContinue()` * `UnwindUnreachable()` * `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup` * `UnwindCleanup(block)` Also support unwind resume and unwind terminate terminators: * `UnwindResume()` * `UnwindTerminate(reason)`
2023-11-14Custom MIR: Support cleanup blocksTomasz Miąsko-107/+428
Cleanup blocks are declared with `bb (cleanup) = { ... }`. `Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following: * `UnwindContinue()` * `UnwindUnreachable()` * `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup` * `UnwindCleanup(block)` Also support unwind resume and unwind terminate terminators: * `UnwindResume()` * `UnwindTerminate(reason)`
2023-11-14Auto merge of #117856 - estebank:issue-66023, r=compiler-errorsbors-10/+46
Always point at index span on index obligation failure Use more targetted span for index obligation failures by rewriting the obligation cause span. CC #66023
2023-11-14Auto merge of #117801 - tmiasko:remove-zsts-fuel, r=cjgillotbors-6/+5
Remove incorrect transformation from RemoveZsts Partial removal of storage statements for a local is incorrect, so a decision to optimize cannot be make independently for each statement. Avoid the issue by performing the transformation completely or not at all.
2023-11-14Auto merge of #117773 - nnethercote:rm-Zperf-stats, r=wesleywiserbors-99/+31
Remove `-Zperf-stats`. The included measurements have varied over the years. At one point there were quite a few more, but #49558 deleted a lot that were no longer used. Today there's just four, and it's a motley collection that doesn't seem particularly valuable. I think it has been well and truly subsumed by self-profiling, which collects way more data. r? `@wesleywiser`
2023-11-13Suggest lhs deref for binopssjwang05-19/+71
2023-11-14Auto merge of #116301 - mj10021:issue-115737-fix, r=cuviperbors-7/+24
fix rounding issue with exponents in fmt fixes issue #115737 , where the decimal places are rounded incorrectly when formatting scientific notation
2023-11-13Auto merge of #117887 - matthiaskrgr:rollup-rgur03f, r=matthiaskrgrbors-14/+40
Rollup of 4 pull requests Successful merges: - #114224 (rustc_llvm: Link to libkstat on Solaris/SPARC) - #117695 (Reorder checks to make sure potential missing expect on Option/Result…) - #117870 (`fn args_ref_X` to `fn args_X`) - #117879 (tests: update check for inferred nneg on zext) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-13Rollup merge of #117879 - durin42:nneg-zext, r=nikicMatthias Krüger-2/+2
tests: update check for inferred nneg on zext This was broken by upstream llvm/llvm-project@dc6d0773960c664eee12a1ed871fad5c81a20a12. It's easy enough to use a regex match to support both, so we do that. r? `@nikic` `@rustbot` label: +llvm-main
2023-11-13Rollup merge of #117870 - lcnr:rename-args_ref, r=compiler-errorsMatthias Krüger-10/+8
`fn args_ref_X` to `fn args_X`
2023-11-13Rollup merge of #117695 - ↵Matthias Krüger-2/+24
3tilley:prioritise-unwrap-expect-over-last-method-call, r=compiler-errors Reorder checks to make sure potential missing expect on Option/Result… … runs before removing last method call Fixes #117669
2023-11-13Rollup merge of #114224 - inferiorhumanorgans:solaris-llvm-wrapper, r=cuviperMatthias Krüger-0/+6
rustc_llvm: Link to libkstat on Solaris/SPARC getHostCPUName calls into libkstat but as of LLVM 16.0.6 libLLVMTargetParser is not explicitly linked against libkstat causing builds to fail due to undefined symbols. See also: llvm/llvm-project#64186
2023-11-13review comments: more targeted span setting approachEsteban Küber-2/+28
2023-11-13Auto merge of #116866 - slanterns:inspect-stabilize, r=BurntSushibors-16/+4
Stabilize `result_option_inspect` This PR stabilizes `result_option_inspect`: ```rust // core::option impl Option<T> { pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self; } // core::result impl Result<T, E> { pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self; pub fn inspect_err<F: FnOnce(&E)>(self, f: F) -> Self; } ``` <br> Tracking issue: https://github.com/rust-lang/rust/issues/91345. Implementation PR: https://github.com/rust-lang/rust/pull/91346. Closes https://github.com/rust-lang/rust/issues/91345.
2023-11-13Add missing rustc_private featuresLaurențiu Nicola-1/+8
2023-11-13Try Mode::ToolRustcLaurențiu Nicola-6/+6
2023-11-13Mention LLVM 64186 in a commentJosh Stone-0/+1
2023-11-13Auto merge of #117881 - TaKO8Ki:rollup-n7jtmgj, r=TaKO8Kibors-114/+39
Rollup of 5 pull requests Successful merges: - #117737 (Remove `-Zkeep-hygiene-data`.) - #117830 (Small improvements in object lifetime default code) - #117858 (Compute layout with spans for better cycle errors in coroutines) - #117863 (Remove some unused stuff from `rustc_index`) - #117872 (Cranelift isn't available on non-nightly channels) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-14Rollup merge of #117872 - Mark-Simulacrum:fwd-port-cranelift, r=onur-ozkanTakayuki Maeda-4/+1
Cranelift isn't available on non-nightly channels This commit already landed as part of beta branching, this PR just puts it on master.
2023-11-14Rollup merge of #117863 - nnethercote:rustc_index, r=Mark-SimulacrumTakayuki Maeda-69/+4
Remove some unused stuff from `rustc_index` r? `@Mark-Simulacrum`