summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2023-03-18Fix linker detection for clang with prefixTaiki Endo-1/+3
2023-03-18Don't eagerly convert principal to stringclubby789-4/+9
2023-03-03Yeet point_at_expr_source_of_inferred_type for nowMichael Goulet-233/+3
2023-02-14Do not eagerly recover for bad impl-trait in macrosMichael Goulet-2/+3
2023-02-02Revert "Avoid a temporary file when processing macOS fat archives"bjorn3-34/+36
This reverts commit bd8e476d8bd85b6d60a0de7694d154b4a74f5133.
2023-02-02Revert "Remove macOS fat archive support from LlvmArchiveBuilder"bjorn3-4/+10
This reverts commit 047c7cc60c05e2cf182c6f578581cf2a67b1d0ff.
2023-02-02Revert back to LlvmArchiveBuilder on all platformsbjorn3-1/+3
ArArchiveBuilder doesn't support reading thin archives, causing a regression.
2023-01-24Set version placeholders to 1.68Mark Rousskov-4/+4
2023-01-22Auto merge of #107185 - compiler-errors:rollup-wkomjma, r=compiler-errorsbors-42/+109
Rollup of 8 pull requests Successful merges: - #103418 (Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report) - #106113 (llvm-wrapper: adapt for LLVM API change) - #106144 (Improve the documentation of `black_box`) - #106578 (Label closure captures/generator locals that make opaque types recursive) - #106749 (Update cc to 1.0.77) - #106935 (Fix `SingleUseLifetime` ICE) - #107015 (Re-enable building rust-analyzer on riscv64) - #107029 (Add new bootstrap members to triagebot.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-21Rollup merge of #106935 - TaKO8Ki:fix-104440, r=cjgillotMichael Goulet-25/+46
Fix `SingleUseLifetime` ICE Fixes #104440 cc: ``@matthiaskrgr``
2023-01-21Rollup merge of #106578 - compiler-errors:recursive-opaque-closure, r=TaKO8KiMichael Goulet-6/+53
Label closure captures/generator locals that make opaque types recursive cc https://github.com/rust-lang/rust/issues/46415#issuecomment-1374665828
2023-01-21Rollup merge of #106113 - krasimirgg:llvm-16-ext-tyid, r=nikicMichael Goulet-11/+9
llvm-wrapper: adapt for LLVM API change No functional changes intended. The LLVM commit https://github.com/llvm/llvm-project/commit/e6b02214c68df2c9f826e02310c9352ac652e456 added `TargetExtTyID` to the `TypeID` enum. This adapts `RustWrapper` accordingly.
2023-01-22Auto merge of #107133 - pnkfelix:revert-pr-84022-for-issue-106337, ↵bors-13/+138
r=Mark-Simulacrum Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error" This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36 aka PR #84022 I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-21Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat reportAaron Hill-0/+1
2023-01-21Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obkbors-89/+364
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc) This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble. The changes required are moderate but non-zero: - In some places the collections are extracted into sorted vecs. - There are a few instances where for-loops have been changed to extends. ~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~ Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)). Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). r? `@ghost`
2023-01-21Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillotbors-12/+12
Lazy dominator tree construction in borrowck Motivated by the observation that sometimes constructed dominator tree was never queried.
2023-01-21Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoeristerbors-42/+124
Simplify `derive(Debug)` output for fieldless enums Fixes #106875
2023-01-21Label closure captures/generator locals that make opaque types recursiveMichael Goulet-6/+53
2023-01-20Rollup merge of #107112 - eltociear:patch-19, r=albertlarsan68Michael Goulet-2/+2
Fix typo in opaque_types.rs paramters -> parameters
2023-01-20Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnrMichael Goulet-21/+208
Implement some more new solver candidates and fix some bugs First, fix some bugs: 1. `IndexVec::drain_enumerated(a..b)` does not give us an iterator of index keys + items enumerated from `a..b`, but from `0..(b-a)`... That caused a bug. See first commit for the fix. 2. Implement the `_: Trait` ambiguity hack. I put it in assemble, let me know if it should live elsewhere. This is important, since we otherwise consider `_: Sized` to have no solutions, and nothing passes! 3. Swap `Ambiguity` and `Unimplemented` cases for the new solver. Sorry for accidentally swapping them 😄 4. Check GATs' own predicates during projection confirmation. Then implement a few builtin traits: 5. Implement `PointerSized`. Pretty independent. 6. Implement `Fn` family of traits for fnptr, fndef, and closures. Closures are currently broken because `FulfillCtxt::relationships` is intentionally left unimplemented. See comment in the test. r? ```@lcnr```
2023-01-20Rollup merge of #104347 - notriddle:notriddle/import-macro-from-self-fixup, ↵Michael Goulet-5/+17
r=TaKO8Ki diagnostics: suggest changing `s@self::{macro}@::macro` for exported Fixes #99695
2023-01-20Rollup merge of #104154 - ↵Michael Goulet-2/+2
timrobertsdev:deny-by-default-bindings_with_variant_name, r=scottmcm Change `bindings_with_variant_name` to deny-by-default Changed the `bindings_with_variant_name` lint to deny-by-default and fixed up the affected tests. Addresses #103442.
2023-01-20Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error"Felix S. Klock II-13/+138
This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36. I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-20diagnostics: remvoe unnecessary use of `source_map.start_point`Michael Howell-1/+1
2023-01-20diagnostics: use `module_path` to check crate import instead of stringsMichael Howell-20/+4
2023-01-20diagnostics: add `};` only if `{` was added tooMichael Howell-5/+5
2023-01-20diagnostics: suggest changing `s@self::{macro}@::macro` for exportedMichael Howell-1/+29
Fixes #99695
2023-01-20Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnrbors-75/+146
Check ADT fields for copy implementations considering regions Fixes #88901 r? `@ghost`
2023-01-20Auto merge of #107106 - matthiaskrgr:rollup-g7r1ep0, r=matthiaskrgrbors-54/+94
Rollup of 6 pull requests Successful merges: - #106699 ([drop tracking] Visit break expressions ) - #106738 (Fix known-bug annotations) - #106891 (Tweak "borrow closure argument" suggestion) - #106928 (add raw identifier for keyword in suggestion) - #107065 (Clippy: Make sure to include in beta: Move `unchecked_duration_subtraction` to pedantic) - #107068 (autoderive Subdiagnostic for AddtoExternBlockSuggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-20Auto merge of #107105 - matthiaskrgr:rollup-rkz9t7r, r=matthiaskrgrbors-357/+415
Rollup of 8 pull requests Successful merges: - #106783 (Recover labels written as identifiers) - #106973 (Don't treat closures from other crates as local) - #106979 (Document how to get the type of a default associated type) - #107053 (signal update string representation for haiku.) - #107058 (Recognise double-equals homoglyph) - #107067 (Custom MIR: Support storage statements) - #107076 (Added const-generic ui test case for issue #106419) - #107091 (Fix broken format strings in `infer.ftl`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-20Fix typo in opaque_types.rsIkko Eltociear Ashimine-2/+2
paramters -> parameters
2023-01-20Add `compile_fail` to doctest for `bindings_with_variant_name`--global-1/+1
2023-01-20Change `bindings_with_variant_name` to deny-by-default--global-1/+1
2023-01-20Rollup merge of #107068 - mejrs:use_derive, r=estebankMatthias Krüger-33/+27
autoderive Subdiagnostic for AddtoExternBlockSuggestion
2023-01-20Rollup merge of #106928 - bvanjoi:print-keyword-raw-identifier, r=petrochenkovMatthias Krüger-1/+1
add raw identifier for keyword in suggestion fix https://github.com/rust-lang/rust/issues/106841
2023-01-20Rollup merge of #106891 - estebank:issue-45727, r=petrochenkovMatthias Krüger-8/+26
Tweak "borrow closure argument" suggestion Fix #45727.
2023-01-20Rollup merge of #106699 - eholk:await-chains-drop-tracking, r=wesleywiserMatthias Krüger-12/+40
[drop tracking] Visit break expressions This fixes https://github.com/rust-lang/rust/issues/102383 by remembering to visit the expression in `break expr` when building the drop tracking CFG. Missing this step was causing an off-by-one error which meant after a number of awaits we'd be looking for dropped values at the wrong point in the code. Additionally, this changes the order of traversal for assignment expressions to visit the rhs and then the lhs. This matches what is done elsewhere. Finally, this improves some of the debugging output (for example, the CFG visualizer) to make it easier to figure out these sorts of issues.
2023-01-20Rollup merge of #107091 - clubby789:infer-ftl-missing-dollar, r=compiler-errorsMatthias Krüger-8/+8
Fix broken format strings in `infer.ftl` Fixes #107088
2023-01-20Rollup merge of #107067 - tmiasko:custom-mir-storage-statements, r=oli-obkMatthias Krüger-0/+6
Custom MIR: Support storage statements r? `@oli-obk` `@JakobDegen`
2023-01-20Rollup merge of #107058 - clubby789:eqeq-homoglyph, r=wesleywiserMatthias Krüger-320/+322
Recognise double-equals homoglyph Recognise `⩵` as a homoglyph for `==`. The first commit switches `char` to `&str`, as all previous homoglyphs corresponded to a single ASCII character, while the second implements the fix. `@rustbot` label +A-diagnostics +A-parser
2023-01-20Rollup merge of #106979 - Nilstrieb:type-of-default-assoc-type, r=petrochenkovMatthias Krüger-0/+5
Document how to get the type of a default associated type
2023-01-20Rollup merge of #106973 - oli-obk:tait_ice_closure_in_impl_header, r=lcnrMatthias Krüger-22/+20
Don't treat closures from other crates as local fixes #104817 r? `@lcnr` Specialization can prefer an impl for an opaque type over a blanket impls that also matches. If the blanket impl only applies if an auto-trait applies, we look at the hidden type of the opaque type to see if that implements the auto trait. The hidden type can be a closure or generator, and thus we will end up seeing these types in coherence and have to handle them properly.
2023-01-20Rollup merge of #106783 - WaffleLapkin:break-my-ident, r=wesleywiserMatthias Krüger-7/+54
Recover labels written as identifiers This adds recovery for `break label expr` and `continue label`, as well as a test for `break label`.
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-590/+518
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-19Fix broken format strings in `infer.ftl`clubby789-8/+8
2023-01-19Tweak "borrow closure argument" suggestionEsteban Küber-8/+26
Fix #45727.
2023-01-19Auto merge of #107038 - compiler-errors:dont-wfcheck-non-local-rpit, r=oli-obkbors-3/+35
Don't wf-check non-local RPITs We were using `ty::is_impl_trait_defn(..).is_none()` to check if we need to add WF obligations for an opaque type. This is *supposed* to be checking if the type is a TAIT, since RPITs' wfness is implied by wf checking its parent item, but since `is_impl_trait_defn` returns `None` for non-local RPIT and async futures, we unnecessarily consider wf predicates for an RPIT if it is coming from a foreign crate. Fixes #107036 r? `@oli-obk` but feel free to reassign
2023-01-19Clean up and document unord collections a bit.Michael Woerister-38/+66
2023-01-20add raw identifier for keyword in suggestionbohan-1/+1
2023-01-19trait solver: Implement Fn traits and tuple traitMichael Goulet-7/+142