Commit Graph

262708 Commits

Author SHA1 Message Date
Ken Micklas
4560770451 Fix some uses of "map" instead of "set" in BTreeSet cursor API docs 2024-08-01 19:48:23 +01:00
Ken Micklas
020476296b Share UnorderedKeyError with BTReeMap for set API 2024-08-01 19:47:57 +01:00
bors
a886938671 Auto merge of #128504 - matthiaskrgr:rollup-pawylnk, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #127490 (Add target page for riscv64gc-unknown-linux-gnu)
 - #128433 (fix(hermit): `deny(unsafe_op_in_unsafe_fn)`)
 - #128482 (interpret: on a signed deref check, mention the right pointer in the error)
 - #128496 (Fix removed `box_syntax` diagnostic if source isn't available)
 - #128497 (fix dropck documentation for `[T;0]` special-case)
 - #128499 (chore: refactor backtrace formatting)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-01 16:50:50 +00:00
Matthias Krüger
e6b6d04b06
Rollup merge of #128499 - Konippi:refactor-backtrace-formatting, r=tgross35
chore: refactor backtrace formatting

Replace `write_str()` with the `writeln!()` macro, consolidating multiple write operations.
2024-08-01 18:43:42 +02:00
Matthias Krüger
ca73b8b7a5
Rollup merge of #128497 - Bryanskiy:fix-dropck-doc, r=lcnr
fix dropck documentation for `[T;0]` special-case

fixes https://github.com/rust-lang/rust/issues/110288.

r? ``@lcnr``
2024-08-01 18:43:41 +02:00
Matthias Krüger
29cd3103a1
Rollup merge of #128496 - clubby789:box-syntax-multipart, r=compiler-errors
Fix removed `box_syntax` diagnostic if source isn't available

Fix #128442
2024-08-01 18:43:41 +02:00
Matthias Krüger
8671b0bfbd
Rollup merge of #128482 - RalfJung:ptr-signed-offset, r=oli-obk
interpret: on a signed deref check, mention the right pointer in the error

When a negative offset (like `ptr.offset(-10)`) goes out-of-bounds, we currently show an error saying that we expect the *resulting* pointer to be inbounds for 10 bytes. That's confusing, so this PR makes it so that instead we say that we expect the *original* pointer `ptr` to have 10 bytes *to the left*.

I also realized I can simplify the pointer arithmetic logic and handling of "staying inbounds of a target `usize`" quite a bit; the second commit does that.
2024-08-01 18:43:40 +02:00
Matthias Krüger
683f2d3cb2
Rollup merge of #128433 - hermit-os:hermit-unsafe_op_in_unsafe_fn, r=joboet
fix(hermit): `deny(unsafe_op_in_unsafe_fn)`

Tracking issue: https://github.com/rust-lang/rust/issues/127747

r? workingjubilee

CC: ``@stlankes``
2024-08-01 18:43:39 +02:00
Matthias Krüger
93561a1767
Rollup merge of #127490 - ferrocene:hoverbear/add-riscv64gc-unknown-linux-target-page, r=pietroalbini
Add target page for riscv64gc-unknown-linux-gnu

I was reading https://github.com/rust-lang/rust/issues/113739 and realized I knew most of the information necessary to create the `riscv64gc-unknown-linux-gnu` target page.
2024-08-01 18:43:38 +02:00
Alona Enraght-Moony
73ac5e0c6e rustdoc: Remove OpaqueTy 2024-08-01 15:57:45 +00:00
Alona Enraght-Moony
52a49d94c7 rustdoc: Add test for impl_trait_in_accos_type 2024-08-01 15:48:22 +00:00
Konippi
45d35ba4fd chore: refactor backtrace formatting 2024-08-02 00:24:29 +09:00
Oneirical
94da7b157a rewrite stable-symbol-names to rmake 2024-08-01 11:07:04 -04:00
Oneirical
b485dd1495 rewrite reproducible-build-2 to rmake 2024-08-01 10:56:48 -04:00
Bryanskiy
c8a3cafc0f fix dropck documentation for [T;0] special-case 2024-08-01 17:44:14 +03:00
Guillaume Gomez
f44958679a Update sysinfo version to 0.31.2 2024-08-01 16:39:55 +02:00
Ralf Jung
6d312d7bd1 MIR required_consts, mentioned_items: ensure we do not forget to fill these lists 2024-08-01 15:49:25 +02:00
bors
e60ebb2f2c Auto merge of #128490 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-08-01 13:13:38 +00:00
clubby789
e157954cce Fix removed box_syntax diagnostic if source isn't available 2024-08-01 13:11:24 +00:00
Ralf Jung
db1652e07b fix the way we detect overflow for inbounds arithmetic (and tweak the error message) 2024-08-01 14:38:58 +02:00
Ralf Jung
5d5c97aad7 interpret: simplify pointer arithmetic logic 2024-08-01 14:25:19 +02:00
Ralf Jung
de78cb56b2 on a signed deref check, mention the right pointer in the error 2024-08-01 14:25:19 +02:00
bors
c0e32983f5 Auto merge of #127543 - carbotaniuman:more_unsafe_attr_verification, r=estebank,traviscross
More unsafe attr verification

