Commit Graph

269809 Commits

Author SHA1 Message Date
onur-ozkan
7e064e791d update download-rustc doc in config.example.toml
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-28 18:59:37 +03:00
onur-ozkan
5cf6b8bdee force-recompile library changes on download-rustc="if-unchanged"
This makes download-rustc="if-unchanged" more functional and useful
for library developers.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-28 18:22:33 +03:00
klensy
746b675c5a fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
klensy
0bff99403c split clippy task for library and compiler, so different lints can be enabled 2024-10-28 17:24:23 +03:00
Lukas Wirth
af764db2aa
Merge pull request #18420 from ChayimFriedman2/cfg-true-false
feat: Support `cfg(true)` and `cfg(false)`
2024-10-28 13:56:41 +00:00
Lukas Wirth
8e97f4067f
Merge pull request #18421 from Veykril/push-uxxwvwnqvomr
Move text-edit into ide-db
2024-10-28 13:52:16 +00:00
Lukas Wirth
b12859a138
Merge pull request #18413 from ShoyuVanilla/extern-crate-reexport
fix: Allow public re-export of `extern crate` import
2024-10-28 13:51:26 +00:00
Lukas Wirth
9a7fd6f4f0
Merge pull request #18422 from ChayimFriedman2/cursed-name-res
fix: Properly resolve prelude paths inside modules inside blocks
2024-10-28 13:45:19 +00:00
Krasimir Georgiev
e4f793a1aa riscv-soft-abi-with-float-features.rs: adapt for LLVM 20 2024-10-28 13:43:03 +00:00
Lukas Wirth
003270d3e1
Merge pull request #18312 from LastExceed/symbolkind-variable
Report document symbols of kind `variable` for let statements
2024-10-28 13:40:42 +00:00
Lukas Wirth
86ae80c93b Reformat 2024-10-28 14:37:52 +01:00
Lukas Wirth
c1551557c0 Move text-edit into ide-db 2024-10-28 14:37:41 +01:00
bors
9f57edf2e2 Auto merge of #132262 - matthiaskrgr:rollup-pcphi6l, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #131391 (Stabilize `isqrt` feature)
 - #132248 (rustc_transmute: Directly use types from rustc_abi)
 - #132252 (compiler: rename LayoutS to LayoutData)
 - #132253 (Known-bug test for `keyword_idents` lint not propagating to other files)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-28 13:32:57 +00:00
ChrisCho-H
82bfe05309 refactor: cleaner check to return None 2024-10-28 20:16:35 +09:00
Pavel Grigorenko
c69894eaec New lint: dangling_pointers_from_temporaries 2024-10-28 14:16:05 +03:00
Matthias Krüger
2ca9b2cddd
Rollup merge of #132253 - Zalathar:keyword-idents-bug, r=jieyouxu
Known-bug test for `keyword_idents` lint not propagating to other files

