about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2023-11-26extract polonius move fact generationRémy Rakic-85/+91
2023-11-26remove useless local variablesRémy Rakic-11/+8
2023-11-26Auto merge of #118256 - petrochenkov:nohir, r=compiler-errorsbors-154/+145
rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup Noticed this while working on https://github.com/rust-lang/rust/pull/118188. The history here is that the method was moved from HIR map to tcx in https://github.com/rust-lang/rust/pull/93373 as a part of incremental compilation work, so it's unlikely to go back.
2023-11-26rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` ↵Vadim Petrochenkov-154/+145
cleanup
2023-11-26Auto merge of #117880 - lqd:liveness-values, r=cjgillotbors-62/+67
Refactor borrowck liveness values This PR starts cleaning up `rustc_borrowck`, in particular around liveness values: - refactors simple names that make no sense anymore: either referring to older structures using region elements, or to bitset containers and values. - improves comments and fixes others - removes unused return values and unneeded generic arguments r? `@matthewjasper`
2023-11-26add successors and their formatterouz-a-31/+165
2023-11-26Auto merge of #118250 - petrochenkov:optdefkind, r=compiler-errorsbors-53/+34
rustc: Make `def_kind` mandatory for all `DefId`s Prerequisite for https://github.com/rust-lang/rust/pull/118188.
2023-11-26Auto merge of #118300 - compiler-errors:rollup-cm3i8fg, r=compiler-errorsbors-400/+257
Rollup of 7 pull requests Successful merges: - #117651 (coverage: Simplify building coverage expressions based on sums) - #117968 (Stabilize `ptr::addr_eq`) - #118158 (Reduce fluent boilerplate) - #118201 (Miscellaneous `ObligationCauseCode` cleanups) - #118288 (Use `is_{some,ok}_and` more in the compiler) - #118289 (`is_{some,ok}_and` for rustdoc) - #118290 (Don't ICE when encountering placeholders in implied bounds computation) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-26Clean dead codesr0cky-252/+4
2023-11-26Auto merge of #117611 - Nadrieril:linear-pass-take-4, r=cjgillotbors-764/+1013
Rewrite exhaustiveness in one pass This is at least my 4th attempt at this in as many years x) Previous attempts were all too complicated or too slow. But we're finally here! The previous version of the exhaustiveness algorithm computed reachability for each arm then exhaustiveness of the whole match. Since each of these steps does roughly the same things, this rewrites the algorithm to do them all in one go. I also think this makes things much simpler. I also rewrote the documentation of the algorithm in depth. Hopefully it's up-to-date and easier to follow now. Plz comment if anything's unclear. r? `@oli-obk` I think you're one of the rare other people to understand the exhaustiveness algorithm? cc `@varkor` I know you're not active anymore, but if you feel like having a look you might enjoy this :D Fixes https://github.com/rust-lang/rust/issues/79307
2023-11-25Rollup merge of #118290 - compiler-errors:placeholder-implied, r=aliemjayMichael Goulet-2/+4
Don't ICE when encountering placeholders in implied bounds computation I *could* fix this the right way, though I don't really want to think about the implications of the change. This should have minimal side-effects. r? `@aliemjay` Fixes #118286
2023-11-25Rollup merge of #118288 - compiler-errors:is_some_and, r=lqd,dtolnayMichael Goulet-13/+21
Use `is_{some,ok}_and` more in the compiler slightly more fluent-reading code
2023-11-25Rollup merge of #118201 - compiler-errors:obligation-causes, r=cjgillotMichael Goulet-39/+5
Miscellaneous `ObligationCauseCode` cleanups Remove some dead code/unused `ObligationCauseCode`s.
2023-11-25Rollup merge of #118158 - nnethercote:reduce-fluent-boilerplate, ↵Michael Goulet-141/+57
r=compiler-errors Reduce fluent boilerplate Best reviewed one commit at a time. r? `@davidtwco`
2023-11-25Rollup merge of #117651 - Zalathar:fold-sums, r=cjgillotMichael Goulet-205/+170
coverage: Simplify building coverage expressions based on sums This is a combination of some interlinked changes to the code that creates coverage counters/expressions for nodes and edges in the coverage graph: - Some preparatory cleanups in `MakeBcbCounters::make_branch_counters` - Use `BcbCounter` (instead of `CovTerm`) when building coverage expressions - This makes it easier to introduce a fold for building sums - Simplify the creation of coverage expressions based on sums, by having `Iterator::fold` do much of the work - Get rid of the awkward `BcbBranch` enum, and replace it with graph edges represented as `(from_bcb, to_bcb)` - This further simplifies the body of the fold
2023-11-25Remove 3 more unused ObligationCauseCodesMichael Goulet-15/+0
2023-11-25Remove some more unused codepaths in (region) error reportingMichael Goulet-7/+2
2023-11-25Remove some lifetime-only ObligationCauseCode notesMichael Goulet-11/+3
2023-11-25Remove unused ObligationCauseCode::ProjectionWfMichael Goulet-6/+0
2023-11-26Remove unnecessary dependencies.Nicholas Nethercote-2/+0
2023-11-26Use `rustc_fluent_macro::fluent_messages!` directly.Nicholas Nethercote-76/+32
Currently we always do this: ``` use rustc_fluent_macro::fluent_messages; ... fluent_messages! { "./example.ftl" } ``` But there is no need, we can just do this everywhere: ``` rustc_fluent_macro::fluent_messages! { "./example.ftl" } ``` which is shorter.
2023-11-26Add a useful comment.Nicholas Nethercote-0/+4
2023-11-26Avoid need for `{D,Subd}iagnosticMessage` imports.Nicholas Nethercote-57/+21
The `fluent_messages!` macro produces uses of `crate::{D,Subd}iagnosticMessage`, which means that every crate using the macro must have this import: ``` use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; ``` This commit changes the macro to instead use `rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the imports.
2023-11-26Remove `rustc_error_messages/messages.ftl`.Nicholas Nethercote-6/+0
It's empty, and it doesn't even make sense, because `rustc_error_messages` is a lower-level crate than `rustc_errors`.
2023-11-25Get rid of infer vars in inherent assoc types selection by using probeSantiago Pastorino-48/+46
2023-11-25add pretty_terminatorouz-a-2/+134
2023-11-25Auto merge of #118294 - GuillaumeGomez:rollup-ij2bzwt, r=GuillaumeGomezbors-485/+138
Rollup of 6 pull requests Successful merges: - #116446 (Yeet `mir::Const::from_anon_const`) - #117871 (remove unused pub fns) - #118017 (rustc_lint: address latent TODO) - #118199 (Remove `HirId` from `QPath::LangItem`) - #118272 (resolve: Avoid clones of `MacroData`) - #118291 (rustdoc-search: clean up some DOM code) Failed merges: - #118201 (Miscellaneous `ObligationCauseCode` cleanups) - #118256 (rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-25Rollup merge of #118272 - petrochenkov:macrodata, r=cjgillotGuillaume Gomez-55/+52
resolve: Avoid clones of `MacroData` And move declarative macro compilation to an earlier point in def collector, which is required for #118188.
2023-11-25Rollup merge of #118199 - compiler-errors:qpath, r=lcnrGuillaume Gomez-71/+41
Remove `HirId` from `QPath::LangItem` Remove `HirId` from `QPath::LangItem`, since there was only *one* use-case (`ObligationCauseCode::AwaitableExpr`), which we can instead recover by walking the HIR tree.
2023-11-25Rollup merge of #118017 - tamird:better-safety, r=cjgillotGuillaume Gomez-8/+10
rustc_lint: address latent TODO See individual commits.
2023-11-25Rollup merge of #117871 - klensy:unused-pub, r=cjgillotGuillaume Gomez-248/+5
remove unused pub fns This removes some unused `pub fn`; also fixes few obsoleted fn names or added fixmes with reminders to update them.
2023-11-25is_{some,ok}_andMichael Goulet-13/+21
2023-11-25Extract select_inherent_assoc_type_candidatesSantiago Pastorino-79/+95
2023-11-25Do not erase late bound regions, replace them with placeholdersSantiago Pastorino-114/+88
2023-11-25Remove HirId from QPath::LangItemMichael Goulet-71/+41
2023-11-25Review commentMichael Goulet-20/+19
2023-11-25make sure we still eagerly emit errorsMichael Goulet-2/+4
2023-11-25Remove mir::Const::from_anon_constMichael Goulet-103/+29
2023-11-25Don't ICE when encountering placeholders in implied bounds computationMichael Goulet-2/+4
2023-11-25Auto merge of #118127 - RalfJung:unadjusted-abi, r=compiler-errorsbors-6/+30
the unadjusted ABI needs to pass aggregates by-value Fixes https://github.com/rust-lang/rust/issues/118124, a regression introduced in https://github.com/rust-lang/rust/pull/117500
2023-11-25effects: Run `enforce_context_effects` for all method callsDeadbeef-16/+19
2023-11-25Auto merge of #118279 - bjorn3:sync_cg_clif-2023-11-25, r=bjorn3bors-71/+452
Subtree sync for rustc_codegen_cranelift The main highlights this time are implementing a bunch of new vendor intrinsics and fixing some existing ones. And fixing polymorphization for coroutines. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-11-25rustc: Make `def_kind` mandatory for all `DefId`sVadim Petrochenkov-53/+34
2023-11-25Auto merge of #118277 - fmease:rollup-itucldm, r=fmeasebors-2257/+2318
Rollup of 9 pull requests Successful merges: - #118220 (general improvements/fixes on bootstrap) - #118251 (rustdoc-search: avoid infinite where clause unbox) - #118253 (Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`) - #118255 (Request that rust-analyzer changes are sent upstream first if possible) - #118259 (Move EagerResolution to rustc_infer::infer::resolve) - #118262 (Relate Inherent Associated Types using eq) - #118266 (Move stuff around on `stable_mir` and `rustc_smir` crate) - #118271 (Separate `NaN`/`Inf` floats with `_`) - #118274 (Fix smir's `Ty::Ref` pretty printing) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-25Merge commit '710c67909d034e1c663174a016ca82b95c2d6c12' into ↵bjorn3-71/+452
sync_cg_clif-2023-11-25
2023-11-25Rollup merge of #118274 - celinval:smir-fix-pretty, r=ouz-aLeón Orell Valerian Liehr-2/+4
Fix smir's `Ty::Ref` pretty printing Add `&` or `&mut` to reference when generating a string for `TyKind::Ref`. r? `@ouz-a`
2023-11-25Rollup merge of #118271 - compiler-errors:float, r=RalfJungLeón Orell Valerian Liehr-2/+5
Separate `NaN`/`Inf` floats with `_` r? RalfJung Fixes #118221 No test 🤷 unless you know a good way to print an `ImmTy` in a unit test?
2023-11-25Rollup merge of #118266 - celinval:smir-break-files, r=compiler-errorsLeón Orell Valerian Liehr-2150/+2205
Move stuff around on `stable_mir` and `rustc_smir` crate 1. Break down rustc_smir/mod.rs file. - This file was getting too big and causing a lot of merge conflicts. All these changes shouldn't be visible to users since this module is private. 2. Move the compiler interface defs to its own module - Separate items that are exposed in the `stable_mir` crate to be used by the compiler from items that we expect to be used by tool developers.
2023-11-25Rollup merge of #118262 - spastorino:relate-iats-using-eq, r=compiler-errorsLeón Orell Valerian Liehr-4/+1
Relate Inherent Associated Types using eq We should call `eq` instead of `sup` as we're relating `Ty` directly and not `Binder<TraitRef>`. This is part of #118118 but unrelated to that PR. r? `@compiler-errors` `@lcnr`
2023-11-25Rollup merge of #118259 - spastorino:move-eager-resolver-to-infer, ↵León Orell Valerian Liehr-80/+87
r=compiler-errors Move EagerResolution to rustc_infer::infer::resolve `EagerResolver` fits better in `rustc_infer::infer::resolver`. Started to disentagle #118118 that has a lot of unrelated things. r? `@compiler-errors` `@lcnr`