about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-04-14Rollup merge of #109800 - bryangarza:safe-transmute-improved-errors, ↵Matthias Krüger-593/+495
r=compiler-errors Improve safe transmute error reporting This patch updates the error reporting when Safe Transmute is not possible between 2 types by including the reason. Also, fix some small bugs that occur when computing the `Answer` for transmutability.
2023-04-14Rollup merge of #109225 - seanlinsley:patch-1, r=ChrisDentonMatthias Krüger-1/+2
Clarify that RUST_MIN_STACK may be internally cached For larger applications it's important that users set `RUST_MIN_STACK` at the start of their program because [`min_stack`](https://github.com/rust-lang/rust/blob/7d3e03666a93bd2b0f78b3933f9305832af771a5/library/std/src/sys_common/thread.rs) caches the value. Not doing so can lead to their `env::set_var` call surprisingly not having any effect. In my own testing `RUST_MIN_STACK` had no effect until I moved it to the top of `main()`. Hopefully this clarification in the docs will help others going forward.
2023-04-14Auto merge of #109875 - jyn514:no-fulldeps, r=compiler-errorsbors-12/+14
Move most ui-fulldeps tests to ui/ Same rationale as https://github.com/rust-lang/rust/pull/109770, they don't actually need a stage 2 build. This increases the limit for the UI directory because otherwise it was annoying to be constantly moving files into subdirectories when I fixed a test; https://github.com/rust-lang/rust/pull/109873 makes up for it. cc https://github.com/rust-lang/rust/pull/109770, https://github.com/rust-lang/rust/pull/109874
2023-04-13Fix tests on wasmJoshua Nelson-4/+6
The `std` test straightforwardly can't work without file descriptors; #99417 tracks moving it out of tests/ui. `issue-13560.rs` requires the target to support dynamic linking. `extern-mod-syntax` is interesting. The original test was added to check if `extern mod` could be parsed correctly and used `extern mod std` and an import: https://github.com/rust-lang/rust/commit/138dc3048af36f0a20f857542c357fe8df563013#diff-73700e1e851b7a37bc92174635dab726124c82e5bfabbbc45b4a3c2e8e14fadd At some point `std::json::Object` was moved out of std to an unstable rustc-only `extras` crate, and rather than just changing the import it got changed to use the unstable crate. When `extras` was removed, people assumed the test was meant to also test rustc_private and changed it to another unstable crate rather than using something in std. This changes the test to remove the `rustc_private` import, to allow it to work properly when cross-compiling.
2023-04-13Move most ui-fulldeps tests to uijyn-1/+1
They pass fine. Only tests that required `extern crate rustc_*` or were marked `ignore-stage1` have been keep in fulldeps.
2023-04-14Auto merge of #110160 - petrochenkov:notagain2, r=cjgillotbors-99/+72
resolve: Pre-compute non-reexport module children Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-13Auto merge of #110253 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 4 commits in 7bf43f028ba5eb1f4d70d271c2546c38512c9875..84b7041fd2745ee6b3b4a150314f81aabb78e6b2 2023-04-10 16:01:41 +0000 to 2023-04-13 20:08:40 +0000 - Stabilize `cargo logout` (rust-lang/cargo#11950) - Add more information to HTTP errors to help with debugging. (rust-lang/cargo#11878) - Use registry.default for login/logout (rust-lang/cargo#11949) - Change -C to be unstable (rust-lang/cargo#11960)
2023-04-13Improve safe transmute error reportingBryan Garza-593/+495
This patch updates the error reporting when Safe Transmute is not possible between 2 types by including the reason. Also, fix some small bugs that occur when computing the `Answer` for transmutability.
2023-04-13Update cargoWeihang Lo-0/+0
2023-04-13Auto merge of #110295 - matthiaskrgr:rollup-xas29a1, r=matthiaskrgrbors-103/+580
Rollup of 8 pull requests Successful merges: - #109036 (Fix diff option conflict in UI test) - #110193 (Check for body owner fallibly in error reporting) - #110233 (Make rust-intrinsic ABI unwindable) - #110259 (Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented) - #110265 (Automatically update the LLVM submodule for musl target (and other places)) - #110277 (dead-code-lint: de-dup multiple unused assoc functions) - #110283 (Only emit alignment checks if we have a panic_impl) - #110291 (Implement `Copy` for `LocationDetail`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-13Rollup merge of #110291 - WaffleLapkin:copy_location_detail, r=oli-obkMatthias Krüger-2/+2
Implement `Copy` for `LocationDetail` micro-nano-little-change
2023-04-13Rollup merge of #110283 - saethlin:check-panics-before-alignment, r=bjorn3Matthias Krüger-0/+24
Only emit alignment checks if we have a panic_impl Fixes https://github.com/rust-lang/rust/issues/109996 r? `@bjorn3` because you commented that this situation could impact you as well
2023-04-13Rollup merge of #110277 - Ezrashaw:combine-assoc-fns-dlint, r=lcnrMatthias Krüger-78/+157
dead-code-lint: de-dup multiple unused assoc functions Fixes #109600 Prior art: #97853
2023-04-13Rollup merge of #110265 - KittyBorgX:master, r=ozkanonurMatthias Krüger-0/+6
Automatically update the LLVM submodule for musl target (and other places) Fixes #109987
2023-04-13Rollup merge of #110259 - ndrewxie:issue-109964-fix-gitstuff, r=cjgillotMatthias Krüger-7/+55
Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented I made a PR earlier, but accidentally renamed a branch and that deleted the PR... sorry for the duplicate Currently, if an operation on `Pin<T>` is performed that requires `T` to implement `Unpin`, the diagnostic suggestion is to use `Box::pin` ("note: consider using `Box::pin`"). This PR suggests pin! as well, as that's another valid way of pinning a value, and avoids a heap allocation. Appropriate diagnostic suggestions were included to highlight the difference in semantics (local pinning for pin! vs non-local for Box::pin). Fixes #109964
2023-04-13Rollup merge of #110233 - nbdd0121:intrinsic, r=tmiaskoMatthias Krüger-13/+289
Make rust-intrinsic ABI unwindable Fix #104451, fix https://github.com/rust-lang/miri/issues/2839 r? `@RalfJung`
2023-04-13Rollup merge of #110193 - compiler-errors:body-owner-issue, r=WaffleLapkinMatthias Krüger-1/+45
Check for body owner fallibly in error reporting Sometimes the "body id" we use for an obligation cause is not actually a body owner, like when we're doing WF checking on items. Fixes #110157
2023-04-13Rollup merge of #109036 - chenyukang:yukang/fix-testcase, r=jyn514Matthias Krüger-2/+2
Fix diff option conflict in UI test Trivial fix for test case `tests/run-make/rustdoc-verify-output-files`, it's failing on MacOS, the `-u` option specifies the unified context format, while the `-q` option specifies only brief output. These two options are incompatible, since the unified context format produces a more detailed output than the brief output format.
2023-04-13Implement `Copy` for `LocationDetail`Maybe Waffle-2/+2
2023-04-13Only emit alignment checks if we have a panic_implBen Kimock-0/+24
2023-04-13Auto merge of #110079 - fee1-dead-contrib:bump-futures, r=Mark-Simulacrumbors-19/+19
bump `futures` to use syn 2.0 cc #109302
2023-04-14bless the single testEzra Shaw-0/+2
2023-04-13Auto merge of #109989 - ids1024:m68k-asm, r=Amanieubors-1/+220
Add inline assembly support for m68k I believe this should be correct, to the extent I understand the logic around inline assembly. M68k is fairly straightforward here, other than having separate address registers.
2023-04-13impl reviewer feedbackEzra Shaw-17/+32
- remove unused (pun intentional) `continue` - improve wording with assoc items in general
2023-04-13Add regression testGary Guo-0/+39
2023-04-13dead-code-lint: de-dup multiple unused assoc fnsEzra Shaw-72/+77
2023-04-13Document catch_fn in r#try cannot unwindGary Guo-0/+3
2023-04-13Auto merge of #110275 - matthiaskrgr:rollup-8ntb3o5, r=matthiaskrgrbors-510/+352
Rollup of 6 pull requests Successful merges: - #110072 (Stabilize IsTerminal) - #110195 (Erase lifetimes above `ty::INNERMOST` when probing ambiguous types) - #110218 (Remove `ToRegionVid`) - #110220 (cleanup our region error API) - #110234 (Fix btree `CursorMut::insert_after` check) - #110262 (Update unwind_safe.rs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-13Rollup merge of #110262 - justincredible:patch-1, r=ChrisDentonMatthias Krüger-1/+1
Update unwind_safe.rs Typo in the documentation.
2023-04-13Rollup merge of #110234 - marc0246:btree-insert-after-fix, r=cuviperMatthias Krüger-1/+65
Fix btree `CursorMut::insert_after` check Fixes a check inside `BTreeMap`'s `CursorMut::insert_after`, where it would peek the previous element to check whether the inserted key is below the next one, instead of peeking the next element.
2023-04-13Rollup merge of #110220 - lcnr:regionzz, r=compiler-errorsMatthias Krüger-237/+192
cleanup our region error API - require `TypeErrCtxt` to always result in an error, closing #108810 - move `resolve_regions_and_report_errors` to the `ObligationCtxt` - call `process_registered_region_obligations` in `resolve_regions` - move `resolve_regions` into the `outlives` submodule - add `#[must_use]` to functions returning lists of errors r? types
2023-04-13Rollup merge of #110218 - nnethercote:rm-ToRegionVid, r=compiler-errorsMatthias Krüger-241/+55
Remove `ToRegionVid` r? ```@compiler-errors```
2023-04-13Rollup merge of #110195 - compiler-errors:issue-110052, r=aliemjayMatthias Krüger-15/+33
Erase lifetimes above `ty::INNERMOST` when probing ambiguous types Turns out that `TyCtxt::replace_escaping_bound_vars_uncached` only erases bound vars exactly at `ty::INNERMOST`, and not everything above. This regresses the suggestions for non-lifetime binders, but oh well, I don't really care about those. Fixes #110052
2023-04-13Rollup merge of #110072 - joshtriplett:stabilize-is-terminal, r=Mark-SimulacrumMatthias Krüger-15/+6
Stabilize IsTerminal FCP completed in https://github.com/rust-lang/rust/issues/98070 . closes: https://github.com/rust-lang/rust/issues/98070
2023-04-13refactor: emit "unused assoc fn" in lexical orderEzra Shaw-30/+87
with repect to other dead code lints
2023-04-13Auto merge of #109786 - estebank:tweak-add-line-sugg, r=compiler-errorsbors-296/+458
Tweak output for 'add line' suggestion Closes #108174
2023-04-13automatically update the LLVM submoduleKrishna Ramasimha-0/+6
2023-04-13Auto merge of #108283 - the8472:remove-splice-into-pipe, r=ChrisDentonbors-16/+88
don't splice from files into pipes in io::copy This fixes potential data ordering issue where a write performed after a copy operation could become visible in the copy even though it signaled completion. I assumed that by not setting `SPLICE_F_MOVE` we would be safe and the kernel would do a copy in kernel space and we could avoid the read-write syscall and copy-to/from-userspace costs. But apparently that flag only makes a difference when splicing from a pipe, but not when splicing into it. Context: https://lkml.org/lkml/2023/2/9/673
2023-04-13Remove some unused type folders.Nicholas Nethercote-145/+4
I'm surprised the compiler doesn't warn about these. It appears having an `impl` on a struct is enough to avoid a warning about it never being constructed.
2023-04-13Remove `ToRegionVid`.Nicholas Nethercote-55/+32
It is only implemented for `Region`, where it is equivalent to the inherent `as_var` method.
2023-04-13Remove `impl ToRegionVid for RegionVid`.Nicholas Nethercote-23/+12
It's weird and unnecessary.
2023-04-13Make `Region::as_var` infallible.Nicholas Nethercote-18/+7
It's what all the call sites require.
2023-04-13Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, ↵bors-7/+67
r=wesleywiser Preserve argument indexes when inlining MIR We store argument indexes on VarDebugInfo. Unlike the previous method of relying on the variable index to know whether a variable is an argument, this survives MIR inlining. We also no longer check if var.source_info.scope is the outermost scope. When a function gets inlined, the arguments to the inner function will no longer be in the outermost scope. What we care about though is whether they were in the outermost scope prior to inlining, which we know by whether we assigned an argument index. Fixes #83217 I considered using `Option<NonZeroU16>` instead of `Option<u16>` to store the index. I didn't because `TypeFoldable` isn't implemented for `NonZeroU16` and because it looks like due to padding, it currently wouldn't make any difference. But I indexed from 1 anyway because (a) it'll make it easier if later it becomes worthwhile to use a `NonZeroU16` and because the arguments were previously indexed from 1, so it made for a smaller change. This is my first PR on rust-lang/rust, so apologies if I've gotten anything not quite right.
2023-04-12Update unwind_safe.rsJustin Symonds-1/+1
Typo in the documentation.
2023-04-12Add inline assembly support for m68kIan Douglas Scott-1/+220
2023-04-12Special-case item attributes in the suggestion outputEsteban Küber-188/+10
2023-04-12Tweak output for 'add line' suggestionEsteban Küber-294/+634
2023-04-12Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgrbors-700/+502
Rollup of 8 pull requests Successful merges: - #109810 (Replace rustdoc-ui/{c,z}-help tests with a stable run-make test ) - #110035 (fix: ensure bad `#[test]` invocs retain correct AST) - #110089 (sync::mpsc: synchronize receiver disconnect with initialization) - #110103 (Report overflows gracefully with new solver) - #110122 (Fix x check --stage 1 when download-ci-llvm=false) - #110133 (Do not use ImplDerivedObligationCause for inherent impl method error reporting) - #110135 (Revert "Don't recover lifetimes/labels containing emojis as character literals") - #110235 (Fix `--extend-css` option) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-12Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't ↵Andrew Xie-7/+55
implemented
2023-04-12fix commentlcnr-1/+2