about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-01-17add tidy check on dist src files orderonur-ozkan-7/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-17Rollup merge of #135594 - lolbinarycat:tester.js-order-error, r=notriddleMatthias Krüger-1/+1
fix error for when results in a rustdoc-js test are in the wrong order see https://github.com/rust-lang/rust/pull/131806#issuecomment-2596305614
2025-01-17Rollup merge of #131806 - lolbinarycat:rustdoc-search-all-is-func, r=notriddleMatthias Krüger-1/+56
Treat other items as functions for the purpose of type-based search specifically, constants and statics are nullary functions, and struct fields are unary functions. fixes #130204 r? ``@notriddle``
2025-01-17Auto merge of #135605 - jieyouxu:temp-require-force-rustdoc-js, r=clubby789bors-4/+1
bootstrap: still require `COMPILETEST_FORCE_STAGE0` for `./x test rustdoc-js --stage 0` This PR reverts #135375, because through some more testing I found out `./x test rustdoc-js --stage 0` does not in fact build rustdoc, and all the tests fail. This can't be intended behavior, so at least require `COMPILETEST_FORCE_STAGE0` to make it less likely to run `rustdoc-js --stage 0` by accident. The problem that `--stage 0` is not working at all for this rustdoc-js test suite is tracked over at #135603. cc `@lolbinarycat` r? bootstrap
2025-01-17compiletest: fix outdated `rustdoc-js` test suite name许杰友 Jieyou Xu (Joe)-1/+1
2025-01-17compiletest: require `COMPILETEST_FORCE_STAGE0` for `./x test rustdoc-js ↵许杰友 Jieyou Xu (Joe)-4/+1
--stage 0`
2025-01-16fix error for when results in a rustdoc-js test are in the wrong orderbinarycat-1/+1
see COMPILETEST_FORCE_STAGE0=1
2025-01-16Treat other items as functions for the purpose of type-based searchbinarycat-1/+56
constants and statics are nullary functions, and struct fields are unary functions. functions (along with methods and trait methods) are prioritized over other items, like fields and constants.
2025-01-16Rollup merge of #135588 - ferrocene:add-license-json-to-source-tarball, r=KobzolMatthias Krüger-0/+1
Add license-metadata.json to rustc-src tarball. Adds a license-metadata.json to the source tarball. This file was reported as missing as a comment on #133461, and it prevents you building the compiler from the source tarball (unless you re-generate it yourself, which is non-obvious and requires `reuse` to be installed). r? Kobzol
2025-01-16Rollup merge of #135585 - onur-ozkan:135554, r=KobzolMatthias Krüger-1/+15
resolve symlinks of LLVM tool binaries before copying them There is a chance that these tools are being installed from an external LLVM and we have no control over them. If any of these tools use symlinks, they will fail during tarball distribution. This change makes copying process to resolve symlinks just before placing them into the destination path. Fixes https://github.com/rust-lang/rust/issues/135554
2025-01-16Rollup merge of #135561 - Zalathar:link-dead-code, r=saethlinMatthias Krüger-5/+5
Update docs for `-Clink-dead-code` to discourage its use The `-Clink-dead-code` flag was originally added way back in #31368, apparently to help improve the output of some older forms of code coverage measurement, and also to address some use-cases for wanting to suppress linker flags like `-dead_strip` and `--gc-section`. In the past it might have also been useful in conjunction with `-Cinstrument-coverage`, but subsequent improvements to coverage instrumentation have made it unnecessary there. [It is also currently used by cargo-fuzz by default](https://github.com/rust-fuzz/cargo-fuzz/issues/391), for reasons that are possibly no longer relevant. --- The flag currently does more than its name suggests, affecting not just linker flags, but also monomorphization decisions. It has also contributed to ICEs (e.g. #135515) that would not have occurred without link-dead-code. --- For now, this PR just updates the documentation to be more realistic about what the flag does, and when it should be used (approximately never). In the future, it might be worth looking into properly deprecating this flag, and perhaps making it a no-op if feasible.
2025-01-16Add license-metadata.json to rustc-src tarball.Jonathan Pallant-0/+1
2025-01-16CRLF to LFjnyfah-100/+115
2025-01-16added testsjnyfah-0/+597
2025-01-16resolve symlinks of LLVM tool binaries before copying themonur-ozkan-1/+15
There is a chance that these tools are being installed from an external LLVM and we have no control over them. If any of these tools use symlinks, they will fail during tarball distribution. This change makes copying process to resolve symlinks just before placing them into the destination path. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-16Merge pull request #18952 from lh123/add-raw-keyword-completeLukas Wirth-8/+168
feat: complete raw, const keyword
2025-01-16revert blocklike changesjnyfah-8/+9
2025-01-16don't complete `raw` in `&mut $0`lh123-7/+31
2025-01-16Fix `debug_assertions` broken in 1c5a125beb35725ccc2ade005db9870db734bf23VinTarZ-3/+3
2025-01-16update blocklikejnyfah-13/+10
2025-01-16feat: complete raw, const keywordlh123-8/+144
2025-01-16Merge pull request #18951 from Veykril/push-zpvunsvlpuxtLukas Wirth-51/+149
Add missing `#[rust_analyzer::rust_fixture]` annotations
2025-01-16Merge pull request #18950 from Veykril/push-okmsynnltxtsLukas Wirth-31/+47
Generalize some type walking in hover type actions
2025-01-16Generalize some type walking in hover type actionsLukas Wirth-31/+47
2025-01-16Minor docs improvementLukas Wirth-16/+17
2025-01-16Add edit test for await skipping completionsLukas Wirth-0/+28
2025-01-16Add missing `#[rust_analyzer::rust_fixture]` annotationsLukas Wirth-35/+104
2025-01-16Merge pull request #18949 from Veykril/push-yzklntsnnutsLukas Wirth-13/+5
Partially back out "fix: Fix sourceroot construction for virtual manifests"
2025-01-16Partially back out "fix: Fix sourceroot construction for virtual manifests"Lukas Wirth-13/+5
2025-01-16Merge pull request #18946 from lh123/goto-to-type-def-func-param-and-trait-boundLukas Wirth-1/+108
feat: show go-to-type-def actions for func param and trait bound when hovering
2025-01-16Merge pull request #18927 from ChayimFriedman2/skip-iter-awaitLukas Wirth-72/+230
feat: Add smart completions that skip `await` or `iter()` and `into_iter()`
2025-01-16Auto merge of #135484 - nikic:llvm-19.1.7, r=cuviperbors-0/+0
Update to LLVM 19.1.7 Fixes https://github.com/rust-lang/rust/issues/134457. Fixes https://github.com/rust-lang/rust/issues/111073.
2025-01-16add goto-to-def actions for trait boundlh123-1/+104
2025-01-16add go-to-type-def actions for func paramslh123-1/+5
2025-01-16Update docs for `-Clink-dead-code` to discourage its useZalathar-5/+5
2025-01-16Auto merge of #135458 - jieyouxu:migrate-extern-fn-reachable, r=lqdbors-1/+0
tests: Port `extern-fn-reachable` to rmake.rs Part of #121876. ## Summary This PR ports `tests/run-make/extern-fn-reachable` to use `rmake.rs`. Notable changes: - We now use the `object` crate and look at the exported symbols specifically. - This test's coverage regressed against windows-msvc back in [replace dynamic library module with libloading #90716](https://github.com/rust-lang/rust/pull/90716), but since we use `object` now, we're able to claw the test coverage back. - The checks are now stricter: 1. It no longer looks for substring symbol matches in `nm` textual outputs, it inspects the symbol names precisely. 2. We now also explicitly check for the presence of leading underscore in exported symbol names on apple vs non-apple targets. - Added another case of `#[no_mangle] fn fun6() {}` (note the lack of `pub`) to check that Rust nameres visibility is orthogonal to symbol visibility in dylib. ## History - Test was initially introduced as a run-pass[^run-pass] test as part of [Don't mark reachable extern fns as internal #10539](https://github.com/rust-lang/rust/pull/10539). - Test re-introduced as a run-make test in https://github.com/rust-lang/rust/pull/13741. - Later, the test coverage regressed in https://github.com/rust-lang/rust/pull/90716. [^run-pass]: no longer a thing nowadays Supersedes #128314. Co-authored with `@lolbinarycat.` try-job: x86_64-msvc try-job: i686-msvc try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: test-various
2025-01-16Use resolve_method_call_as_callable to handle function types1hakusai1-2/+3
2025-01-16refactor: Change order of arguments1hakusai1-2/+2
2025-01-16refactor: rename to descriptive name1hakusai1-2/+3
2025-01-16update chalkWaffle Lapkin-13/+12
this brings in support from trait upcasting, yay! (and as such fixes a test)
2025-01-16add a test for trait upcasting type mismatchWaffle Lapkin-0/+32
this adds a test asserting *incorrect* behavior that can be seen in <https://github.com/rust-lang/rust-analyzer/issues/18083>, and a test asserting the *correct* behavior for the case of no super traits.
2025-01-15Add smart completions that skip `await` or `iter()` and `into_iter()`Chayim Refael Friedman-72/+230
E.g. complete `await.foo()`.
2025-01-15Merge pull request #18897 from duncanawoods/masterHKalbasi-1/+5
fix: Make test_runner::TestState::stdout optional to fix parsing cargo test json output
2025-01-15Auto merge of #135540 - GuillaumeGomez:rollup-40lfb7l, r=GuillaumeGomezbors-191/+166
Rollup of 6 pull requests Successful merges: - #132654 (std: lazily allocate the main thread handle) - #135003 (deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead) - #135428 (rustdoc: Remove `AttributesExt` trait magic that added needless complexity) - #135498 (Prefer lower `TraitUpcasting` candidates in selection) - #135507 (TRPL: incorporate all backward-compatible Edition changes) - #135529 (remove outdated FIXME) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-15Auto merge of #133461 - ferrocene:add-copyright-files-to-dist, r=Kobzolbors-25/+61
Add COPYRIGHT-*.html files to distribution and update `COPYRIGHT` * Updates the `COPYRIGHT` file to describe how we actually do things now, and removes the licence text from it as they are stored elsewhere. * dist tarballs get all of the files in `LICENSES/*`. * This folder is managed by `reuse` and each file exists because we refer to the licence somewhere in our tree. We should be supplying these licence texts to anyone who obtains a copy of the source code and now we do. * The binary rust tarball gets `COPYRIGHT.html` and `COPYRIGHT-library.html`, which are auto-generated files that describe the licence information for both the in-tree source files used to build the Rust toolchain, and the out-of-tree dependencies we used to build the toolchain. * The other binary tarballs are unchanged, for now. In future you need to make a call whether to ship multiple version of COPYRIGHT.html, or whether to try and make, for example, a cargo-specific COPYRIGHT.html file. * The `LICENSE-MIT` file now includes a blanket copyright statement, as the text indicates that it should and because users will expect to know who owns the copyright of the material they have been given (even if the answer is 'lots of people'). try-job: x86_64-fuchsia
2025-01-15Rollup merge of #135529 - onur-ozkan:outdated-fixme, r=jieyouxuGuillaume Gomez-2/+0
remove outdated FIXME https://github.com/rust-lang/rust/pull/134967 already fixed this.
2025-01-15Rollup merge of #135507 - chriskrycho:trpl-edition-updates-stable, r=ehussGuillaume Gomez-0/+0
TRPL: incorporate all backward-compatible Edition changes This incorporates all the backwards-compatible changes for the 2024 Edition on stable. There will also be a follow-on PR to land revisions to the new chapter on async so it can be as ready as possible when officially released with 1.85 and the 2024 Edition. Additionally, there are a few other, non-backward-compatible, changes (largely around `use<..>`) we can only land using the stable edition, which we may or may not be able to land in 1.85 by using the beta toolchain in the example code. Those may or may not be ported over, depending on how that does or does not play with the infrastructure. There is also an accompanying PR, #135508, to land these changes on `beta` so they can go out with 1.85 and the Edition release.
2025-01-15Rollup merge of #135428 - camelid:attr-cleanup, r=GuillaumeGomezGuillaume Gomez-148/+119
rustdoc: Remove `AttributesExt` trait magic that added needless complexity The new code is more explicit and avoids trait magic that added needless complexity to this part of rustdoc.
2025-01-15Rollup merge of #135003 - RalfJung:deprecate-allowed-through-unstable, ↵Guillaume Gomez-41/+47
r=davidtwco deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead The `rustc_allowed_through_unstable_modules` attribute lets users call `std::mem::transmute` as `std::intrinsics::transmute`. The former is a reexport of the latter, and for a long time we didn't properly check stability for reexports, so making this a hard error now would be a breaking change for little gain. But at the same time, `std::intrinsics::transmute` is not the intended path for this function, so I think it is a good idea to show a deprecation warning when that path is used. This PR implements that, for all the functions in `std::intrinsics` that carry the attribute. I assume this will need ``@rust-lang/libs-api`` FCP.
2025-01-15Merge pull request #18922 from Veykril/push-tmtzukrsnottLukas Wirth-24/+28
fix: Don't return inlay hints outside requested range