Commit Graph

267398 Commits

Author SHA1 Message Date
Guillaume Gomez
7cde7db1fc Fmt 2024-09-27 22:09:18 +02:00
Guillaume Gomez
325b70890a Merge commit '3187d32079b817522cc17413ec9185b130daf693' into subtree-update 2024-09-27 22:00:17 +02:00
Weihang Lo
f0677e7d39
Update cargo 2024-09-27 15:45:11 -04:00
Michael Goulet
d753aba3b3 Get rid of a_is_expected from ToTrace 2024-09-27 15:43:18 -04:00
Michael Goulet
4fb097a5de Instantiate binders when checking supertrait upcasting 2024-09-27 15:43:18 -04:00
Matthias Krüger
243c6d67ff
Rollup merge of #130932 - mrkajetanp:editors, r=jieyouxu
etc: Add sample rust-analyzer configs for eglot & helix

LSP configuration in editors like Emacs (eglot) and helix does not
use the same JSON format as vscode and vim do. It is not obvious
how to set up LSP for rustc in those editors and the dev guide currently
does not cover them. Adding sample configuration files for those editors
alongside the currently existing JSON one would be helpful.

I figured having those included in the repo like the JSON one might save
someone some time and frustration otherwise spent on trying to get the
more niche editors' LSP to work properly. I'll add a section in the dev
guide too.
2024-09-27 21:35:10 +02:00
Matthias Krüger
22c1009e7f
Rollup merge of #130926 - ChrisDenton:cc-1-1-22, r=tgross35
Update cc to 1.1.22 in library/

r? `@ghost`

try-job: x86_64-msvc
2024-09-27 21:35:09 +02:00
Matthias Krüger
6c362bf8f6
Rollup merge of #130915 - naskya:fix/typo, r=jieyouxu
fix typo in triagebot.toml

This pull request fixes a minor typo in the triagebot config file.
2024-09-27 21:35:09 +02:00
Matthias Krüger
a935064fae
Rollup merge of #130826 - fmease:compiler-mv-obj-safe-dyn-compat, r=compiler-errors
Compiler: Rename "object safe" to "dyn compatible"

Completed T-lang FCP: https://github.com/rust-lang/lang-team/issues/286#issuecomment-2338905118.
Tracking issue: https://github.com/rust-lang/rust/issues/130852

Excludes `compiler/rustc_codegen_cranelift` (to be filed separately).
Includes Stable MIR.

Regarding https://github.com/rust-lang/rust/labels/relnotes, I guess I will manually open a https://github.com/rust-lang/rust/labels/relnotes-tracking-issue since this change affects everything (compiler, library, tools, docs, books, everyday language).

r? ghost
2024-09-27 21:35:08 +02:00
Matthias Krüger
ae43f27f83
Rollup merge of #130730 - veera-sivarajan:clean-test-headers, r=compiler-errors
Reorganize Test Headers

This PR moves the test headers to the top in a couple of test files to maintain consistent style.

Based on this comment: https://github.com/rust-lang/rust/pull/130665#discussion_r1770506261
2024-09-27 21:35:08 +02:00
Matthias Krüger
65196ca4a9
Rollup merge of #130718 - jackh726:known-bug-cleanup, r=compiler-errors
Cleanup some known-bug issues

I went through most of the known-bug tests (except those under `tests/crashes`) and made sure the issue had the `S-bug-has-test` label and checked that the linked issue was open. This is a bunch of cleanups, mainly issues that have been closed and the tests should have been updated.

Importantly, there are many known-bug tests linking to #110395. This *probably* isn't right - that is a tracking issue. But I don't really know what the "right" thing to do here. Probably, most that are actually *supposed* to be tests for const trait need to be linked to *that* tracking issue. And any other tests that were mislabeled need to be handled accordingly e.g. #130482. cc `@fee1-dead`
2024-09-27 21:35:07 +02:00
Guillaume Gomez
3187d32079
Merge pull request #556 from GuillaumeGomez/sync_2024-08-12
Sync 2024-08-12
2024-09-27 21:17:21 +02:00
Lukas Markeffsky
53f45c4332 borrowck: use subtyping instead of equality for ptr-to-ptr casts 2024-09-27 21:04:32 +02:00
Lukas Markeffsky
8302f2e35f add even more tests for ptr-to-ptr casts on trait objects 2024-09-27 21:04:32 +02:00
Jubilee Young
a2a4ea0850 Partially revert "ci: Use mv instead of cp in upload step"
This partially reverts commit fe7c97c2e7.

