about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-09-05asm! parsing and lowering fixesLukas Wirth-18/+106
2024-09-05Fix name fetching being incorrect for asm operandsLukas Wirth-93/+107
2024-09-05Add missing doc commentsLukas Wirth-0/+1
2024-09-05Support more IDE features for asm operandsLukas Wirth-40/+180
2024-09-05Give InlineAsmOperand a HIR representationLukas Wirth-217/+409
2024-09-05run_make_support: make each command invocation only-run-once许杰友 Jieyou Xu (Joe)-1/+16
2024-09-05Auto merge of #3784 - Mandragorian:detect_moved_mutexes, r=RalfJungbors-116/+310
Detect when pthread_mutex_t is moved What I am not sure about this PR is how to support storing the additional mutex data like its address and kind. If I understand correctly the `concurrency::sync::Mutex` struct is to be used by any mutex implementation. This possibly means that different implementation might want to store different data in the mutex. So any additional data should be implementation defined somehow. Solutions that come to mind: - Store the additional data as `Box<dyn Any>` and the implementations can downcast their data when they fetch them. - Have each shim implementation define a `static mut` map between `MutexID`s and the additional data. Let me know Fixes #3749
2024-09-05Detect pthread_mutex_t is movedKonstantinos Andrikopoulos-116/+310
See: #3749
2024-09-05Add Definition kind for asm register operandLukas Wirth-35/+59
2024-09-05run_make_support: rename `Command::stdin` to `stdin_buf` and add ↵许杰友 Jieyou Xu (Joe)-22/+67
`std{in,out,err}` config helpers Previously `Command::stdin` was actually just a stdin buffer helper, but this is different from `std::process::Command::stdin`. This is needlessly confusing, and blocks support to add `std{in,out,err}` config that tests may want to use to e.g. redirect to `/dev/ptmx`.
2024-09-05Add Definition kind for asm register classesLukas Wirth-28/+214
2024-09-05Lower asm expressionsLukas Wirth-97/+612
2024-09-05fix: Fix `inline_const_as_literal` error when the number >= 10coekjan-4/+14
2024-09-05Rollup merge of #129664 - ↵Matthias Krüger-1/+1
adetaylor:arbitrary-self-types-pointers-feature-gate, r=wesleywiser Arbitrary self types v2: pointers feature gate. The main `arbitrary_self_types` feature gate will shortly be reused for a new version of arbitrary self types which we are amending per [this RFC](https://github.com/rust-lang/rfcs/blob/master/text/3519-arbitrary-self-types-v2.md). The main amendments are: * _do_ support `self` types which can't safely implement `Deref` * do _not_ support generic `self` types * do _not_ support raw pointers as `self` types. This PR relates to the last of those bullet points: this strips pointer support from the current `arbitrary_self_types` feature. We expect this to cause some amount of breakage for crates using this unstable feature to allow raw pointer self types. If that's the case, we want to know about it, and we want crate authors to know of the upcoming changes. For now, this can be resolved by adding the new `arbitrary_self_types_pointers` feature to such crates. If we determine that use of raw pointers as self types is common, then we may maintain that as an unstable feature even if we come to stabilize the rest of the `arbitrary_self_types` support in future. If we don't hear that this PR is causing breakage, then perhaps we don't need it at all, even behind an unstable feature gate. [Tracking issue](https://github.com/rust-lang/rust/issues/44874) This is [step 4 of the plan outlined here](https://github.com/rust-lang/rust/issues/44874#issuecomment-2122179688)
2024-09-05Rollup merge of #129584 - lolbinarycat:old-upstream-warning, r=albertlarsan68Matthias Krüger-0/+34
warn the user if the upstream master branch is old fixes https://github.com/rust-lang/rust/issues/129528
2024-09-05Rollup merge of #101339 - the8472:ci-randomize-debug, r=Mark-SimulacrumMatthias Krüger-0/+15
enable -Zrandomize-layout in debug CI builds This builds rustc/libs/tools with `-Zrandomize-layout` on *-debug CI runners. Only a handful of tests and asserts break with that enabled, which is promising. One test was fixable, the rest is dealt with by disabling them through new cargo features or compiletest directives. The config.toml flag `rust.randomize-layout` defaults to false, so it has to be explicitly enabled for now.
2024-09-04assist: ensure replace_qualified_name_with_use applies to the first path segmentDavid Barsky-9/+25
2024-09-04Parse builtin#asm expressionsLukas Wirth-31/+865
2024-09-04Auto merge of #18045 - Veykril:fix-loop-lower, r=Veykrilbors-9/+65
fix: Fix lowering of for loops dropping the loop block
2024-09-04fix: Fix lowering of for loops dropping the `loop` blockLukas Wirth-9/+65
2024-09-04Add edition dependent keyword highlighting testsLukas Wirth-7/+326
2024-09-04forward linker option to lint-docschenx97-0/+13
2024-09-03Add an internal lint that warns when accessing untracked dataNadrieril-0/+3
2024-09-03bundle old root into `SyntaxEdit` resultDropDemBits-12/+30
useful for `SourceChangeBuilder` so it can still perform a tree diff without having to store the old root separately
2024-09-03Auto merge of #3856 - jder:mac-native-libs, r=RalfJungbors-52/+78
Enable native libraries on macOS Fixes #3595 by using `-fvisibility=hidden` and the visibility attribute supported by both gcc and clang rather than the previous gcc-only mechanism for symbol hiding. Also brings over cfg changes from #3594 which enable native-lib functionality on all unixes. Thanks for taking a look, feedback very welcome! cc `@RalfJung`
2024-09-03Enable native libraries on macOSJesse Rusak-52/+78
Fixes #3595 by using -fvisibility=hidden and the visibility attribute supported by both gcc and clang rather than the previous gcc-only mechanism for symbol hiding. Also brings over cfg changes from #3594 which enable native-lib functionality on all unixes.
2024-09-03Bump smol_strLukas Wirth-4/+20
2024-09-03Auto merge of #17984 - ShoyuVanilla:cast, r=Veykrilbors-93/+1614
feat: Implement cast typecheck and diagnostics Fixes #17897 and fixes #16564 Mainly adopted from https://github.com/rust-lang/rust/blob/100fde5246bf56f22fb5cc85374dd841296fce0e/compiler/rustc_hir_typeck/src/cast.rs
2024-09-03Auto merge of #18031 - roife:suggest-name-in-completion, r=Veykrilbors-15/+142
feat: Suggest name in completion for let_stmt and fn_param fix #17780 1. Refactor: move `ide_assist::utils::suggest_name` to `ide-db::syntax_helpers::suggest_name` for reuse. 2. When completing `IdentPat`, detecte if the current node is a `let_stmt` or `fn_param`, and suggesting a new name based on the context.
2024-09-02misc fixesDropDemBits-26/+20
2024-09-02handle replace_with_many and replace_allDropDemBits-16/+97
2024-09-02support replacing root nodeDropDemBits-14/+200
2024-09-02properly sort changes by depth to sort between nodes that have the same ↵DropDemBits-4/+19
start range
2024-09-02fix insert ranges not being excluded from disjointnessDropDemBits-7/+12
2024-09-02support insert{_all}DropDemBits-11/+88
2024-09-02propagate annotations to mapped elementsDropDemBits-52/+168
2024-09-03tests: suggesting names in completions for let_stmt and fn_paramroife-0/+73
2024-09-03feat: suggest name in let_stmt and fn_paramroife-2/+53
2024-09-03refactor: move ide_assist::utils::suggest_name to ide-dbroife-13/+16
2024-09-03feat: Implement cast typechecksShoyu Vanilla-93/+1614
2024-09-02Merge some stringsLaurențiu Nicola-6/+3
2024-09-02Avoid Option::is_none_or for a whileLaurențiu Nicola-1/+1
2024-09-02Auto merge of #18028 - Veykril:lifetime-hints-panic, r=Veykrilbors-1/+19
fix: lifetime hint panic in non generic defs
2024-09-02fix: lifetime hint panic in non generic defsLukas Wirth-1/+19
2024-09-02Auto merge of #18016 - IvarWithoutBones:wrap-return-ty-local-result, r=Veykrilbors-16/+294
fix: use Result type aliases in "Wrap return type in Result" assist This commit makes the "Wrap return type in Result" assist prefer type aliases of standard library type when the are in scope, use at least one generic parameter, and have the name `Result`. The last restriction was made in an attempt to avoid false assumptions about which type the user is referring to, but that might be overly strict. We could also do something like this, in order of priority: * Use the alias named "Result". * Use any alias if only a single one is in scope, otherwise: * Use the standard library type. This is easy to add if others feel differently that is appropriate, just let me know. Fixes #17796
2024-09-02Adjust completions scoringLukas Wirth-50/+46
2024-09-02Simplify CompletionRelevanceLukas Wirth-90/+85
2024-09-02chore: fix some commentscuishuang-4/+4
Signed-off-by: cuishuang <imcusg@gmail.com>
2024-09-02Auto merge of #129798 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in 8f40fc59fb0c8df91c97405785197f3c630304ea..c1fa840a85eca53818895901a53fae34247448b2 2024-08-21 22:37:06 +0000 to 2024-08-29 21:03:53 +0000 - fix(resolve): With `latest` message, differentiate actionable updates (rust-lang/cargo#14461) - fix(pkgid): Allow open namespaces in PackageIdSpec's (rust-lang/cargo#14467) - feat(resolve): Report incompatible-with-rustc when MSRV-resolver is disabled (rust-lang/cargo#14459) - fix(resolve): Report incompatible packages with precise Rust version (rust-lang/cargo#14457) - fix(resolve): Dont show locking workspace members (rust-lang/cargo#14445) - Log details of failure if no errors were seen (rust-lang/cargo#14453) - More helpful missing feature error message (rust-lang/cargo#14436) - feat: Add matches_prerelease semantic (rust-lang/cargo#14305) - refactor(update): Prepare for smarter update messages (rust-lang/cargo#14440) r? ghost
2024-09-02Merge from rustcThe Miri Cronjob Bot-9/+29