-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 14 pull requests #78920
Rollup of 14 pull requests #78920
Conversation
The inliner integrates call destination place with callee return place by remapping the local and adding extra projections as necessary. If a call destination place contains any projections (which is already possible) and a return place is used in an indexing projection (most likely doesn't happen yet) the end result would be incorrect. Add an assertion to ensure that potential issue won't go unnoticed in the presence of more sophisticated copy propagation scheme.
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
`target.target_endian` -> `target.endian` `target.target_c_int_width` -> `target.c_int_width` `target.target_os` -> `target.os` `target.target_env` -> `target.env` `target.target_vendor` -> `target.vendor` `target.target_family` -> `target.os_family` `target.target_mcount` -> `target.mcount`
comment means to refer to the macro in its direct scope
Previously the [src] link on types defined by a macro pointed to the macro definition. This commit makes the Clean-Implementation for Spans aware of macro defined types, so that the link points to the invocation instead.
Co-authored-by: Camelid <camelidcamel@gmail.com>
Make it more clear what an about async fn's returns when referring to what it returns see #76547 This is *likely* not the ONLY place that this happens to be unclear, but we can move this fn to rustc_middle or something like that and reuse it if need be, to apply it to more diagnostics One outstanding question I have is, if the fn returns (), should I make the message more clear (what about `fn f()` vs `fn f() -> ()`, can you tell those apart in the hir?) R? `@tmandry` `@rustbot` modify labels +A-diagnostics +T-compiler
Use check-pass instead of build-pass in regions ui test suite ## Overview Helps with #62277 Region inference have nothing to do with codegen because they are erased before codegen. Ref: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20region.20inference.20.20nothing.20to.20do.20with.20codegen.20process.3F/near/215956759
Use check-pass instead of build-pass in some consts ui test suits Helps with #62277 Changed tests modified by #57175 because of the stabilization `#![feature(const_let)]`. They should be compile-fail because the feature gate checking disallow the feature before stabilization. So the feature gate checking have nothing to do with codegen according to https://rustc-dev-guide.rust-lang.org/feature-gate-ck.html.
Assert that a return place is not used for indexing during integration The inliner integrates call destination place with callee return place by remapping the local and adding extra projections as necessary. If a call destination place contains any projections (which is already possible) and a return place is used in an indexing projection (most likely doesn't happen yet) the end result would be incorrect. Add an assertion to ensure that potential issue won't go unnoticed in the presence of more sophisticated copy propagation scheme.
…master, r=Mark-Simulacrum Workaround for "could not fully normalize" ICE Workaround for "could not fully normalize" ICE (#78139) by removing the `needs_drop::<T>()` calls triggering it. Corresponding beta PR: #78845 Fixes #78139 -- the underlying bug is likely not fixed but we don't have another test case isolated for now, so closing.
rustc_target: Further cleanup use of target options Follow up to #77729. Implements items 2 and 4 from the list in #77729 (comment). The first commit collapses uses of `target.options.foo` into `target.foo`. The second commit renames some target options to avoid tautology: `target.target_endian` -> `target.endian` `target.target_c_int_width` -> `target.c_int_width` `target.target_os` -> `target.os` `target.target_env` -> `target.env` `target.target_vendor` -> `target.vendor` `target.target_family` -> `target.os_family` `target.target_mcount` -> `target.mcount` r? `@Mark-Simulacrum`
Add comments to explain memory usage optimization Add explanatory comments so that people understand that it's just an optimization and doesn't affect behavior.
comment attribution fix comment means to refer to the macro in its direct scope
Clarified description of write! macro Reordered the list of arguments in the description to match that in the actual macro. Suggested and discussed [here](https://discord.com/channels/442252698964721669/443492145567891458/774341262609219624).
Add missing newline to error message of the default OOM hook Currently the default OOM hook in libstd does not end the error message with a newline: ``` memory allocation of 4 bytes failedtimeout: the monitored command dumped core /playground/tools/entrypoint.sh: line 11: 7 Aborted timeout --signal=KILL ${timeout} "$`@"` ``` https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=030d8223eb57dfe47ef157709aa26542 This is because the `fmt::Arguments` passed to `dumb_print()` does not end with a newline. All other calls to `dumb_print()` in libstd pass a `\n`-ended `fmt::Arguments` to `dumb_print()`. For example: https://github.com/rust-lang/rust/blob/25f6938da459a57b43bdf16ed6bdad3225b2a3ce/library/std/src/sys_common/util.rs#L18 I think the `\n` was forgotten in #51264. This PR appends `\n` to the error string. ~~Note that I didn't add a test, because I didn't find tests for functions in ` library/std/src/alloc.rs` or a test that is similar to the test of this change would be.~~ *Edit: CI told me there is an existing test. Sorry.*
📌 Commit fa4d0f2 has been approved by |
⌛ Testing commit fa4d0f2 with merge a9efca89cedc4094168a883db0cae76808bf8af7... |
💔 Test failed - checks-actions |
No logs. @bors retry |
⌛ Testing commit fa4d0f2 with merge 4d9459181128ab34462a2ec4c825da42a85ad091... |
💔 Test failed - checks-actions |
@bors retry spurious LLDB failure |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@38030ff. Direct link to PR: <rust-lang/rust#78920> 💔 miri on windows: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung). 💔 miri on linux: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung).
Successful merges:
Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup