about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-22Implement semitransparent hygieneChayim Refael Friedman-124/+394
Or macro_rules hygiene, or mixed site hygiene. In other words, hygiene for variables and labels but not items. The realization that made me implement this was that while "full" hygiene (aka. def site hygiene) is really hard for us to implement, and will likely involve intrusive changes and performance losses, since every `Name` will have to carry hygiene, mixed site hygiene is very local: it applies only to bodies, and we very well can save it in a side map with minor losses. This fixes one diagnostic in r-a that was about `izip!()` using hygiene (yay!) but it introduces a huge number of others, because of #18262. Up until now this issue wasn't a major problem because it only affected few cases, but with hygiene identifiers referred by macros like that are not resolved at all. The next commit will fix that.
2024-10-22Merge pull request #18254 from ChayimFriedman2/fix-mutLukas Wirth-860/+1171
fix: Nail destructuring assignment once and for all
2024-10-22Add test for tuple struct destructuring assignment where the path comes from ↵Chayim Refael Friedman-0/+34
a macro
2024-10-22Merge pull request #18373 from Veykril/veykril/push-mzumrrvynxquLukas Wirth-246/+153
internal: Merge separate inlay hints targeting same range
2024-10-22Merge binding_mode inlay hints into oneLukas Wirth-11/+29
2024-10-22Merge adjustment inlay hints into oneLukas Wirth-145/+83
2024-10-22Merge closure capture inlay hints into oneLukas Wirth-90/+41
2024-10-22Merge pull request #18372 from Kobzol/ci-merge-queueMarco Ieni-20/+17
Switch CI from bors to merge queues
2024-10-22Auto merge of #18370 - duncpro:goto-def-ranges, r=Veykrilbors-8/+124
feat: resolve range patterns to their structs Closes #18367
2024-10-22Auto merge of #18368 - Veykril:test-lsif_contains_generated_macros, r=lnicolabors-17/+199
tests: Add `lsif_contains_generated_constant` test Closes https://github.com/rust-lang/rust-analyzer/pull/18309
2024-10-22Switch CI from bors to merge queuesJakub Beránek-20/+17
2024-10-22Auto merge of #18349 - dqkqd:issue-18344, r=Veykrilbors-1/+166
feat: render docs from aliased type when type has no docs Trying to close #18344 - [x] ~Find the docs by traversing upwards if the type itself has none but aliasing for another type that might have.~ - [x] Show docs from aliased type. - [x] Showing description that we are displaying documentation for different definition in hover box. ![image](https://github.com/user-attachments/assets/820d6f97-aa2c-4dc4-8a25-75746e32d950)
2024-10-22Auto merge of #18371 - Veykril:veykril/push-kwttrusywysp, r=Veykrilbors-25/+184
fix: Fix incorrect parsing of use bounds Fixes https://github.com/rust-lang/rust-analyzer/issues/18357
2024-10-22fix: Fix incorrect parsing of use boundsLukas Wirth-25/+184
Also lower them a bit more
2024-10-22feat: render docs from aliased type when docs are missingKhanh Duong Quoc-1/+166
2024-10-22tidyDuncan Proctor-2/+1
2024-10-22tidyDuncan Proctor-5/+5
2024-10-22remove duplicate testDuncan Proctor-16/+0
2024-10-22resolve range patterns to the their struct typesDuncan Proctor-8/+141
2024-10-22Auto merge of #18366 - Veykril:veykril/push-uvwvwzxnkmnz, r=Veykrilbors-58/+81
Fix status bar message not being marked markdown Closes https://github.com/rust-lang/rust-analyzer/pull/18323
2024-10-22Fix new nightly lintsLukas Wirth-51/+81
2024-10-22tests: Add `lsif_contains_generated_constant` testJohann Hemmann-17/+199
2024-10-22Cleanup file structure proto handlingLukas Wirth-10/+3
2024-10-22Fix status bar messagen not being marked markdownLukas Wirth-1/+1
2024-10-22Auto merge of #18362 - duncpro:goto-def-ranges, r=Veykrilbors-17/+139
feat: goto definition on range operators Closes #18342
2024-10-22Auto merge of #18364 - lnicola:sync-from-rust, r=lnicolabors-7362/+11339
minor: sync from downstream
2024-10-22tidyDuncan Proctor-15/+27
2024-10-22Replace some LayoutError variants with the rustc_abi errorsLaurențiu Nicola-24/+22
2024-10-22Bump rustc cratesLaurențiu Nicola-5/+5
2024-10-22Merge from rust-lang/rustLaurențiu Nicola-7333/+11312
2024-10-22Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-10-22goto definition on RangeFrom, RangeFull, RangeTo, and RangeToInclusive links ↵Duncan Proctor-36/+65
to respective struct
2024-10-22Auto merge of #129935 - RalfJung:unsupported_calling_conventions, ↵bors-201/+97
r=compiler-errors make unsupported_calling_conventions a hard error This has been a future-compat lint (not shown in dependencies) since Rust 1.55, released 3 years ago. Hopefully that was enough time so this can be made a hard error now. Given that long timeframe, I think it's justified to skip the "show in dependencies" stage. There were [not many crates hitting this](https://github.com/rust-lang/rust/pull/86231#issuecomment-866300943) even when the lint was originally added. This should get cratered, and I assume then it needs a t-compiler FCP. (t-compiler because this looks entirely like an implementation oversight -- for the vast majority of ABIs, we already have a hard error, but some were initially missed, and we are finally fixing that.) Fixes https://github.com/rust-lang/rust/pull/87678
2024-10-21Move explicit range handling out of goto_definition, use OperatorClass insteadduncanproctor-53/+70
2024-10-21Auto merge of #131840 - compiler-errors:impossible-maybe, r=lcnrbors-12/+22
Dont consider predicates that may hold as impossible in `is_impossible_associated_item` Use infer vars to account for ambiguities when considering if methods are impossible to instantiate for a given self type. Also while we're at it, let's use the new trait solver instead of `evaluate` since this is used in rustdoc. r? lcnr Fixes #131839
2024-10-21Auto merge of #131570 - ehuss:update-xcode, r=Mark-Simulacrumbors-8/+8
(ci) Update macOS Xcode to 15 This updates the macOS builders to Xcode 15. The aarch64 images will be removing Xcode 14 and 16 very soon (https://github.com/actions/runner-images/issues/10703), so we will need to make the switch to continue operating. The linked issue also documents GitHub's new policy for how they will be updating Xcode in the future. Also worth being aware of is the future plans for x86 runners documented in https://github.com/actions/runner-images/issues/9255 and https://github.com/actions/runner-images/issues/10686, which will impact our future upgrade behaviors. I decided to also update the Xcode in the x86_64 runners, even though they are not being removed. It felt better to me to have all macOS runners on the same (major) version of Xcode. However, note that the x86_64 runners do not have the latest version of 15 (15.4), so I left them at 15.2 (which is currently the default Xcode of the runner). Xcode 15 was previously causing problems (see #121058) which seem to be resolved now. `@bjorn3` fixed the `invalid r_symbolnum` issue with cranelift. The issue with clang failing to link seems to be fixed, possibly by the update of the pre-built LLVM from 14 to llvm 15 in https://github.com/rust-lang/rust/pull/124850, or an update in our source version of LLVM. I have run some try builds and at least LLVM seems to build (I did not run any tests). Closes #121058
2024-10-21Update debuginfo test for newer lldbEric Huss-3/+3
For reasons I don't understand, lldb in Xcode 15 no longer prints objects as: (long) $0 = 19 instead, it is printing them as: (long) 19
2024-10-21Auto merge of #18360 - roife:safe-kw-3, r=Veykrilbors-54/+146
feat: better completions for extern blcoks This PR refactors `add_keywords` (making it much clearer!) and enhances completion for `extern` blocks. It is recommended to reviewing the changes in order of the commits: - The first commit (f3c4dde0a4917a2bac98605cc045eecfb4d69872) doesn’t change any logic but refactors parts of the `add_keywords` function and adds detailed comments. - The second commit (5dcc1ab649bf8a49cadf006d620871b12f093a2f) improves completion for `extern` kw and extern blocks.
2024-10-21Auto merge of #132005 - matthiaskrgr:rollup-ced4upi, r=matthiaskrgrbors-560/+613
Rollup of 7 pull requests Successful merges: - #130350 (stabilize Strict Provenance and Exposed Provenance APIs) - #131737 (linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks) - #131991 (test: Add test for trait in FQS cast, issue #98565) - #131997 (Make `rustc_abi` compile on stable again) - #131999 (Improve test coverage for `unit_bindings` lint) - #132001 (fix coherence error for very large tuples™) - #132003 (update ABI compatibility docs for new option-like rules) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-22minor: refactor completions in item_listroife-27/+24
2024-10-21Rollup merge of #132003 - RalfJung:abi-compat-docs, r=traviscrossMatthias Krüger-3/+5
update ABI compatibility docs for new option-like rules Documents the rules decided [here](https://github.com/rust-lang/rust/pull/130628#issuecomment-2402761599) for our ABI compatibility rules. Long-term this should be moved to the reference, but for now this is what we got. Cc `@rust-lang/lang` `@rust-lang/opsem`
2024-10-21Rollup merge of #132001 - lcnr:stabilize-coherence-again, r=compiler-errorsMatthias Krüger-28/+94
fix coherence error for very large tuples™ see https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/diesel.20error for an in-depth explanation of this issue. We once again specialize `NormalizesTo` goals to avoid the impact of erasing their expected term. fixes #131969 r? `@compiler-errors`
2024-10-21Rollup merge of #131999 - jieyouxu:unit-bindings, r=WaffleLapkinMatthias Krüger-0/+100
Improve test coverage for `unit_bindings` lint Follow-up to #112380, apparently at the time I didn't add much of any test coverage outside of just "generally works as intended on the test suites and in the crater run". r? compiler
2024-10-21Rollup merge of #131997 - Veykril:veykril/push-upvqkyxmvkzw, r=jieyouxuMatthias Krüger-15/+27
Make `rustc_abi` compile on stable again https://github.com/rust-lang/rust/pull/131473 accidentally broke this
2024-10-21Rollup merge of #131991 - jannden:issue-98565-test, r=jieyouxuMatthias Krüger-0/+24
test: Add test for trait in FQS cast, issue #98565 Closes #98565 by adding a test to check for diagnostics when the built-in type `str` is used in a cast where a trait is expected.
2024-10-21Rollup merge of #131737 - jieyouxu:note-summary, r=ehussMatthias Krüger-0/+11
linkchecker: add a reminder on broken links to add new/renamed pages to `SUMMARY.md` for mdBooks I spent an embarrassingly long amount of time trying to figure out why CI was failing for a PR adding new platform support docs. In turns out it's because the PR author didn't register the new page in `SUMMARY.md`. I completely forgot about it too, and was reading linkchecker source because I thought it was a bug in linkchecker. So this PR adds a note to modify `SUMMARY.md` when adding new pages in a mdBook. E.g. ``` # Adding a new `meow` target but forgor to register the page in `SUMMARY.md` rustc\platform-support.html:183: broken link - `rustc\platform-support\meow.html` rustc\print.html:9730: broken link - `rustc\platform-support\meow.html` checked links in: 19.1s number of HTML files scanned: 43588 number of HTML redirects found: 13735 number of links checked: 3145951 number of links ignored due to external: 156244 number of links ignored due to exceptions: 9 number of intra doc links ignored: 8 errors found: 2 NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md found some broken links ```
2024-10-21Rollup merge of #130350 - RalfJung:strict-provenance, r=dtolnayMatthias Krüger-514/+352
stabilize Strict Provenance and Exposed Provenance APIs Given that [RFC 3559](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html) has been accepted, t-lang has approved the concept of provenance to exist in the language. So I think it's time that we stabilize the strict provenance and exposed provenance APIs, and discuss provenance explicitly in the docs: ```rust // core::ptr pub const fn without_provenance<T>(addr: usize) -> *const T; pub const fn dangling<T>() -> *const T; pub const fn without_provenance_mut<T>(addr: usize) -> *mut T; pub const fn dangling_mut<T>() -> *mut T; pub fn with_exposed_provenance<T>(addr: usize) -> *const T; pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T; impl<T: ?Sized> *const T { pub fn addr(self) -> usize; pub fn expose_provenance(self) -> usize; pub fn with_addr(self, addr: usize) -> Self; pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self; } impl<T: ?Sized> *mut T { pub fn addr(self) -> usize; pub fn expose_provenance(self) -> usize; pub fn with_addr(self, addr: usize) -> Self; pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self; } impl<T: ?Sized> NonNull<T> { pub fn addr(self) -> NonZero<usize>; pub fn with_addr(self, addr: NonZero<usize>) -> Self; pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self; } ``` I also did a pass over the docs to adjust them, because this is no longer an "experiment". The `ptr` docs now discuss the concept of provenance in general, and then they go into the two families of APIs for dealing with provenance: Strict Provenance and Exposed Provenance. I removed the discussion of how pointers also have an associated "address space" -- that is not actually tracked in the pointer value, it is tracked in the type, so IMO it just distracts from the core point of provenance. I also adjusted the docs for `with_exposed_provenance` to make it clear that we cannot guarantee much about this function, it's all best-effort. There are two unstable lints associated with the strict_provenance feature gate; I moved them to a new [strict_provenance_lints](https://github.com/rust-lang/rust/issues/130351) feature since I didn't want this PR to have an even bigger FCP. ;) `@rust-lang/opsem` Would be great to get some feedback on the docs here. :) Nominating for `@rust-lang/libs-api.` Part of https://github.com/rust-lang/rust/issues/95228. [FCP comment](https://github.com/rust-lang/rust/pull/130350#issuecomment-2395114536)
2024-10-21don't bail when encountering many placeholderslcnr-15/+21
2024-10-21GotoDefinition on a Range or InclusiveRange operator will link to the struct ↵duncanproctor-4/+68
definition
2024-10-21Auto merge of #18361 - Veykril:veykril/push-uzsokssoyznx, r=Veykrilbors-41/+125
fix: Fix token downmapping failing for include! inputs Supercedes https://github.com/rust-lang/rust-analyzer/pull/18325 Fixes https://github.com/rust-lang/rust-analyzer/pull/18325 Fixes https://github.com/rust-lang/rust-analyzer/issues/18313 Fixes https://github.com/rust-lang/rust-analyzer/issues/18314