bors
fd815a5091
Auto merge of #104610 - ouz-a:revert-overflow, r=compiler-errors
...
Reverts check done by #100757
As my `fix` caused more issues than it resolved it's better to revert it.
( #103274 #104322 https://github.com/rust-lang/rust/issues/104606 )
r? `@compiler-errors`
Reopens #95134
2022-11-24 03:29:04 +00:00
Michael Goulet
b60b76c9dd
Adjust tests
2022-11-24 02:36:46 +00:00
Michael Goulet
8f79fc24e3
Properly handle Pin<&mut dyn* Trait>
receiver in codegen
2022-11-24 01:10:25 +00:00
Michael Goulet
c620a972f3
Disable dyn* upcasting
2022-11-24 01:10:24 +00:00
Weihang Lo
433d471a1a
rustc_codegen_ssa: write .dwp
in a streaming fashion
2022-11-24 00:59:04 +00:00
Michael Howell
97d95d48e2
lint: do not warn unused parens around higher-ranked function pointers
...
Fixes #104397
2022-11-23 17:57:11 -07:00
bors
872631d0f0
Auto merge of #104507 - WaffleLapkin:asderefsyou, r=wesleywiser
...
Use `as_deref` in compiler (but only where it makes sense)
This simplifies some code :3
(there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
2022-11-24 00:17:35 +00:00
Vadim Petrochenkov
47cd844468
effective visibility: Stop recalculating current private visibility
...
It becomes relatively expensive if done often and shows up during perf profiling.
2022-11-24 01:30:58 +03:00
Vadim Petrochenkov
7e76d94a22
effective visibility: Always add table entries for nodes used as parents
...
Previously if the parent was not in the table, and there was nothing to inherit from, the child's private visibility was used, but that's not correct - the parent may have a larger visibility so we should set it to at least the parent's private visibility.
That parent's private visibility is also inserted into the table for caching, so it's not recalculated later if used again.
2022-11-24 01:28:41 +03:00
Nicholas Bishop
bed85a4246
unstable-book: Add page for the abi_efiapi
feature
2022-11-23 16:32:53 -05:00
Michael Howell
2185f49ff1
rustdoc: simplify .search-results-title
CSS
...
By using `display: flex`, we still get the never-wrapping layout with
`#crate-search-div` maxing out and truncating its text. The title itself
winds up always filling its parent, but since `#crate-search` doesn't have
`flex-grow` set, it won't fill available space.
2022-11-23 14:31:09 -07:00
Esteban Küber
78b8d126db
Fix rebase
2022-11-23 13:06:27 -08:00
Vadim Petrochenkov
a45a302be5
effective visibility: Fix private visibility calculation for modules
...
Optimizations removed in the previous commit required this function to behave incorrectly, but now those optimizations are gone so we can fix the bug.
Fixes https://github.com/rust-lang/rust/issues/104249
2022-11-24 00:03:51 +03:00
Vadim Petrochenkov
f0843b89d1
effective visibility: Remove questionable optimizations
...
First, they require eagerly calculating private visibility (current normal module), which is somewhat expensive.
Private visibilities are also lost once calculated, instead of being cached in the table.
Second, I cannot prove that the optimizations are correct.
Maybe they can be partially reinstated in the future in cases when it's cheap and provably correct to do them.
They will also probably be merged into `fn update` in that case.
Partially fixes https://github.com/rust-lang/rust/issues/104249
Fixes https://github.com/rust-lang/rust/issues/104539
2022-11-24 00:03:51 +03:00
Vadim Petrochenkov
3f20f4ac42
effective visibility: Satisfy borrow checker to use resolver lazily from a closure
2022-11-24 00:03:51 +03:00
Maybe Waffle
550319059d
Simplify mutability assert!
s
2022-11-23 20:39:16 +00:00
Maybe Waffle
f9a332a48c
Simplify creation of AutoBorrowMutability
2022-11-23 20:39:16 +00:00
Maybe Waffle
6486ba94a3
random::<Improve<Mutability>>()
2022-11-23 20:39:16 +00:00
Maybe Waffle
4439f1f6a6
Add Mutability::mutably_str
2022-11-23 20:39:16 +00:00
Maybe Waffle
e51cd6e822
Don't accept Mutability
by ref
2022-11-23 20:26:31 +00:00
Maybe Waffle
da40965300
Add Mutability::{is_mut,is_not}
2022-11-23 20:26:31 +00:00
Maybe Waffle
9b9c7d0ecc
Depend on Mutability
ordering
2022-11-23 20:26:31 +00:00
Esteban Küber
0da4c44190
Account for closures
2022-11-23 12:17:48 -08:00
Esteban Küber
3a471b5fd8
Account for x @ y
and suggest ref x @ ref y
2022-11-23 12:17:48 -08:00
Esteban Küber
3c905d4ccd
review comments: inline bindings and fix typo
2022-11-23 12:17:48 -08:00
Esteban Küber
53a711fdeb
Fix rebase
2022-11-23 12:17:48 -08:00
Esteban Küber
5993f5d0f8
Tweak output to account for alternative bindings in the same pattern
2022-11-23 12:17:47 -08:00
Esteban Küber
24f80ea7d7
Fix rustfmt
2022-11-23 12:17:47 -08:00
Esteban Küber
e6e7a6db28
Fix wording
2022-11-23 12:17:47 -08:00
Esteban Küber
d687d46f68
Tweak output in for loops
...
Do not suggest `.clone()` as we already suggest borrowing the iterated
value.
2022-11-23 12:17:47 -08:00
Esteban Küber
c0e481731b
Remove logic duplication
2022-11-23 12:17:47 -08:00
Esteban Küber
42d7174bbc
Extract suggestion logic to its own method
2022-11-23 12:17:47 -08:00
Esteban Küber
14a3d572e6
Use type_implements_trait
2022-11-23 12:17:47 -08:00
Esteban Küber
4f2f59ba6f
Fix clippy code
2022-11-23 12:17:47 -08:00
Esteban Küber
4a51f37bcb
Do not suggest ref
multiple times for the same binding
2022-11-23 12:17:47 -08:00
Esteban Küber
9e72e35ceb
Suggest .clone()
or ref binding
on E0382
2022-11-23 12:17:47 -08:00
bors
70f8737b2f
Auto merge of #104410 - WaffleLapkin:unregress, r=estebank
...
Fix perf regression by correctly matching keywords
This should (hopefully) fix regression from #99918
r? `@estebank`
2022-11-23 19:52:43 +00:00
Maybe Waffle
8195e12dd9
Add Mutability::ref_prefix_str
, order Mutability
, simplify code
2022-11-23 19:36:27 +00:00
Camille GILLOT
fb7d25e978
Separate lifetime ident from resolution in HIR.
2022-11-23 19:33:06 +00:00
Oli Scherer
6c2719a6d6
Bump the const eval step limit
2022-11-23 16:55:57 +00:00
est31
9abd785543
Add regression test for issue 99938
...
That issue was a dupe of 99852, but it's always better to
have multiple regression tests rather than one.
2022-11-23 17:48:00 +01:00
bors
d121aa3b55
Auto merge of #104776 - Dylan-DPC:rollup-rf4c2u0, r=Dylan-DPC
...
Rollup of 6 pull requests
Successful merges:
- #104269 (Fix hang in where-clause suggestion with `predicate_can_apply`)
- #104286 (copy doc output files by format)
- #104509 (Use obligation ctxt instead of dyn TraitEngine)
- #104721 (Remove more `ref` patterns from the compiler)
- #104744 (rustdoc: give struct fields CSS `display: block`)
- #104751 (Fix an ICE parsing a malformed attribute.)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-11-23 16:29:17 +00:00
Maybe Waffle
20f3de5ab1
Use nicer spans for deref_into_dyn_supertrait
2022-11-23 16:12:51 +00:00
Thom Chiovoloni
54a6d4edbc
Add #![deny(unsafe_op_in_unsafe_fn)]
in liballoc tests
2022-11-23 08:10:17 -08:00
Maybe Waffle
0d4a5c725a
Make deref_into_dyn_supertrait
lint the impl and not the usage
2022-11-23 15:40:27 +00:00
Maybe Waffle
11a5386256
Move get_associated_type
from clippy
to rustc_lint
2022-11-23 15:40:27 +00:00
Laurențiu Nicola
37c3521597
⬆️ rust-analyzer
2022-11-23 17:24:03 +02:00
Dylan DPC
5d7b68c82b
Rollup merge of #104751 - nnethercote:fix-104620, r=petrochenkov
...
Fix an ICE parsing a malformed attribute.
Fixes #104620 .
r? `@petrochenkov`
2022-11-23 20:32:38 +05:30
Dylan DPC
a39ed5c3f6
Rollup merge of #104744 - notriddle:notriddle/struct-fields-display-block, r=GuillaumeGomez
...
rustdoc: give struct fields CSS `display: block`
Fixes #104737
2022-11-23 20:32:37 +05:30
Dylan DPC
c03026a7c6
Rollup merge of #104721 - WaffleLapkin:deref-harder, r=oli-obk
...
Remove more `ref` patterns from the compiler
r? `@oli-obk`
Previous PR: https://github.com/rust-lang/rust/pull/104500
2022-11-23 20:32:37 +05:30