Commit Graph

222009 Commits

Author SHA1 Message Date
Nicholas Nethercote f07c335e90 Remove another use of `BrAnon(Some(_))`. 2023-04-14 11:28:16 +10:00
Nicholas Nethercote 7dbd2e2370 Remove one use of `BrAnon(Some(_))`. 2023-04-14 11:28:10 +10:00
bors 7a78c4ffd5 Auto merge of #110160 - petrochenkov:notagain2, r=cjgillot
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-14 01:14:36 +00:00
Michael Howell 53f499d475 rustdoc-search: use ES6 Map for `Result` instead of Object 2023-04-13 17:40:06 -07:00
Michael Howell 8642c96a33 rustdoc-search: use ES6 `Set` for deduplication instead of `Object` 2023-04-13 17:07:10 -07:00
Michael Howell e34dc7f437 rustdoc-search: use ES6 `Map` for generic matching instead of `Object` 2023-04-13 17:06:50 -07:00
Michael Howell 2179d9157e rustdoc-search: use ES6 `Map` for aliases instead of `Object` 2023-04-13 17:06:36 -07:00
bors 367661b1fc Auto merge of #110253 - weihanglo:update-cargo, r=weihanglo
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-13 22:54:36 +00:00
Kyle Matsuda 8d5ee1a072 make impl_subject more readable 2023-04-13 16:43:34 -06:00
Bryan Garza 36febe1f4d 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-13 21:57:08 +00:00
Kyle Matsuda e2f5a5a71f make tcx.impl_subject return EarlyBinder, remove bound_impl_subject, rename usages of bound_impl_subject to impl_subject 2023-04-13 15:56:00 -06:00
Kyle Matsuda dcc51f1ef5 change usage of bound_impl_subject to impl_subject 2023-04-13 15:55:54 -06:00
Weihang Lo 544c5a5dc3
Update cargo 2023-04-13 22:42:27 +01:00
jmaargh cd868dcf98 Cover edge cases for {f32, f64}.hypot() docs
Re-phrase in a way that handles input values being either 0 or
negative.
2023-04-13 22:41:55 +01:00
bors a41fc00eaf Auto merge of #110295 - matthiaskrgr:rollup-xas29a1, r=matthiaskrgr
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-13 20:34:12 +00:00
Matthias Krüger 46c6301672
Rollup merge of #110291 - WaffleLapkin:copy_location_detail, r=oli-obk
Implement `Copy` for `LocationDetail`

micro-nano-little-change
2023-04-13 21:58:39 +02:00
Matthias Krüger c140e25ec8
Rollup merge of #110283 - saethlin:check-panics-before-alignment, r=bjorn3
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-13 21:58:39 +02:00
Matthias Krüger 759d4e8651
Rollup merge of #110277 - Ezrashaw:combine-assoc-fns-dlint, r=lcnr
dead-code-lint: de-dup multiple unused assoc functions

Fixes #109600

Prior art: #97853
2023-04-13 21:58:38 +02:00
Matthias Krüger e86de74c27
Rollup merge of #110265 - KittyBorgX:master, r=ozkanonur
Automatically update the LLVM submodule for musl target (and other places)

Fixes #109987
2023-04-13 21:58:38 +02:00
Matthias Krüger e413c2e770
Rollup merge of #110259 - ndrewxie:issue-109964-fix-gitstuff, r=cjgillot
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-13 21:58:37 +02:00
Matthias Krüger e85ecbbcdc
Rollup merge of #110233 - nbdd0121:intrinsic, r=tmiasko
Make rust-intrinsic ABI unwindable

Fix #104451, fix https://github.com/rust-lang/miri/issues/2839

r? `@RalfJung`
2023-04-13 21:58:37 +02:00
Matthias Krüger 232eb698ed
Rollup merge of #110193 - compiler-errors:body-owner-issue, r=WaffleLapkin
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-13 21:58:36 +02:00
Matthias Krüger d146211c64
Rollup merge of #109036 - chenyukang:yukang/fix-testcase, r=jyn514
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-13 21:58:35 +02:00
Guillaume Gomez 80c4323217 Add test to ensure that compiler built-in proc-macro are considered as such 2023-04-13 20:35:05 +02:00
Scott McMurray d374620de4 Add `tidy-alphabetical` to features in `alloc` & `std`
So that people have to keep them sorted in future, rather than just sticking them on the end where they conflict more often.
2023-04-13 11:05:02 -07:00
Maybe Waffle 09a8791d42 Implement `Copy` for `LocationDetail` 2023-04-13 18:04:30 +00:00
Ben Kimock 4061eb5897 Only emit alignment checks if we have a panic_impl 2023-04-13 10:58:00 -04:00
bors e4dae0dac7 Auto merge of #110079 - fee1-dead-contrib:bump-futures, r=Mark-Simulacrum
bump `futures` to use syn 2.0

