Dylan DPC
d392838b69
Rollup merge of #98933 - oli-obk:opaque_type_late_bound_lifetimes, r=lcnr
...
Opaque types' generic params do not imply anything about their hidden type's lifetimes
fixes #97104
cc ```@aliemjay```
2022-09-08 20:48:34 +05:30
lcnr
b79a2b3f73
update ParamKindOrd
2022-09-08 16:50:44 +02:00
bors
24d6992020
Auto merge of #101467 - nnethercote:shrink-hir-Ty-Pat, r=spastorino
...
Shrink `hir::Ty` and `hir::Pat`
r? `@ghost`
2022-09-08 13:11:57 +00:00
Yiming Lei
28c62d28de
fix the suggestion of format for asm_sub_register
...
modified: compiler/rustc_typeck/src/check/intrinsicck.rs
modified: src/test/ui/asm/bad-template.aarch64_mirunsafeck.stderr
modified: src/test/ui/asm/bad-template.aarch64_thirunsafeck.stderr
modified: src/test/ui/asm/bad-template.x86_64_mirunsafeck.stderr
modified: src/test/ui/asm/bad-template.x86_64_thirunsafeck.stderr
modified: src/test/ui/asm/type-check-1.rs
modified: src/test/ui/asm/type-check-1.stderr
modified: src/test/ui/asm/x86_64/type-check-3.stderr
2022-09-08 04:12:13 -07:00
bors
ccb5595df2
Auto merge of #98900 - lcnr:region-stuff, r=jackh726
...
const_generics: correctly deal with bound variables
removes the hack in `resolve` which was needed because we evaluated constants without caring about their bound variables.
Each commit should be fairly self-contained, even if they build on each other
r? `@jackh726`
2022-09-08 10:30:00 +00:00
Luis Cardoso
0e497a714e
translations(rustc_session): migrates two diagnostics in session.rs
2022-09-08 12:22:51 +02:00
lcnr
e6660326a3
bound variables during ctfe are a bug
2022-09-08 11:41:00 +02:00
lcnr
d15b00af48
don't evaluate with escaping bound vars
2022-09-08 11:41:00 +02:00
lcnr
01adb7e98d
stop evaluating constants in Relate
2022-09-08 11:14:33 +02:00
lcnr
060f3e0c65
generalize: no need to cache errors
2022-09-08 11:14:33 +02:00
Oli Scherer
64d11fc8e3
Clarify some diagnostic messages
2022-09-08 08:10:21 +00:00
Oli Scherer
5c9d28d303
Opaque types' generic params do not imply anything about their hidden type's lifetimes
2022-09-08 08:10:21 +00:00
yukang
ddb225f1f5
fixes #101477 : Recover from typo where == is used in place of =
2022-09-08 15:14:18 +08:00
Luis Cardoso
24de9435e2
translations(rustc_session): remove lint allow rule to the methods marked with rustc_lint_diagnostic
...
This commit removes the allows rules for the SessionDiagnostic lint
that were being used in the session.rs file.
Thanks to the PR #101230 we do not need to annotate the methods with
the allow rule as they are part of the diagnostic machinery.
2022-09-08 08:30:57 +02:00
Luis Cardoso
0f06320c24
translations(rustc_session): migrate TargetDataLayout::parse
2022-09-08 08:30:57 +02:00
Luis Cardoso
60b49581c4
translations(rustc_session): migrates session.rs and config.rs
2022-09-08 08:30:57 +02:00
Dylan DPC
7f46d7313c
Rollup merge of #101549 - eholk:type-ir-derive-hashstable_generic, r=jackh726
...
Use HashStable_Generic in rustc_type_ir
A lot of the types in this crate implemented HashStable directly to avoid circular dependencies. One way around that is to use HashStable_Generic. We adopt that here to avoid a lot of boilerplate.
This doesn't update all the types, because some would require `I: Interner + HashStable`.
r? `@cjgillot`
2022-09-08 11:55:10 +05:30
Dylan DPC
12b810063d
Rollup merge of #101498 - petrochenkov:visparam, r=cjgillot
...
rustc: Parameterize `ty::Visibility` over used ID
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
2022-09-08 11:55:09 +05:30
Dylan DPC
0d61a507f5
Rollup merge of #101399 - cjgillot:borrowck-binding-span, r=estebank
...
Shrink span for bindings with subpatterns.
Bindings with nested patterns (`binding @ pat` syntax) currently point to the full pattern. This PR proposes to shrink the span to stop before the ````@`.``` This makes the diagnostics for move/mutability conflicts clearer, as they not point to the `binding` only, instead of the full pat.
r? ```@estebank```
2022-09-08 11:55:06 +05:30
Dylan DPC
e3ea8008cc
Rollup merge of #101153 - IntQuant:issue-100717-infer-2, r=davidtwco
...
Migrate another part of rustc_infer to session diagnostic
Probably will migrate another file before marking this one as ready-to-merge.
`@rustbot` label +A-translation
r? rust-lang/diagnostics
cc https://github.com/rust-lang/rust/issues/100717
2022-09-08 11:55:06 +05:30
Nicholas Nethercote
e67f39f8bc
Introduce DotDotPos.
...
This shrinks `hir::Pat` from 88 to 72 bytes.
2022-09-08 15:25:50 +10:00
Nicholas Nethercote
4314615ff8
Arena-allocate hir::Lifetime.
...
This shrinks `hir::Ty` from 72 to 48 bytes.
`visit_lifetime` is added to the HIR stats collector because these types
are now stored in memory on their own, instead of being within other
types.
2022-09-08 15:07:19 +10:00
Michael Goulet
97668a5589
We can print futures with {integer} too
2022-09-08 02:52:57 +00:00
Michael Goulet
2c94102df5
Generator return doesn't need to be a lang item
2022-09-08 02:52:57 +00:00
bors
4af35b8e30
Auto merge of #101303 - jyn514:jnelson/handle-cycle-enum, r=cjgillot
...
Make `HandleCycleError` an enum instead of a macro-generated closure
Helps with https://github.com/rust-lang/rust/issues/96524 . Based on https://github.com/rust-lang/rust/pull/100943 to avoid merge conflicts, so it looks larger than it is (only the last commit is relevant).
cc https://rust-lang.zulipchat.com/#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Moving.20.60Value.60.20to.20rustc_query_system.20.2396524
r? `@cjgillot`
2022-09-08 02:21:16 +00:00
Michael Goulet
48281b003f
Adjust spacing in suggestion, add a test
2022-09-08 02:06:48 +00:00
Michael Goulet
30e3673d43
Add associated item binding to non-param-ty where clause suggestions
2022-09-08 02:06:48 +00:00
Michael Goulet
0dbbf0f493
Remove TypeParamVisitor
2022-09-08 01:54:59 +00:00
Michael Goulet
d0746e8863
Simplify printing operator lang item paths in error message
2022-09-08 01:54:59 +00:00
Michael Goulet
00c9d3d2ee
Avoid source-map call in operator error
2022-09-08 01:54:59 +00:00
bors
512bd84f51
Auto merge of #94075 - mikebenfield:wip-enum, r=oli-obk
...
Use niche-filling optimization even when multiple variants have data.
Fixes #46213
2022-09-07 23:40:06 +00:00
Eric Holk
578fc49fc1
Use HashStable_Generic in rustc_type_ir
...
A lot of the types in this crate implemented HashStable directly to
avoid circular dependencies. One way around that is to use
HashStable_Generic. We adopt that here to avoid a lot of boilerplate.
This doesn't update all the types, because some would require
`I: Interner + HashStable`.
2022-09-07 16:05:06 -07:00
Takayuki Maeda
bdc865d8f7
remove unnecessary PartialOrd and Ord
2022-09-08 06:15:33 +09:00
Santiago Pastorino
36fa12f1a4
Allow lower_lifetime_binder receive a closure
2022-09-07 18:01:01 -03:00
Michael Benfield
d7a750b504
Use niche-filling optimization even when multiple variants have data.
...
Fixes #46213
2022-09-07 20:12:45 +00:00
Michael Benfield
1a08b96a0b
Change name of "dataful" variant to "untagged"
...
This is in anticipation of a new enum layout, in which the niche
optimization may be applied even when multiple variants have data.
2022-09-07 20:12:45 +00:00
Matthias Krüger
41e1830a43
Rollup merge of #101536 - GuillaumeGomez:is_doc_comment-doc, r=lqd
...
Add documentation for Attr::is_doc_comment
The function name is very misleading, some explanations won't hurt.
r? `@lqd`
2022-09-07 21:48:23 +02:00
Matthias Krüger
acb3d11f1b
Rollup merge of #101525 - eltociear:patch-16, r=cjgillot
...
Fix typo in pass_manager.rs
overriden -> overridden
2022-09-07 21:48:20 +02:00
Matthias Krüger
0a1c816dcd
Rollup merge of #101503 - spastorino:add-debug-calls, r=compiler-errors
...
Add debug calls
`@oli-obk` requested this and other changes as a way of simplifying https://github.com/rust-lang/rust/pull/101345 . This is just going to make the diff of https://github.com/rust-lang/rust/pull/101345 smaller.
r? `@oli-obk` `@cjgillot`
2022-09-07 21:48:16 +02:00
Matthias Krüger
c365ce3ffd
Rollup merge of #101502 - TaKO8Ki:do-not-suggest-semicolon-for-macro-without-exclamation-mark, r=wesleywiser
...
Do not suggest a semicolon for a macro without `!`
Fixes a regression in #101490
2022-09-07 21:48:15 +02:00
Matthias Krüger
9361297dfc
Rollup merge of #101493 - spastorino:borrow-mut-impl-trait-context, r=oli-obk
...
Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow
`@oli-obk` requested this and other changes as a way of simplifying #101345 . This is just going to make the diff of #101345 smaller.
r? `@oli-obk` `@cjgillot`
2022-09-07 21:48:14 +02:00
bors
f91ca2878a
Auto merge of #101522 - oli-obk:miriup, r=oli-obk
...
Update miri submodule
fixes #101344
cc `@rust-lang/miri`
r? `@ghost`
2022-09-07 16:31:39 +00:00
Oli Scherer
419c4e1c4f
Update miri submodule
2022-09-07 15:42:12 +00:00
bors
a4d034126d
Auto merge of #101432 - nnethercote:shrink-PredicateS, r=lcnr
...
Shrink `PredicateS`
r? `@ghost`
2022-09-07 13:49:58 +00:00
Santiago Pastorino
d42afd2bd1
Format hir_id_validator error using pretty print
2022-09-07 10:46:17 -03:00
Santiago Pastorino
e3a738a942
Add instrument and debug calls
2022-09-07 10:46:14 -03:00
Krasimir Georgiev
a3b60f1769
llvm-wrapper: adapt for LLVM API changes
...
No functional changes intended.
Adapts PassWrapper for two recent LLVM API changes:
* e7bac3b9fa
* 93600eb50c
* 5e38b2a456
2022-09-07 13:37:59 +00:00
Guillaume Gomez
88fa621bab
Add documentation for Attr::is_doc_comment
2022-09-07 15:34:16 +02:00
Ikko Ashimine
9cef1ee113
Fix typo in pass_manager.rs
...
overriden -> overridden
2022-09-07 19:32:28 +09:00
bors
e7c7aa7288
Auto merge of #98332 - oli-obk:assume, r=wesleywiser
...
Lower the assume intrinsic to a MIR statement
This makes https://github.com/rust-lang/rust/pull/96862#issuecomment-1153739068 easier and will generally allow us to cheaply insert assume intrinsic calls in mir building.
r? rust-lang/wg-mir-opt
2022-09-07 09:47:23 +00:00