Santiago Pastorino
bc9ffbeb50
Implement param_env for RPITITs assoc type
2023-03-06 14:49:48 -03:00
Santiago Pastorino
47860ddf58
Add is_impl_trait_in_trait
2023-03-06 14:49:43 -03:00
Michael Goulet
16e2b9f662
Place binder correctly for arbitrary trait bound suggestion
2023-03-06 16:37:34 +00:00
Santiago Pastorino
c2238527e6
Add tcx::lower_impl_trait_in_trait_to_assoc_ty to avoid accessing through sess.opts.unstable_opts
2023-03-06 11:35:17 -03:00
Camille GILLOT
c90fc105cb
Querify early_lint_checks.
2023-03-06 11:26:29 +00:00
Camille GILLOT
b7e2b049f3
Querify registered_tools.
2023-03-06 10:56:23 +00:00
Matthias Krüger
970f263156
Rollup merge of #108770 - GuillaumeGomez:improve-doc-and-naming, r=cjgillot
...
Improve documentation and argument naming of some TyCtxt methods
I got bit by this recently so better prevent others to end up the same as me.
2023-03-05 20:57:22 +01:00
Guillaume Gomez
1836fe44b5
Improve documentation and argument naming of some TyCtxt methods
2023-03-05 13:35:13 +01:00
bors
0d439f8181
Auto merge of #108351 - petrochenkov:rmdit, r=cjgillot
...
rustc_middle: Remove trait `DefIdTree`
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-05 10:37:02 +00:00
bors
276b75a843
Auto merge of #108732 - Dylan-DPC:rollup-dy1l8sx, r=Dylan-DPC
...
Rollup of 6 pull requests
Successful merges:
- #108298 (Fix ICE: check if snippet is `)`)
- #108405 (Lazily compute crate name for consider_optimizing)
- #108656 (Rustdoc search: Emit an error for unclosed generic)
- #108660 (Remove ne implementations from strings)
- #108669 (Allow checking whether a type allows being uninitialized)
- #108727 (rustc_expand: make proc-macro derive error translatable)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-04 11:44:02 +00:00
Dylan DPC
6ce78a31d8
Rollup merge of #108669 - Nilstrieb:query-my-uninitness, r=compiler-errors
...
Allow checking whether a type allows being uninitialized
This is useful for clippy ([rust-lang/clippy#10407 ](https://github.com/rust-lang/rust-clippy/issues/10407 )) and for the future `MaybeUninit::assume_init` panics (#100423 ).
2023-03-04 15:24:39 +05:30
Dylan DPC
832dab3798
Rollup merge of #108405 - Nilstrieb:lazy-crate-name-optimization-fuel, r=WaffleLapkin
...
Lazily compute crate name for consider_optimizing
The extra query is unnecessary in the common case of not having fuel.
2023-03-04 15:24:37 +05:30
bors
01b7a6a9ea
Auto merge of #108689 - compiler-errors:normalization-error-smaller, r=lcnr
...
Remove `NormalizationError::ConstantKind`
No longer in use by `TryNormalizeAfterErasingRegionsFolder` (as of #102355 / e8150fa60c it seems). It's making `LayoutError`, etc. kinda large -- that was noticed by `@zoxc.`
2023-03-04 09:03:23 +00:00
Ali MJ Al-Nasrawy
97381d2f1e
tweak ClosureOutlivesSubjectTy
2023-03-04 11:19:56 +03:00
John Kåre Alsaker
1ccb1de599
Place size limits on query keys and values
2023-03-04 01:46:26 +01:00
Matthias Krüger
01fc5a7653
Rollup merge of #108694 - est31:backticks_matchmaking_comments, r=Nilstrieb
...
Match unmatched backticks in compiler/ comments
r? ``@Nilstrieb`` as per [advice](https://github.com/rust-lang/rust/pull/108685#issuecomment-1453018499 )
2023-03-03 20:06:30 +01:00
Matthias Krüger
846424d15f
Rollup merge of #108685 - est31:backticks_matchmaking, r=petrochenkov
...
Match unmatched backticks in compiler/
Found with GNU grep:
```
grep -rEn '^(([^`]*`){2})*[^`]*`[^`]*$' compiler/ | rg -v '\s*[//]?.{1,2}```'
```
2023-03-03 20:06:29 +01:00
Matthias Krüger
4f49352e92
Rollup merge of #107981 - lcnr:canonicalization-uwu, r=compiler-errors
...
new solver: implement canonicalization and region constraints
see the corresponding rustc-dev-guide chapter: https://rustc-dev-guide.rust-lang.org/solve/canonicalization.html
r? ``@compiler-errors``
2023-03-03 20:06:26 +01:00
lcnr
a15abea931
canonicalization
2023-03-03 12:45:03 +01:00
Ali MJ Al-Nasrawy
09524bfd5a
promote subject even if it has unnamed regions
...
Don't require a region to have an `external_name` in order to be
promoted.
2023-03-03 14:04:50 +03:00
est31
ef658907a5
Match end user facing unmatched backticks in compiler/
2023-03-03 08:39:36 +01:00
est31
6df5ae4fb0
Match unmatched backticks in comments in compiler/
2023-03-03 08:39:00 +01:00
est31
ff2c609d66
Match unmatched backticks in compiler/ that are part of rustdoc
2023-03-03 08:39:00 +01:00
Michael Goulet
a43b554259
Remove NormalizationError::ConstantKind
2023-03-03 02:25:31 +00:00
Matthias Krüger
7c4e9dd63d
Rollup merge of #108624 - Nilstrieb:move-it-up, r=WaffleLapkin
...
Make `ExprKind` the first field in `thir::Expr`
This makes its `Debug` impl print it first which is useful, as it's the most important part when looking at an expr.
2023-03-02 23:05:30 +01:00
Matthias Krüger
f75f440bbf
Rollup merge of #108022 - CraftSpider:align-bytes, r=oli-obk
...
Support allocations with non-Box<[u8]> bytes
This is prep work for allowing miri to support passing pointers to C code, which will require `Allocation`s to be correctly aligned. Currently, it just makes `Allocation` generic and plumbs the necessary changes through the right places.
The follow-up to this will be adding a type in the miri interpreter which correctly aligns the bytes, using that for the Miri engine, then allowing Miri to pass pointers into these allocations to C calls.
Based off of #100467 , credit to ```@emarteca``` for the code
2023-03-02 23:05:27 +01:00
Vadim Petrochenkov
c83553da31
rustc_middle: Remove trait DefIdTree
...
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-02 23:46:44 +04:00
Nilstrieb
10a69de5fd
Allow checking whether a type allows being uninitialized
...
This is useful for clippy and for the future `MaybeUninit::assume_init`
panics.
2023-03-02 18:33:48 +00:00
Nilstrieb
e3d397a5f6
Make ExprKind the first field in thir::Expr
...
This makes its `Debug` impl print it first which is useful, as it's the
most important part when looking at an expr.
2023-03-02 18:21:44 +00:00
Rune Tynan
f26b0a2948
Format
2023-03-01 20:27:03 -05:00
Santiago Pastorino
811a1cabda
Make associated_item_def_ids for traits use an unstable option to also return associated types for RPITITs
2023-03-01 12:56:39 -03:00
Santiago Pastorino
5295de1694
Add opt_rpitit_info query
2023-03-01 12:56:38 -03:00
Michael Woerister
04e5fa3ce2
Remove last instances of HashSet in query result types.
2023-03-01 10:20:45 +01:00
Michael Woerister
422208ae52
Use UnordSet instead of FxHashSet for names_imported_by_glob_use query.
2023-03-01 10:20:43 +01:00
Michael Woerister
ee8bc5b0b2
Use FxIndexSet instead of FxHashSet for asm_target_features query.
2023-03-01 10:19:26 +01:00
Michael Woerister
b0202d9c2c
Use LocalDefIdSet/Map instead of FxHashSet/Map for live_symbols_and_ignored_derived_traits query.
2023-03-01 10:19:26 +01:00
Michael Woerister
f0eadbafd4
Use LocalDefIdSet instead of FxHashSet for reachable_set query.
2023-03-01 10:19:25 +01:00
Michael Woerister
5ff00f96e6
Use DefIdMap instead of FxHashMap for impl_item_implementor_ids query.
2023-03-01 10:19:25 +01:00
bors
bcb610da7f
Auto merge of #108587 - matthiaskrgr:rollup-rw6po59, r=matthiaskrgr
...
Rollup of 10 pull requests
Successful merges:
- #108376 (compiler/rustc_session: fix sysroot detection logic)
- #108400 (add llvm cgu instructions stats to perf)
- #108496 (fix #108495 , postfix decrement and prefix decrement has no warning)
- #108505 (Further unify validity intrinsics)
- #108520 (Small cleanup to `one_bound_for_assoc_type`)
- #108560 (Some `infer/mod.rs` cleanups)
- #108563 (Make mailmap more correct)
- #108564 (Fix `x clean` with specific paths)
- #108571 (Add contains_key to SortedIndexMultiMap)
- #108578 (Update Fuchsia platform team members)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-01 06:23:19 +00:00
Matthias Krüger
5af16c1655
Rollup merge of #108505 - Nilstrieb:further-unify-validity-intrinsics, r=michaelwoerister
...
Further unify validity intrinsics
Also merges the inhabitedness check into the query to further unify the
code paths.
Depends on #108364
2023-03-01 01:21:57 +01:00
Rune Tynan
3a87a18857
Make zeroed return an Option
2023-02-28 15:39:17 -05:00
Michael Goulet
ecac8fd5af
Descriptive error when users try to combine RPITIT/AFIT with specialization
2023-02-28 02:03:43 +00:00
bors
6290ae92b2
Auto merge of #108487 - cjgillot:no-typeck-mir, r=oli-obk
...
Avoid invoking typeck from borrowck
This PR attempts to reduce direct dependencies between typeck and MIR-related queries. The goal is to have all the information transit either through THIR or through dedicated queries that avoid depending on the whole `TypeckResults`.
In a first commit, we store the type information that MIR building requires into THIR. This avoids edges between mir_built and typeck.
In the second and third commit, we wrap informations around closures (upvars, kind origin and user-provided signature) to avoid borrowck depending on typeck information.
There should be a single remaining borrowck -> typeck edge in the good path, due to inline consts.
2023-02-27 21:48:10 +00:00
Camille GILLOT
0422f44dc4
Update MIR doc.
2023-02-27 19:25:17 +00:00
Camille GILLOT
dd582bd7db
Implement checked Shl/Shr at MIR building.
2023-02-27 19:25:16 +00:00
bors
7281249a19
Auto merge of #108538 - matthiaskrgr:rollup-vw6h5ea, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- #104265 (Move IpAddr, SocketAddr and V4+V6 related types to `core`)
- #107110 ([stdio][windows] Use MBTWC and WCTMB)
- #108308 (Allow building serde and serde_derive in parallel)
- #108363 (Move the unused extern crate check back to the resolver.)
- #108519 (Bages for easy access links to Rust community)
- #108522 (Commit some new solver tests)
- #108523 (Avoid `&str` to `String` conversions)
- #108533 (diagnostics: avoid querying `associated_item` in the resolver)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-27 18:02:10 +00:00
Matthias Krüger
660f184966
Rollup merge of #108363 - cjgillot:unused-crate, r=WaffleLapkin
...
Move the unused extern crate check back to the resolver.
It doesn't have anything to do in `rustc_hir_typeck`.
2023-02-27 18:48:49 +01:00
bors
f540a25745
Auto merge of #108493 - cjgillot:thir-print, r=compiler-errors
...
Move THIR printing to rustc_mir_build.
https://github.com/rust-lang/rust/pull/107451 increased the compilation time of `rustc_middle` by 10% = 3s.
As https://github.com/rust-lang/rust/pull/107006 adds quite a lot of code to rustc_middle, I suspect it to be the cause.
This PR moves the THIR printing code to `rustc_mir_build`, where the query provider lives, in order to benefit from higher parallelism when compiling rustc.
2023-02-27 15:07:47 +00:00
Nilstrieb
5f593da4e6
Unify all validity check intrinsics
...
Also merges the inhabitedness check into the query to further unify the
code paths.
2023-02-27 13:30:44 +00:00
Matthias Krüger
abc82484d4
Rollup merge of #108486 - cjgillot:owner-ditem, r=Nilstrieb
...
Merge diagnostic_items duplicate diagnostics
To deduplicate how we diagnose duplication.
2023-02-27 06:11:53 +01:00