cc #109302
2023-04-13 14:28:24 +00:00
Ezra Shaw 2bafc0fcee
bless the single test 2023-04-14 00:06:21 +12:00
bors e14b81f10d Auto merge of #109989 - ids1024:m68k-asm, r=Amanieu
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-13 11:41:57 +00:00
Ezra Shaw 39e23ef532
impl reviewer feedback
- remove unused (pun intentional) `continue`
- improve wording with assoc items in general
2023-04-13 23:39:14 +12:00
Gary Guo b07a470d1a Add regression test 2023-04-13 12:35:12 +01:00
Guillaume Gomez 5e51b2d968 Correctly handle built-in compiler proc-macros as proc-macro and not macro 2023-04-13 13:19:56 +02:00
Ezra Shaw c41dcac8e8
dead-code-lint: de-dup multiple unused assoc fns 2023-04-13 22:42:47 +12:00
Gary Guo 731c6dcb60 Document catch_fn in r#try cannot unwind 2023-04-13 11:36:22 +01:00
bors fab99073b0 Auto merge of #110275 - matthiaskrgr:rollup-8ntb3o5, r=matthiaskrgr
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-13 09:22:24 +00:00
Matthias Krüger b14730f667
Rollup merge of #110262 - justincredible:patch-1, r=ChrisDenton
Update unwind_safe.rs

Typo in the documentation.
2023-04-13 11:21:06 +02:00
Matthias Krüger 209e6d99e9
Rollup merge of #110234 - marc0246:btree-insert-after-fix, r=cuviper
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-13 11:21:06 +02:00
Matthias Krüger 6f1500aec2
Rollup merge of #110220 - lcnr:regionzz, r=compiler-errors
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-13 11:21:05 +02:00
Matthias Krüger 35c4ea59a5
Rollup merge of #110218 - nnethercote:rm-ToRegionVid, r=compiler-errors
Remove `ToRegionVid`

r? ```@compiler-errors```
2023-04-13 11:21:01 +02:00
Matthias Krüger 958413cc08
Rollup merge of #110195 - compiler-errors:issue-110052, r=aliemjay
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-13 11:21:00 +02:00
Matthias Krüger 6161fb8c65
Rollup merge of #110072 - joshtriplett:stabilize-is-terminal, r=Mark-Simulacrum
Stabilize IsTerminal

FCP completed in https://github.com/rust-lang/rust/issues/98070 .

closes: https://github.com/rust-lang/rust/issues/98070
2023-04-13 11:21:00 +02:00
Ezra Shaw 03cf0e949f
refactor: emit "unused assoc fn" in lexical order
with repect to other dead code lints
2023-04-13 20:53:32 +12:00
Scott McMurray 74076684a2 Add `tidy-alphabetical` to features in `core`
So that people have to keep them sorted in future.
2023-04-13 00:36:40 -07:00
bors d37e2f74af Auto merge of #109786 - estebank:tweak-add-line-sugg, r=compiler-errors
Tweak output for 'add line' suggestion

Closes #108174
2023-04-13 07:02:53 +00:00
Krishna Ramasimha 1e2f0d2469 automatically update the LLVM submodule 2023-04-13 10:31:29 +05:30
Nicholas Nethercote c18773a286 Make `mk_bound_region` closure more generic.
This is necessary for the subsequent commits.
2023-04-13 14:47:14 +10:00
Nicholas Nethercote 722e07854a Remove useless match. 2023-04-13 14:47:14 +10:00
bors a29dada983 Auto merge of #108283 - the8472:remove-splice-into-pipe, r=ChrisDenton
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-13 04:03:10 +00:00
Nicholas Nethercote 72605cd267 Remove some unused type folders.
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-13 12:20:44 +10:00