Known-bug test for `keyword_idents` lint not propagating to other files when configured via attribute (#132218).
2024-10-28 12:14:59 +01:00
Matthias Krüger
a4acbd561b
Rollup merge of #132252 - workingjubilee:rename-layouts-to-layoutdata, r=jieyouxu
compiler: rename LayoutS to LayoutData

Bid `LayoutS` goodbye because it looks like a typo.

`LayoutS` is the last of the types that use the "`{TypeName}` is the interned type, `{TypeName}S` is the backing data that is interned" convention. This is pretty confusing to those not intimately familiar with the history of rustc's names for its types over time, and doubly so now that there are no other examples in the tree. Abolish this convention.
2024-10-28 12:14:59 +01:00
Matthias Krüger
f62ed5eb57
Rollup merge of #132248 - workingjubilee:add-rustc-abi-to-transmute, r=compiler-errors
rustc_transmute: Directly use types from rustc_abi

Using the reexport from rustc_target is not necessary here, so use rustc_abi directly.
2024-10-28 12:14:58 +01:00
Matthias Krüger
81d885b933
Rollup merge of #131391 - ChaiTRex:isqrt, r=scottmcm,tgross35
Stabilize `isqrt` feature

Stabilizes the `isqrt` feature. FCP is incomplete.

Closes #116226
2024-10-28 12:14:57 +01:00
Lukas Wirth
25b0846e96
Merge pull request #18074 from ChayimFriedman2/typeref-source-map
internal: Build source map for `hir_def::TypeRef`s
2024-10-28 11:01:12 +00:00
Ralf Jung
d066dfdb83 we can now enable the 'const stable fn must be stable' check 2024-10-28 11:48:39 +01:00
bors
32b17d56eb Auto merge of #132244 - jyn514:linker-refactors, r=bjorn3
fix various linker warnings

separated out from https://github.com/rust-lang/rust/pull/119286; this doesn't have anything user-facing, i just want to land these changes so i can stop rebasing them.

r? `@bjorn3`
2024-10-28 10:44:24 +00:00
Zalathar
4bd84b23a8 Use a type-safe helper to cast &str and &[u8] to *const c_char 2024-10-28 21:31:32 +11:00
Guillaume Gomez
26b6ccdbd7 Add GUI regression test for variant structfields margins 2024-10-28 11:16:38 +01:00
Laurențiu Nicola
5346e847c4
Merge pull request #18256 from MoskalykA/use-is_none_or
Start using `Option::is_none_or`
2024-10-28 10:12:36 +00:00
Laurențiu Nicola
7ec20428cb
Merge pull request #18412 from lnicola/windows-no-gz
internal: Stop producing .gz artifacts for Windows
2024-10-28 10:11:29 +00:00
Guillaume Gomez
7cfbe23bc8 Unify variant struct fields margins with struct fields 2024-10-28 11:06:48 +01:00
Ralf Jung
f370f3493d bump stdarch 2024-10-28 09:42:42 +01:00
bors
66701c4226 Auto merge of #132251 - jieyouxu:rollup-mtv9mpd, r=jieyouxu
Rollup of 7 pull requests

Successful merges:

 - #131633 (error on alignments greater than `isize::MAX`)
 - #132086 (Tweak E0277 highlighting and "long type" path printing)
 - #132220 (Add GUI regression test for doc struct fields margins)
 - #132225 (Dynamically link run-make support)
 - #132227 (Pass constness with span into lower_poly_trait_ref)
 - #132242 (Support `char::is_digit` in const contexts.)
 - #132243 (Remove `ObligationCause::span()` method)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-28 07:14:11 +00:00
Jubilee Young
3f73fe7db4 compiler: Depend on rustc_abi in rustc_lint 2024-10-27 23:59:31 -07:00
Adwin White
e3bf50ede2 more consistent debug_assertions 2024-10-28 14:13:39 +08:00
Adwin White
1a39247d8d Add duplicate lowering check 2024-10-28 14:13:36 +08:00
Adwin White
cb08e08722 Lower AST node id only once 2024-10-28 14:12:17 +08:00
Zalathar
dfafbc41d8 Known-bug test for keyword_idents lint not propagating to other files 2024-10-28 16:57:08 +11:00
许杰友 Jieyou Xu (Joe)
3e3feac7c3
Rollup merge of #132243 - compiler-errors:no-span, r=jieyouxu
Remove `ObligationCause::span()` method

I think it's an incredibly confusing footgun to expose both `obligation_cause.span` and `obligation_cause.span()`. Especially because `ObligationCause::span()` (the method) seems to just be hacking around a single quirk in the way we set up obligation causes for match arms.

First commit removes the need for that hack, with only one diagnostic span changing (but IMO not really getting worse -- I'd argue that it was already confusing).
2024-10-28 13:36:21 +08:00
许杰友 Jieyou Xu (Joe)
f14637b025
Rollup merge of #132242 - ultrabear:const_is_digit, r=scottmcm
Support `char::is_digit` in const contexts.

This PR implements [`feature(const_char_is_digit)` #132241](https://github.com/rust-lang/rust/issues/132241)
2024-10-28 13:36:20 +08:00
许杰友 Jieyou Xu (Joe)
a9ee1d025b
Rollup merge of #132227 - compiler-errors:better-const-span, r=Nadrieril
Pass constness with span into lower_poly_trait_ref

Gives us a span to point at for ~const/const on non-const traits.

Split from #132209. r? Nadrieril
2024-10-28 13:36:20 +08:00
许杰友 Jieyou Xu (Joe)
afc93a9128
Rollup merge of #132225 - clubby789:run-make-dynamic, r=jieyouxu
Dynamically link run-make support

Fixes #131810

r? `@jieyouxu`
2024-10-28 13:36:19 +08:00
许杰友 Jieyou Xu (Joe)
5c14e3d54c
Rollup merge of #132220 - GuillaumeGomez:gui-test-struct-fields-margins, r=notriddle
Add GUI regression test for doc struct fields margins

Fixes #131402.

r? `@notriddle`
2024-10-28 13:36:19 +08:00
许杰友 Jieyou Xu (Joe)
20d2a546fa
Rollup merge of #132086 - estebank:long-types, r=jieyouxu
Tweak E0277 highlighting and "long type" path printing

Partially address #132013.

![Output from this PR for the repro case in #132013](https://github.com/user-attachments/assets/a073ba37-4adc-411e-81f7-6cb9a945ce3d)
2024-10-28 13:36:18 +08:00
许杰友 Jieyou Xu (Joe)
95a9d496f3
Rollup merge of #131633 - asquared31415:align_isize_max, r=jieyouxu
error on alignments greater than `isize::MAX`

Fixes #131122

On zulip someone had a concern that it was legal to create a type with alignment `isize::MAX + 1`, but I do not believe this should be allowed for `repr(align)`, as `repr(align)` also increases the *size* of the type, and that would be larger than the maximum allowed size of objects.

(cc `@workingjubilee` #131276)
2024-10-28 13:36:17 +08:00
Jubilee Young
2a9239a105 rust-analyzer: Rename LayoutS to LayoutData 2024-10-27 22:32:58 -07:00
Jubilee Young
9015c6deca cg_clif: Rename LayoutS to LayoutData 2024-10-27 22:32:40 -07:00
Jubilee Young
e1781297f3 compiler: Rename LayoutS to LayoutData
The last {UninternedType}S is in captivity. The galaxy is at peace.
2024-10-27 22:31:14 -07:00
asquared31415
6fc7ce43d2 Error on alignments greater than isize::MAX
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2024-10-28 13:17:37 +08:00
bors
6929a48275 Auto merge of #132200 - Mark-Simulacrum:strengthen-cross-lang, r=RalfJung
Make clearer that guarantees in ABI compatibility are for Rust only

cc https://github.com/rust-lang/rust/pull/132136#issuecomment-2439737631 -- it looks like we already had a note that I missed in my initial look here, but this goes further to emphasize the guarantees, including uplifting it to the top of the general documentation.

r? `@RalfJung`
2024-10-28 04:47:06 +00:00
Jubilee Young
4839d6e6e5 compiler: Add rustc_abi dependence to the compiler
Depend on rustc_abi in compiler crates that use it indirectly but have
not yet taken on that dependency, and are not entangled in my other PRs.
This leaves an "excise rustc_target" step after the dust settles.
2024-10-27 21:10:58 -07:00
Jubilee Young
27207069d8 rustc_transmute: Directly use types from rustc_abi 2024-10-27 20:29:27 -07:00
Nicholas Nethercote
dd2b027d5d Tweak more warnings.
Much like the previous commit.

I think the removal of "the token" in each message is fine here. There
are many more error messages that mention tokens without saying "the
token" than those that do say it.
2024-10-28 14:20:28 +11:00
Nicholas Nethercote
a201fab208 Tweak expand_incomplete_parse warning.
By using `token_descr`, as is done for many other errors, we can get
slightly better descriptions in error messages, e.g.
"macro expansion ignores token `let` and any following" becomes
"macro expansion ignores keyword `let` and any tokens following".

This will be more important once invisible delimiters start being
mentioned in error messages -- without this commit, that leads to error
messages such as "error at ``" because invisible delimiters are
pretty printed as an empty string.
2024-10-28 14:12:45 +11:00