I kept a mv, not a cp, for the one that shuffles major artifacts around,
because the size of those artifacts are big enough to matter, sometimes.
I don't think the diagnostic info will be that heavy, by comparison.
2024-09-27 12:02:02 -07:00
Jubilee Young
282d04489a Revert "ci: Try to remove unused Xcode dirs"
This reverts commit 06f49f6d53.
2024-09-27 11:45:59 -07:00
Predrag Gruevski
3b9db47f07
rustdoc: update ProcMacro docs section on helper attributes
I believe the mention of attribute macros in the section on proc macro helper attributes is erroneous. As far as I can tell, attribute macros cannot define helper attributes.

The following attribute macro is not valid (fails to build), no matter how I try to define (or skip defining) the helpers:
```rust
#[proc_macro_attribute(attributes(helper))]
pub fn attribute_helpers(_attr: TokenStream, item: TokenStream) -> TokenStream {
    item
}
```

The [language reference](https://doc.rust-lang.org/reference/procedural-macros.html#attribute-macros) also doesn't seem to mention attribute macro helpers. The helpers subsection is inside the section on derive macros.
2024-09-27 14:34:48 -04:00
Jack Huey
e5e1fadc2b Cleanup some known-bug issues 2024-09-27 18:15:37 +00:00
Antoni Boucher
12575df6ba Cleanup 2024-09-27 14:04:23 -04:00
bors
68790c052f Auto merge of #3920 - ChrisDenton:cc, r=RalfJung
Update cc to 1.1.22

This version of `cc` contains a fix to prevent spurious rebuilds. Hopefully this should help avoid the CI issues rustc has been having.
2024-09-27 17:58:34 +00:00
Chris Denton
74d7b226ee
Update cc to 1.1.22 2024-09-27 17:40:50 +00:00
bors
fa724e5d8c Auto merge of #130934 - matthiaskrgr:rollup-4puticr, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #129087 (Stabilize `option_get_or_insert_default`)
 - #130435 (Move Apple linker args from `rustc_target` to `rustc_codegen_ssa`)
 - #130459 (delete sub build directory "debug" to not delete the change-id file)
 - #130873 (rustc_target: Add powerpc64 atomic-related features)
 - #130916 (Use `&raw` in the compiler)
 - #130917 (Fix error span if arg to `asm!()` is a macro call)
 - #130927 (update outdated comments)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-27 17:28:47 +00:00
Matthias Krüger
966a0b76bc
Rollup merge of #130927 - lcnr:normalizes-to-comments, r=compiler-errors
update outdated comments

r? `@compiler-errors` cc `@gavinleroy`
2024-09-27 19:08:01 +02:00
Matthias Krüger
01fecf60ef
Rollup merge of #130917 - gurry:129503-ice-wrong-span-in-macros, r=chenyukang
Fix error span if arg to `asm!()` is a macro call

Fixes #129503

When the argument to `asm!()` is a macro call, e.g. `asm!(concat!("abc", "{} pqr"))`, and there's an error in the resulting template string, we do not take into account the presence of this macro call while computing the error span. This PR fixes that. Now we will use the entire thing between the parenthesis of `asm!()` as the error span in this situation e.g. for `asm!(concat!("abc", "{} pqr"))` the error span will be `concat!("abc", "{} pqr")`.
2024-09-27 19:08:01 +02:00
Matthias Krüger
a37f7f457f
Rollup merge of #130916 - cuviper:compiler-raw_ref_op, r=compiler-errors
Use `&raw` in the compiler

Like #130865 did for the standard library, we can use `&raw` in the
compiler now that stage0 supports it. Also like the other issue, I did
not make any doc or test changes at this time.
2024-09-27 19:08:00 +02:00
Matthias Krüger
fd9d961ed8
Rollup merge of #130873 - taiki-e:ppc64-atomic, r=Amanieu
rustc_target: Add powerpc64 atomic-related features

This adds the following two target features to unstable powerpc_target_feature.

- `partword-atomics`: 8-bit and 16-bit atomic instructions (`l{b,h}arx` and `st{b,h}cx.`) ([definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/PowerPC/PPC.td#L170-L172))
- `quadword-atomics`: 128-bit atomic instructions (`lqarx` and `stqcx.`) ([definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/PowerPC/PPC.td#L173-L175))

Both features are [available on power8+](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/PowerPC/PPC.td#L408-L422), so enabled by default for `powerpc64le-*` targets.

r? `@Amanieu`

`@rustbot` label +O-PowerPC
2024-09-27 19:08:00 +02:00
Matthias Krüger
56e5bfac28
Rollup merge of #130459 - onur-ozkan:#130449, r=albertlarsan68
delete sub build directory "debug" to not delete the change-id file

Fixes #130449
2024-09-27 19:07:59 +02:00
Matthias Krüger
f9cd81f3d9
Rollup merge of #130435 - madsmtm:move-apple-link-args, r=petrochenkov
Move Apple linker args from `rustc_target` to `rustc_codegen_ssa`

They are dependent on the deployment target and SDK version, but having these in `rustc_target` makes it hard to introduce that dependency. Part of the work needed to do https://github.com/rust-lang/rust/issues/118204, see https://github.com/rust-lang/rust/pull/129342 for some discussion.

Tested using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7k-apple-watchos,armv7s-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
IPHONEOS_DEPLOYMENT_TARGET=10.0 ./x test tests/run-make/apple-deployment-target --target=i386-apple-ios
```

`arm64e-apple-darwin` and `arm64e-apple-ios` have not been tested, see https://github.com/rust-lang/rust/issues/130085, neither is `i686-apple-darwin`, since that requires using an x86_64 macbook, and I currently can't get mine to work, see https://github.com/rust-lang/rust/issues/130434.

CC `@petrochenkov`
2024-09-27 19:07:59 +02:00
Matthias Krüger
e76eb96a00
Rollup merge of #129087 - slanterns:option_get_or_insert_default, r=dtolnay
Stabilize `option_get_or_insert_default`

Closes: https://github.com/rust-lang/rust/issues/82901.

`@rustbot` label: +T-libs-api

r? libs-api
2024-09-27 19:07:58 +02:00
Kajetan Puchalski
a1846ec22f
gitignore: Add eglot LSP config file 2024-09-27 17:29:31 +01:00
Kajetan Puchalski
6453f7e514
etc: Add rust-analyzer configs for eglot & helix
LSP configuration in editors like Emacs (eglot) and helix does not
use the same JSON format as vscode and vim do. It is not obvious
how to set up LSP for rustc in those editors and the dev guide currently
does not cover them. Adding sample configuration files for those editors
alongside the currently existing JSON one would be helpful.
2024-09-27 17:28:19 +01:00
Antoni Boucher
117cf3e3cd Fix for libgccjit 12 2024-09-27 12:12:24 -04:00
Antoni Boucher
11f4f160d3 Implement a hack for an intrinsic mapping where we need to output a different builtin based on an argument 2024-09-27 12:07:34 -04:00
Michael Goulet
24290efaff Mark some more smart pointers as insignificant 2024-09-27 11:59:39 -04:00
Michael Goulet
7033468a67 Mark some more types as having insignificant dtor 2024-09-27 11:59:39 -04:00
Deadbeef
7c2a24b50c properly elaborate effects implied bounds for super traits 2024-09-27 22:36:46 +08:00
Antoni Boucher
1e8354a461 Fix mapping 2024-09-27 09:40:49 -04:00
onur-ozkan
cd1b245c99 improve LLVM submodule handling logic in llvm::prebuilt_llvm_config
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-27 16:09:26 +03:00
Urgau
61ef9838df compiletest: fallback to the original path if it's not a symlink 2024-09-27 14:05:24 +02:00
lcnr
9766192545 update outdated comments 2024-09-27 13:48:11 +02:00
Urgau
8075ddb98e Implement RFC3137 trim-paths sysroot changes 2024-09-27 13:27:54 +02:00
Chris Denton
6c852d3ec4
Allow shlex stdlib dependency 2024-09-27 10:06:48 +00:00
bors
a3f76a26e0 Auto merge of #130857 - lukas-code:no-clones-allowed, r=notriddle
rustdoc perf: clone `clean::Item` less

In https://github.com/rust-lang/rust/pull/130798, I caused a small perf regression for rustdoc (see https://github.com/rust-lang/rust/pull/130807#issuecomment-2373116917), so here is a small improvement to make up for it 😺.

This change is actually unrelated to the minor perf regression in `Item::stability` and instead fixes a more relevant perf problem that I found while investigating: For certain crates with many impls on type aliases, we unnecessarily cloned large `clean::Item`s multiple times -- now we just borrow them.
2024-09-27 09:50:52 +00:00
Chris Denton
892d192b15
Update Cargo.lock 2024-09-27 09:41:56 +00:00
Lukas Bergdoll
d17ba5d5c8 Apply review feedback 2024-09-27 11:31:56 +02:00
Lukas Bergdoll
5559ebe094 Apply round 1 of review comments 2024-09-27 11:31:56 +02:00
Lukas Bergdoll
d9449315ad Fix mistake in example 2024-09-27 11:31:56 +02:00
Lukas Bergdoll
a2c82f9b2b Improve Ord docs
- Makes wording more clear and re-structures some
  sections that can be overwhelming for some not
  already in the know.
- Adds examples of how *not* to implement Ord,
  inspired by various anti-patterns found in real
  world code.
2024-09-27 11:31:56 +02:00
surechen
0bf928968b Make clashing_extern_declarations considering generic args for ADT field
fixes #130851
2024-09-27 16:37:43 +08:00
Asger Hautop Drewsen
fa3215daad Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4 2024-09-27 10:05:52 +02:00