about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-09-19Auto merge of #130529 - onur-ozkan:better-ci-llvm-default, r=Kobzolbors-7/+11
change `download-ci-llvm` default from `if-unchanged` to `true` Since https://github.com/rust-lang/rust/pull/129473 and https://github.com/rust-lang/rust/pull/130202, using `download-ci-llvm=true` is now the better default and it also fixes #130515.
2024-09-19Auto merge of #18146 - ChayimFriedman2:allow-comment, r=Veykrilbors-6/+24
fix: Remove check that text of `parse_expr_from_str()` matches the produced parsed tree This check is incorrect when we have comments and whitespace in the text. We can strip comments, but then we still have whitespace, which we cannot strip without changing meaning for the parser. So instead I opt to remove the check, and wrap the expression in parentheses (asserting what produced is a parenthesized expression) to strengthen verification. Fixes #18144.
2024-09-19Categorise paths in `clippy_utils::paths`GnomedDev-13/+20
2024-09-19[Clippy] Swap `open_options` to use diagnostic items instead of pathsGnomedDev-13/+12
2024-09-19[Clippy] Swap `iter_over_hash_type` to use diagnostic items instead of pathsGnomedDev-32/+14
2024-09-19[Clippy] Swap `non_octal_unix_permissions` to use diagnostic item instead of ↵GnomedDev-4/+1
path
2024-09-19[Clippy] Swap `unnecessary_owned_empty_strings` to use diagnostic item ↵GnomedDev-3/+1
instead of path
2024-09-19[Clippy] Swap `manual_strip` to use diagnostic items instead of pathsGnomedDev-8/+5
2024-09-19[Clippy] Swap `unnecessary_to_owned` to use diagnostic item instead of pathGnomedDev-3/+2
2024-09-19[Clippy] Swap `instant_subtraction` to use diagnostic item instead of pathGnomedDev-2/+1
2024-09-19[Clippy] Swap `waker_clone_wake` to use diagnostic item instead of pathGnomedDev-3/+2
2024-09-19[Clippy] Swap `filter_map_bool_then` to use diagnostic item instead of pathGnomedDev-4/+2
2024-09-19[Clippy] Swap `manual_while_let_some` to use diagnostic items instead of pathsGnomedDev-11/+7
2024-09-19[Clippy] Swap `repeat_vec_with_capacity` to use diagnostic item instead of pathGnomedDev-7/+6
2024-09-19[Clippy] Swap `VecArgs::hir` to use diagnostic items instead of pathsGnomedDev-8/+5
2024-09-19[Clippy] Swap `single_char_add_str`/`format_push_string` to use diagnostic ↵GnomedDev-7/+5
items instead of paths
2024-09-19[Clippy] Swap `manual_main_separator_str` to use diagnostic item instead of pathGnomedDev-3/+2
2024-09-19[Clippy] Swap `redundant_clone` to use diagnostic items instead of pathsGnomedDev-5/+3
2024-09-19[Clippy] Swap `float_equality_without_abs` to use diagnostic items instead ↵GnomedDev-5/+3
of paths
2024-09-19[Clippy] Swap `option_as_ref_deref` to use diagnostic items instead of pathsGnomedDev-19/+12
2024-09-19add change-tracker for new download-ci-llvm defaultonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-19change download-ci-llvm default from "if-unchanged" to trueonur-ozkan-7/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-19Remove check that text of `parse_expr_from_str()` matches the produced ↵Chayim Refael Friedman-6/+24
parsed tree This check is incorrect when we have comments and whitespace in the text. We can strip comments, but then we still have whitespace, which we cannot strip without changing meaning for the parser. So instead I opt to remove the check, and wrap the expression in parentheses (asserting what produced is a parenthesized expression) to strengthen verification.
2024-09-19Auto merge of #130406 - arttet:master, r=onur-ozkanbors-3/+12
Bump cc dependency * The [issue](https://github.com/rust-lang/rust/issues/130231) was fixed in the [PR](https://github.com/rust-lang/cc-rs/pull/1207) * The build artifacts of arm64e-apple-darwin can be found [here](https://github.com/arttet/rust-compiler-builder/actions/runs/10902308425)
2024-09-19Make the intention of the miri test more clearAdwin White-4/+5
2024-09-19[Clippy] Swap `lines_filter_map_ok` to use a diagnostic item instead of pathGnomedDev-3/+2
2024-09-19[Clippy] Swap `map_entry` to use diagnostic items instead of pathsGnomedDev-10/+6
2024-09-19Adapt test to new layoutAdwin White-2/+2
2024-09-18bootstrap: Set the dylib path when building books with rustdocJosh Stone-9/+11
The library path is needed when the toolchain has been configured with `[rust] rpath = false`. Otherwise, building the reference book will get an error when it tries to run rustdoc, like: rustdoc: error while loading shared libraries: librustc_driver-2ec457c3b8826b72.so
2024-09-18Remove chalk is owned by WG-traitsSantiago Pastorino-2/+1
2024-09-18Rollup merge of #130522 - GnomedDev:clippy-manual-retain-paths, ↵Jubilee-26/+17
r=compiler-errors [Clippy] Swap `manual_retain` to use diagnostic items instead of paths Part of https://github.com/rust-lang/rust-clippy/issues/5393, just a chore.
2024-09-18Update the minimum external LLVM to 18Josh Stone-70/+5
2024-09-18Auto merge of #18131 - ChayimFriedman2:macro-expand-dollar-crate, r=Veykrilbors-64/+396
fix: Get rid of `$crate` in expansions shown to the user Be it "Expand Macro Recursively", "Inline macro" or few other things. We replace it with the crate name, as should've always been. Probably fixes some issues, but I don't know what they are.
2024-09-18Auto merge of #18139 - ShoyuVanilla:issue-18109, r=Veykrilbors-4/+81
fix: Extend `type_variable_table` when modifying index is larger than the table size Fixes #18109 Whenever we create an inference variable in r-a, we extend `type_variable_table` to matching size here; https://github.com/rust-lang/rust-analyzer/blob/f4aca78c92e03354327c8f6c7fefaef9f45ab166/crates/hir-ty/src/infer/unify.rs#L378-L381 But sometimes, an inference variable is [created from chalk](https://github.com/rust-lang/chalk/blob/ab710e0c9b455403b138ef72a2fb90967a58eff3/chalk-solve/src/infer/unify.rs#L743) and passed to r-a as a type of an expression or a pattern. If r-a set diverging flag to this before the table is extended to a sufficient size, it panics here; https://github.com/rust-lang/rust-analyzer/blob/f4aca78c92e03354327c8f6c7fefaef9f45ab166/crates/hir-ty/src/infer/unify.rs#L275-L277 I think that extending table when setting diverging flag is reasonable becase we are already doing such extending to a size that covers the inference vars created from chalk and this change only covers the order-dependent random cases that this might fail
2024-09-18[Clippy] Swap `manual_retain` to use diagnostic items instead of pathsGnomedDev-26/+17
2024-09-18Rollup merge of #130471 - khuey:zlib-musl, r=KobzolMatthias Krüger-0/+1
Add zlib to musl dist image so rust-lld will support zlib compression for debug info there. Fixes #130063. r? `@Kobzol`
2024-09-18Bump cc dependencyArtyom Tetyukhin-3/+12
2024-09-18Get rid of `$crate` in expansions shown to the userChayim Refael Friedman-64/+396
Be it "Expand Macro Recursively", "Inline macro" or few other things. We replace it with the crate name, as should've always been.
2024-09-19fix: Extend `type_variable_table` when modifying index is larger than table sizeShoyu Vanilla-4/+81
2024-09-18Add the library workspace to the suggested rust-analyzer configbjorn3-0/+2
2024-09-18Extract logic to decide how to complete semicolon for unit-returning ↵Chayim Refael Friedman-39/+73
function into `CompletionContext` So that we don't recompute it for every item.
2024-09-18Don't complete `;` when in closure return expressionChayim Refael Friedman-24/+58
Completing it will break syntax.
2024-09-18Auto merge of #18117 - ChayimFriedman2:issue-18089, r=Veykrilbors-48/+166
fix: Always cache macro expansions' root node in Semantics Previously some expansions were not cached, but were cached in the expansion cache, which caused panics when later queries tried to lookup the node from the expansion cache. Fixes #18089.
2024-09-18Auto merge of #18128 - ChayimFriedman2:external-macros-lint, r=Veykrilbors-1/+62
fix: Handle errors and lints from external macros Some lints should not be reported if they originate from an external macro, and quickfixes should be disabled (or they'll change library code). Fixes #18122. Closes #18124.
2024-09-18Auto merge of #18136 - valadaptive:no-mangle-lints, r=Veykrilbors-6/+73
Don't lint names of #[no_mangle] extern fns [Rust doesn't run the `non_snake_case_name` lint on `extern fn`s with the `#[no_mangle]` attribute](https://github.com/rust-lang/rust/pull/44966). The conditions are: - The function must be `extern` and have a `#[no_mangle]` attribute. - The function's ABI must not be explicitly set to "Rust". This PR replicates that logic here.
2024-09-18Auto merge of #18135 - ChayimFriedman2:unsafe-op-in-unsafe-fn, r=Veykrilbors-10/+55
feat: Add diagnostics for `unsafe_op_in_unsafe_fn` Turns out it's pretty easy, but I did have to add support for allowed-by-default lints.
2024-09-18Auto merge of #18137 - ShoyuVanilla:expr-2021, r=Veykrilbors-21/+192
feat: Implement `expr_2021` Resolves #18062
2024-09-18feat: Implement `expr_2021`Shoyu Vanilla-21/+192
2024-09-18Don't lint names of #[no_mangle] extern fnsvaladaptive-6/+73
2024-09-18skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is ononur-ozkan-2/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>