Dylan DPC
93177758fc
Rollup merge of #100767 - kadiwa4:escape_ascii, r=jackh726
...
Remove manual <[u8]>::escape_ascii
`@rustbot` label: +C-cleanup
2022-09-12 15:21:30 +05:30
bors
3194958217
Auto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726
...
Implement `std::marker::Tuple`
Split out from #99943 (https://github.com/rust-lang/rust/pull/99943#pullrequestreview-1064459183 ).
Implements part of rust-lang/compiler-team#537
r? `@jackh726`
2022-09-12 03:24:29 +00:00
bors
fa521a4691
Auto merge of #101688 - cjgillot:verify-hir-parent, r=petrochenkov
...
Assert that HIR nodes are not their own parent.
Fixes https://github.com/rust-lang/rust/issues/101505 .
Replaces #101513
r? `@petrochenkov` `@nnethercote`
2022-09-12 00:41:56 +00:00
Camille GILLOT
51f486931f
Assert that HIR nodes are not their own parent.
2022-09-11 20:12:51 +02:00
bors
2287107588
Auto merge of #98559 - jackh726:remove-reempty, r=oli-obk
...
Remove ReEmpty
r? rust-lang/types
2022-09-10 20:54:01 +00:00
Dylan DPC
2386ed9962
Rollup merge of #101578 - lcnr:resolve-hack, r=jackh726
...
remove bound var hack in `resolve`
somehow dropped that change from #98900 .
r? `@jackh726`
2022-09-10 18:56:07 +05:30
Dylan DPC
ae4973281b
Rollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU
...
update `ParamKindOrd`
https://github.com/rust-lang/rust/pull/90207#discussion_r767160854 😁
writing comments "for future prs" sure works well :3
r? `@BoxyUwU`
2022-09-09 22:02:18 +05:30
lcnr
c63020a7c3
rename codegen_fulfill_obligation
2022-09-09 13:36:27 +02:00
bors
4a09adf99f
Auto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #99207 (Enable eager checks for memory sanitizer)
- #101253 (fix the suggestion of format for asm_sub_register)
- #101450 (Add `const_extern_fn` to 1.62 release notes.)
- #101556 (Tweak future opaque ty pretty printing)
- #101563 (Link UEFI target documentation from target list)
- #101593 (Cleanup themes (tooltip))
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-09 06:24:25 +00:00
Matthias Krüger
bdfbc3597b
Rollup merge of #101556 - compiler-errors:tweak-generator-print, r=jackh726
...
Tweak future opaque ty pretty printing
1. The `Return` type of a generator doesn't need to be a lang item just for diagnostic printing of types
2. We shouldn't suppress the `Output = Ty` of a opaque future if the type is a int or float var.
2022-09-09 07:02:32 +02:00
Michael Goulet
270b776ef9
Adjust pretty printing of RPITITs
2022-09-09 01:31:46 +00:00
Camille GILLOT
05812df603
Handle generic parameters.
2022-09-09 01:31:46 +00:00
Michael Goulet
cdf78073c5
Deeply check that method signatures match, and allow for nested RPITITs
2022-09-09 01:31:46 +00:00
Michael Goulet
d34cb98fb0
Lower RPITIT to ImplTraitPlaceholder item
2022-09-09 01:31:44 +00:00
Michael Goulet
78b962a4f3
RPITIT placeholder items
2022-09-09 01:31:44 +00:00
Jack Huey
1ca9eb8ec3
Remove ReEmpty
2022-09-08 20:55:55 -04:00
Jack Huey
e7e5feb637
In ReverseMapper, don't fallback to ReEmpty, instead ReStatic
2022-09-08 17:57:34 -04:00
Ellen
ef36af2f9d
ptr: 43276834268743978
2022-09-08 21:09:23 +01:00
Dylan DPC
720a82dd52
Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obk
...
Remove unnecessary `PartialOrd` and `Ord`
2022-09-08 20:48:38 +05:30
Dylan DPC
b5ffbd32d4
Rollup merge of #101424 - compiler-errors:operator-err-sugg, r=TaKO8Ki
...
Adjust and slightly generalize operator error suggestion
(in no particular order)
* Stop passing around a whole extra `ProjectionPredicate`
* Add spaces around `=` in `Trait<..., Output = Ty>` suggestion
* Some code clean-ups, including
* add `lang_item_for_op` to turn a `Op` into a `DefId`
* avoid `SourceMap` because we don't really need to render an expr
* Remove `TypeParamVisitor` in favor of just checking `ty.has_param_types_or_consts` -- this acts a bit differently, but shouldn't cause erroneous suggestions (actually might generalize them a bit)
* We now suggest `Output = Ty` in the `where` clause suggestion when we fail to add `Struct<T>` and `T`.
I can split this out into more PRs if needed, but they're all just miscellaneous generalizations, changes, and nitpicks I saw when messing with this operator code.
2022-09-08 20:48:34 +05:30
Dylan DPC
1561922a12
Rollup merge of #101041 - LuisCardosoOliveira:translation-rename-attr-warning-pt2, r=davidtwco
...
translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Pt. 2
# Description
This is the second part of the `rustc_session` [migration](https://github.com/rust-lang/rust/issues/100717#issuecomment-1220279883 ).
**Please only review this [commit](5018581957
) that belongs to the part 2. The other ones are from the PR [#100753 ](https://github.com/rust-lang/rust/pull/100753 ) that is not yet merged.**
In this PR, we migrate the files `session.rs` and `config.rs`.
Please not that we have to `allow` the lints rules in some functions from `session.rs` because they are (at least I believe) part of the diagnostic machinery.
2022-09-08 20:48:34 +05:30
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
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
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
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
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
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
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
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
Takayuki Maeda
bdc865d8f7
remove unnecessary PartialOrd
and Ord
2022-09-08 06:15:33 +09: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
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
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
e3a738a942
Add instrument and debug calls
2022-09-07 10:46:14 -03: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
Vadim Petrochenkov
d8d3b83e3a
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-07 13:35:41 +04:00
Joshua Nelson
4856affd90
Make HandleCycleError
an enum instead of a macro-generated closure
...
- Add a `HandleCycleError` enum to rustc_query_system, along with a `handle_cycle_error` function
- Move `Value` to rustc_query_system, so `handle_cycle_error` can use it
- Move the `Value` impls from rustc_query_impl to rustc_middle. This is necessary due to orphan rules.
2022-09-06 19:26:08 -05:00
Guillaume Gomez
f21b6129a0
Rollup merge of #101473 - nnethercote:mir-size-assertions, r=lqd
...
Add more size assertions for MIR types.
And move them into a module, as has been done previously for AST, HIR,
etc.
r? `@lqd`
2022-09-06 17:00:30 +02:00
Guillaume Gomez
d13aefdc65
Rollup merge of #101357 - compiler-errors:variant-sugg-tweak, r=oli-obk
...
Include enum path in variant suggestion
(except for `Result` and `Option`, which we should have via the prelude)
Fixes #101356
2022-09-06 17:00:25 +02:00
Oli Scherer
7348284073
Update docs
2022-09-06 14:18:32 +00:00