This code denies unsafe on attributes such as `#[test]` and `#[ignore]`, while also changing the `MetaItem` parsing so `unsafe` in args like `#[allow(unsafe(dead_code))]` is not accidentally allowed.

Tracking:

- https://github.com/rust-lang/rust/issues/123757
2024-08-01 10:40:45 +00:00
bors
9ec4844925 Auto merge of #17761 - RalfJung:josh-roudntrip-error, r=lnicola
when josh-proxy screws up the roundtrip, say what the involved commits are

Helps debugging https://github.com/rust-lang/rust-analyzer/issues/17733
2024-08-01 10:38:36 +00:00
Martin Kröning
820ec720ff
fix(os/hermit): deny(unsafe_op_in_unsafe_fn)
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2024-08-01 12:34:43 +02:00
Martin Kröning
4da966c30e
fix(pal/hermit): deny(unsafe_op_in_unsafe_fn)
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2024-08-01 12:34:43 +02:00
Martin Kröning
b21af629ef
refactor(pal/hermit): make ENV a non-mutable static
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2024-08-01 12:34:43 +02:00
bors
9de5630c1c Auto merge of #3782 - RalfJung:josh-roundtrip-error, r=RalfJung
when josh-proxy screws up the roundtrip, say what the involved commits are
2024-08-01 10:29:45 +00:00
Ralf Jung
70805f9a6b when josh-proxy screws up the roundtrip, say what the involved commits are 2024-08-01 12:28:02 +02:00
Ralf Jung
91175463e4 when josh-proxy screws up the roundtrip, say what the involved commits are 2024-08-01 12:26:32 +02:00
bors
769e900d23 Auto merge of #3781 - RalfJung:flock, r=RalfJung
flock: a bit of cleanup

Follow-up to https://github.com/rust-lang/miri/pull/3759
2024-08-01 09:31:15 +00:00
Nicholas Nethercote
d1f05fd184 Distinguish the two kinds of token range.
When collecting tokens there are two kinds of range:
- a range relative to the parser's full token stream (which we get when
  we are parsing);
- a range relative to a single AST node's token stream (which we use
  within `LazyAttrTokenStreamImpl` when replacing tokens).

These are currently both represented with `Range<u32>` and it's easy to
mix them up -- until now I hadn't properly understood the difference.

This commit introduces `ParserRange` and `NodeRange` to distinguish
them. This also requires splitting `ReplaceRange` in two, giving the new
types `ParserReplacement` and `NodeReplacement`. (These latter two names
reduce the overloading of the word "range".)

The commit also rewrites some comments to be clearer.

The end result is a little more verbose, but much clearer.
2024-08-01 19:30:40 +10:00
Nicholas Nethercote
9d77d17f71 Move a comment to a better spot. 2024-08-01 19:30:39 +10:00
Nicholas Nethercote
2eb2ef1684 Streamline attribute stitching on AST nodes.
It can be done more concisely.
2024-08-01 19:30:32 +10:00
Ralf Jung
5af27e4617 flock: a bit of cleanup 2024-08-01 11:29:40 +02:00
bors
bf5844ea2d Auto merge of #17756 - Wilfred:fix_adoc_json, r=Veykril
docs: Fix JSON example for rust-analyzer.workspace.discoverConfig

The user does not specify `{arg}` in their JSON, and be pedantic about commas in JSON sample.
2024-08-01 08:15:44 +00:00
bors
97ac52f579 Auto merge of #128481 - matthiaskrgr:rollup-efa706r, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #128416 (android: Remove libstd hacks for unsupported Android APIs)
 - #128437 (improve bootstrap to allow selecting llvm tools individually)
 - #128450 (Create COFF archives for non-LLVM backends)
 - #128458 (Emit an error if `#[optimize]` is applied to an incompatible item)
 - #128477 (Finish blessing `coverage/mcdc` tests after LLVM 19 upgrade)
 - #128478 (Ignore `use` declaration reformatting in `.git-blame-ignore-revs`.)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-01 08:09:31 +00:00
Matthias Krüger
ff1476ca20
Rollup merge of #128478 - nnethercote:update-git-blame-ignore-revs, r=jieyouxu
Ignore `use` declaration reformatting in `.git-blame-ignore-revs`.

The reformatting was done in #125443.

r? `@lcnr`
2024-08-01 08:33:30 +02:00
Matthias Krüger
5dc8d49ba5
Rollup merge of #128477 - Zalathar:bless-mcdc-19, r=cuviper
Finish blessing `coverage/mcdc` tests after LLVM 19 upgrade

Context: https://github.com/rust-lang/rust/pull/127513#issuecomment-2260887708

