bors
d0ece44cfa
Auto merge of #102040 - TaKO8Ki:separate-definitions-and-hir-owners, r=cjgillot
...
Separate definitions and HIR owners in the type system
Fixes #83158
r? `@cjgillot`
2022-09-24 22:42:07 +00:00
Ellis Hoag
ac97487645
fix lifetime error
2022-09-24 11:36:16 -07:00
Ellis Hoag
5c7e629b63
rebase and update trait names
2022-09-24 11:06:05 -07:00
Ellis Hoag
6e22c0a8e1
impl SessionDiagnostic for LayoutError and Spanned<T>
2022-09-24 10:25:19 -07:00
Takayuki Maeda
8fe936099a
separate definitions and HIR
owners
...
fix a ui test
use `into`
fix clippy ui test
fix a run-make-fulldeps test
implement `IntoQueryParam<DefId>` for `OwnerId`
use `OwnerId` for more queries
change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24 23:21:19 +09:00
Matthias Krüger
bf167e0ae5
Rollup merge of #102088 - oli-obk:cleanups, r=bjorn3
...
Fix wrongly refactored Lift impl
see https://github.com/rust-lang/rust/pull/101858#issuecomment-1252713639
r? ``@bjorn3``
2022-09-24 14:29:53 +02:00
bors
bb5a016175
Auto merge of #102064 - cjgillot:revert, r=Mark-Simulacrum
...
Revert perf-regression 101620
Reverts #101862 #101620
r? `@Mark-Simulacrum`
2022-09-24 09:36:29 +00:00
Matthias Krüger
a842357d37
Rollup merge of #102152 - compiler-errors:issue-102140, r=fee1-dead
...
Calculate `ProjectionTy::trait_def_id` for return-position `impl Trait` in trait correctly
Fixes #102140
2022-09-24 07:38:56 +02:00
bors
e1c28e0c85
Auto merge of #102068 - cjgillot:erased-lifetime-print, r=eholk
...
Always print '_, even for erased lifetimes.
Explicit lifetime arguments are now the recommended syntax in rust 2018 and rust 2021. This PR applies this discipline to rustc itself.
2022-09-24 01:23:17 +00:00
Camille GILLOT
aac2c7ddd8
Always print '_, even for erased lifetimes.
2022-09-23 18:42:14 +02:00
bors
9a963e3bad
Auto merge of #102056 - b-naber:unevaluated, r=lcnr
...
Introduce mir::Unevaluated
Previously the distinction between unevaluated constants in the type-system and in mir was not explicit and a little confusing. Probably better to introduce its own type for that.
r? `@lcnr`
2022-09-23 13:39:11 +00:00
b-naber
a705e65605
rename Unevaluated to UnevaluatedConst
2022-09-23 14:27:34 +02:00
bors
4d44e09cb1
Auto merge of #102165 - matthiaskrgr:rollup-n5oquhe, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #100734 (Split out async_fn_in_trait into a separate feature)
- #101664 (Note if mismatched types have a similar name)
- #101815 (Migrated the rustc_passes annotation without effect diagnostic infrastructure)
- #102042 (Distribute rust-docs-json via rustup.)
- #102066 (rustdoc: remove unnecessary `max-width` on headers)
- #102095 (Deduplicate two functions that would soon have been three)
- #102104 (Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests)
- #102112 (Allow full relro on powerpc64-unknown-linux-gnu)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-23 09:33:23 +00:00
Matthias Krüger
c2d2535b84
Rollup merge of #101664 - mejrs:similarity, r=fee1-dead
...
Note if mismatched types have a similar name
If users get a type error between similarly named types, it will point out that these are actually different types, and where they were defined.
2022-09-23 04:29:16 +02:00
Michael Goulet
2fa31d3e78
Serialize RPITIT values in libs
2022-09-23 00:56:55 +00:00
Michael Goulet
79c665b2a3
Calculate ProjectionTy::trait_def_id correctly
2022-09-22 19:49:18 +00:00
Matthias Krüger
aa384834d7
Rollup merge of #102133 - b-naber:use-valtrees-in-fast-reject, r=lcnr
...
Use valtrees for comparison
r? `@lcnr`
2022-09-22 21:34:54 +02:00
Matthias Krüger
b93c9a7d37
Rollup merge of #102128 - oli-obk:const_unification, r=lcnr
...
Const unification is already infallible, remove the error handling logic
r? `@lcnr`
is this expected to be used in the future? Right now it is dead code.
2022-09-22 21:34:53 +02:00
Camille GILLOT
fc43df0333
Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk"
...
This reverts commit 2cb9a65684
, reversing
changes made to 750bd1a7ff
.
2022-09-22 19:36:11 +02:00
Camille GILLOT
381bd2a836
Revert "Auto merge of #101862 - cjgillot:lint-regression, r=oli-obk"
...
This reverts commit bc7b17cfe3
, reversing
changes made to 5253b0a0a1
.
2022-09-22 19:34:01 +02:00
b-naber
e8594257f6
use valtrees for comparison
2022-09-22 13:10:53 +02:00
b-naber
efb908991b
address review
2022-09-22 12:35:29 +02:00
b-naber
9f3784df89
introduce mir::Unevaluated
2022-09-22 12:35:28 +02:00
Oli Scherer
13438ee29c
Const unification is already infallible, remove the error handling logic
2022-09-22 08:20:13 +00:00
bors
7a8636c843
Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, r=oli-obk
...
Require `#[const_trait]` on `Trait` for `impl const Trait`
r? `@oli-obk`
2022-09-22 04:22:24 +00:00
Jhonny Bill Mena
e52e2344dc
FIX - adopt new Diagnostic naming in newly migrated modules
...
FIX - ambiguous Diagnostic link in docs
UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic
[Gardening] FIX - formatting via `x fmt`
FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way
DELETE - unneeded allow attributes in Handler method
FIX - broken test
FIX - Rebase conflict
UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21 11:43:22 -04:00
Jhonny Bill Mena
5f91719f75
UPDATE - rename SessionSubdiagnostic macro to Subdiagnostic
...
Also renames:
- sym::AddSubdiagnostic to sym:: Subdiagnostic
- rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21 11:39:53 -04:00
Jhonny Bill Mena
a3396b2070
UPDATE - rename DiagnosticHandler macro to Diagnostic
2022-09-21 11:39:53 -04:00
Jhonny Bill Mena
19b348fed4
UPDATE - rename DiagnosticHandler trait to IntoDiagnostic
2022-09-21 11:39:52 -04:00
Oli Scherer
37928f5986
Neither require nor imply lifetime bounds on opaque type for well formedness
2022-09-21 13:11:54 +00:00
Oli Scherer
3e6c9e5a19
Fix wrongly refactored Lift impl
2022-09-21 08:29:19 +00:00
bors
432abd86f2
Auto merge of #102061 - notriddle:rollup-kwu9vp8, r=notriddle
...
Rollup of 12 pull requests
Successful merges:
- #100250 (Manually cleanup token stream when macro expansion aborts.)
- #101014 (Fix -Zmeta-stats ICE by giving `FileEncoder` file read permissions)
- #101958 (Improve error for when query is unsupported by crate)
- #101976 (MirPhase: clarify that linting is not a semantic change)
- #102001 (Use LLVM C-API to build atomic cmpxchg and fence)
- #102008 (Add GUI test for notable traits element position)
- #102013 (Simplify rpitit handling on lower_fn_decl)
- #102021 (some post-valtree cleanup)
- #102027 (rustdoc: remove `docblock` class from `item-decl`)
- #102034 (rustdoc: remove no-op CSS `h1-6 { border-bottom-color }`)
- #102038 (Make the `normalize-overflow` rustdoc test actually do something)
- #102053 (⬆️ rust-analyzer)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-20 19:10:11 +00:00
Michael Howell
b149c48186
Rollup merge of #102021 - lcnr:tyConst-fun, r=b-naber,BoxyUwU
...
some post-valtree cleanup
r? project-const-generics cc ```@b-naber```
2022-09-20 10:13:01 -07:00
Michael Howell
0d2e57cb04
Rollup merge of #101976 - RalfJung:mir-semantic-phases, r=oli-obk
...
MirPhase: clarify that linting is not a semantic change
r? ```@JakobDegen```
2022-09-20 10:12:58 -07:00
Michael Howell
2c893737a6
Rollup merge of #101958 - hanar3:101666/enhance-error-message, r=oli-obk
...
Improve error for when query is unsupported by crate
This is an improvement to the error message mentioned on #101666 . It seems like a good idea to also add [this link to the rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/query.html ), if explaining the query system in detail is a concern here, but I'm unsure if there is any restrictions on adding links to error messages.
2022-09-20 10:12:58 -07:00
bors
cd8cc91045
Auto merge of #101989 - fee1-dead-contrib:const_trait_impl-assoc-caller-bounds, r=oli-obk
...
make projection bounds with const bounds satisfy const
Fixes #101982 .
2022-09-20 16:24:36 +00:00
bors
4136b59b7d
Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank
...
Allow patterns to constrain the hidden type of opaque types
fixes #96572
reverts a revert as original PR was a perf regression that was fixed by reverting it: https://github.com/rust-lang/rust/pull/99368#issuecomment-1186587864 )
TODO:
* check if https://github.com/rust-lang/rust/issues/99685 is avoided
2022-09-20 12:09:52 +00:00
Oli Scherer
f841f1b443
Retry with inlining attributes
2022-09-20 09:30:07 +00:00
Matthias Krüger
7697a244cc
Rollup merge of #101881 - TaKO8Ki:remove-unused-struct-field, r=sanxiyn
...
Remove an unused struct field `late_bound`
2022-09-19 17:55:19 +02:00
mejrs
c65866000e
Incorporate feedback
2022-09-19 17:19:45 +02:00
lcnr
c54c5a3c77
DestructuredConst
split mir and ty
2022-09-19 17:00:38 +02:00
lcnr
638b612154
remove ty::Const::from_inline_const
2022-09-19 16:10:18 +02:00
Oli Scherer
18ab705073
Actually visit/fold the types inside CanonicalVarInfos
2022-09-19 14:00:34 +00:00
lcnr
0c3e01d8f6
extend polymorphization hack comment.
2022-09-19 11:44:29 +02:00
lcnr
647052fc04
remove the Subst
trait, always use EarlyBinder
2022-09-19 11:37:27 +02:00
lcnr
d398b54de6
do not implement type traversal for EarlyBinder
2022-09-19 11:28:32 +02:00
bors
efa717bc2d
Auto merge of #101924 - jackh726:revert-static-hrtb-error, r=compiler-errors
...
Re-add HRTB implied static bug note
r? `@compiler-errors` since you reviewed it previously
I deleted a `normalize` call and forgot about it. Whoops.
2022-09-19 04:56:14 +00:00
Deadbeef
ee96ae0a32
make projection bounds with const bounds satisfy const
2022-09-18 18:05:30 +00:00
Ralf Jung
eed6fdb0eb
clarify that linting is not a semantic change
2022-09-18 14:14:42 +02:00
bors
bc7b17cfe3
Auto merge of #101862 - cjgillot:lint-regression, r=oli-obk
...
Do not fetch HIR node when iterating to find lint.
Addresses the regression in https://github.com/rust-lang/rust/pull/101620
2022-09-18 00:46:14 +00:00