These changes aren't needed for Rust CI, because after the LLVM 19 upgrade we have no jobs that run these tests in `coverage-run` mode against LLVM 18. But they might help external builds.

The longer-term plan is to completely drop (unstable) MC/DC support on LLVM 18, as part of getting it working on LLVM 19 in #126733.

cc `@cuviper`
2024-08-01 08:33:30 +02:00
Matthias Krüger
7c60525877
Rollup merge of #128458 - clubby789:optimize-unused-attr, r=compiler-errors
Emit an error if `#[optimize]` is applied to an incompatible item

#54882

The RFC specifies that this should emit a lint. I used the same allow logic as the `coverage` attribute (also allowing modules and impl blocks) - this should possibly be changed depending on if it's decided to allow 'propogation' of the attribute.
2024-08-01 08:33:29 +02:00
Matthias Krüger
2c3b89e4d8
Rollup merge of #128450 - dpaoliello:coff, r=bjorn3
Create COFF archives for non-LLVM backends

`ar_archive_writer` now supports creating COFF archives, so enable them for the non-LLVM backends when requested.

r? ``@bjorn3``
2024-08-01 08:33:28 +02:00
Matthias Krüger
cd525270f9
Rollup merge of #128437 - onur-ozkan:handle-llvm-tools-properly, r=albertlarsan68,Kobzol
improve bootstrap to allow selecting llvm tools individually

Everything works as before, + now bootstrap allows for individually selecting LLVM tools (e.g., `x dist opt llvm-dis`) to include in the dist artifact.
2024-08-01 08:33:28 +02:00
Matthias Krüger
0cda002610
Rollup merge of #128416 - maurer:remove-android-hack, r=tgross35
android: Remove libstd hacks for unsupported Android APIs

Our minimum supported API version is 21, remove hacks to support older Android APIs.

try-job: arm-android

r? tgross35
2024-08-01 08:33:27 +02:00
bors
70591dc15d Auto merge of #127060 - Oneirical:testificate, r=jieyouxu
Migrate `symbol-visibility` `run-make` test to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Pretty scary!

- The expected number of symbols on each check has been changed slightly to reflect the differences between `llvm_readobj` and `nm`, as I think the former will print hidden symbols once and visible symbols twice, while the latter will only print visible symbols.
- The original test ran the same exact checks on `cdylib` twice, for seemingly no reason. I have removed it.
- This may be possible to optimize some more? `llvm_readobj` could get called only once for each library type, and the regex could avoid being created repeatedly. I am not sure if these kinds of considerations are important for a `run-make` test.

Demands a Windows try-job.

try-job: x86_64-mingw
2024-08-01 05:42:09 +00:00
Nicholas Nethercote
36075eb7f3 Ignore use declaration reformatting in .git-blame-ignore-revs. 2024-08-01 14:33:17 +10:00
Zalathar
68df46c4c2 Finish blessing coverage/mcdc tests after LLVM 19 upgrade 2024-08-01 13:36:50 +10:00
bors
e485266c67 Auto merge of #128461 - matthiaskrgr:rollup-3dpp11g, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #123813 (Add `REDUNDANT_IMPORTS` lint for new redundant import detection)
 - #126697 ([RFC] mbe: consider the `_` in 2024 an expression)
 - #127159 (match lowering: Hide `Candidate` from outside the lowering algorithm)
 - #128244 (Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck, remove some hacks)
 - #128431 (Add myself as VxWorks target maintainer for reference)
 - #128438 (Add special-case for [T, 0] in dropck_outlives)
 - #128457 (Fix docs for OnceLock::get_mut_or_init)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-01 02:26:32 +00:00
bors
71b2116096 Auto merge of #128469 - matthiaskrgr:rollup-00svite, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #127567 (std: implement the `once_wait` feature)
 - #128162 (Cleanup sys module to match house style)
 - #128296 (Update target-spec metadata for loongarch64 targets)
 - #128443 (Properly mark loop as diverging if it has no breaks)
 - #128449 (Temporarily switch `ambiguous_negative_literals` lint to allow)
 - #128452 (derive(SmartPointer): require pointee to be maybe sized)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-01 00:03:28 +00:00
Wilfred Hughes
1df27d84a1 docs: Fix JSON example for rust-analyzer.workspace.discoverConfig
The user does not specify `{arg}` in their JSON, and be pedantic about
commas in JSON sample.
2024-07-31 16:10:42 -07:00
Matthias Krüger
cf900ab62d
Rollup merge of #128452 - dingxiangfei2009:smart-ptr-require-maybe-sized, r=compiler-errors
derive(SmartPointer): require pointee to be maybe sized

cc ``@Darksonn``

So `#[pointee]` has to be `?Sized` in order for deriving `SmartPointer` to be meaningful.

cc ``@compiler-errors`` for suggestions in #127681
2024-08-01 00:50:13 +02:00