Commit Graph

266394 Commits

Author SHA1 Message Date
bors
f7f8bdf2e0 Auto merge of #130195 - folkertdev:naked-asm-outside-naked-fn, r=Amanieu
disallow `naked_asm!` outside of `#[naked]` functions

tracking issue: https://github.com/rust-lang/rust/issues/90957
parent PR: https://github.com/rust-lang/rust/pull/128651

I split this out from the parent PR because it's self-contained and because the analysis has to search through all functions and there might be performance regressions.

r? `@Amanieu`
2024-09-11 13:47:26 +00:00
bors
16beabe1e1 Auto merge of #130212 - DianQK:llvm-19, r=nikic
Update LLVM to 19 327ca6c

Fixes #129887.

r? nikic
2024-09-11 10:57:43 +00:00
Olivier Goffart
cc34d64c51 Use doc(hidden) instead of allow(missing_docs) in the test harness
So that it doesn't fail with `forbid(missing_docs)`

Fixes #130218
2024-09-11 12:14:35 +02:00
Olivier Goffart
5d456dfaa1 Use #[doc(hidden)] instead of #[allow(missing_docs)] on the const generated for #[test] 2024-09-11 11:49:27 +02:00
Vetle Rasmussen
9566163364 Make SearchPath::new public 2024-09-11 11:40:01 +02:00
Olivier Goffart
6eddbb704e Fix false positive with missing_docs and #[test]
Since #130025, the compiler don't ignore missing_docs when compiling the tests.
But there is now a false positive warning for every `#[test]`

For example, this code
```rust
//! Crate docs

fn just_a_test() {}
```

Would emit this warning when running `cargo test`

```
warning: missing documentation for a constant
 --> src/lib.rs:5:1
  |
4 | #[test]
  | ------- in this procedural macro expansion
5 | fn just_a_test() {}
  | ^^^^^^^^^^^^^^^^^^^
```
2024-09-11 11:33:10 +02:00
Ralf Jung
542a6c67ae miri: support vector index arguments in simd_shuffle 2024-09-11 11:19:46 +02:00
bors
59835ae759 Auto merge of #3878 - rust-lang:rustup-2024-09-11, r=RalfJung
Automatic Rustup
2024-09-11 08:05:00 +00:00
Ralf Jung
7e6ce60ffb also allow illumos to use mmap for its stack guard 2024-09-11 10:03:13 +02:00
bors
5a2dd7d4f3 Auto merge of #130194 - lcnr:generalize-cache, r=compiler-errors
generalize: track relevant info in cache key

This was previously theoretically incomplete as we could incorrectly generalize as if the type was in an invariant context even though we're in a covariant one. Similar with the `in_alias` flag.

r? `@compiler-errors`
2024-09-11 07:17:12 +00:00
Ralf Jung
b44f1dd758 update stdarch 2024-09-11 08:35:32 +02:00
Ralf Jung
d4ac759542 MaybeUninit::zeroed: mention that padding is not zeroed 2024-09-11 08:08:39 +02:00
onur-ozkan
5f32717649 document the new git logic in more detail
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-11 08:33:34 +03:00
Zachary S
5f72f9dfc3 Regression test for #129541 2024-09-11 00:17:38 -05:00
The Miri Cronjob Bot
19fa141a6d Merge from rustc 2024-09-11 05:12:24 +00:00
The Miri Cronjob Bot
4712e57255 Preparing for merge from rustc 2024-09-11 05:04:32 +00:00
bors
4c5fc2c334 Auto merge of #130050 - cjgillot:expect-attr-id, r=fee1-dead
Enumerate lint expectations using AttrId

This PR implements the idea I outlined in https://github.com/rust-lang/rust/issues/127884#issuecomment-2240338547

We can uniquely identify a lint expectation `#[expect(lint0, lint1...)]` using the `AttrId` and the index of the lint inside the attribute. This PR uses this property in `check_expectations`.

In addition, this PR stops stashing expected diagnostics to wait for the unstable -> stable `LintExpectationId` mapping: if the lint is emitted with an unstable attribute, it must have been emitted by an `eval_always` query (like inside the resolver), so won't be loaded from cache. Decoding an `AttrId` from the on-disk cache ICEs, so we have no risk of accidentally checking an expectation.

Fixes https://github.com/rust-lang/rust/issues/127884

cc `@xFrednet`
2024-09-11 04:49:56 +00:00
bors
a9fb00bfa4 Auto merge of #129975 - notriddle:notriddle/lint-skip, r=GuillaumeGomez
rustdoc: unify the short-circuit on all lints

This is a bit of an experiment to see if it improves perf.
2024-09-11 01:17:54 +00:00
DianQK
7c692e13b1
Update LLVM to 19 327ca6c 2024-09-11 07:59:27 +08:00
Ralf Jung
e556c136f3 clean up internal comments about float semantics
- remove an outdated FIXME
- add reference to floating-point semantics issue

Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-09-10 16:47:09 -07:00
Ralf Jung
3daa9518d5 enable and extend float-classify test 2024-09-10 16:47:01 -07:00
Jubilee Young
c40ee79b84 move float tests into their own dir 2024-09-10 16:05:37 -07:00
Ralf Jung
180eacea1c these tests seem to work fine on i586 these days 2024-09-10 15:57:40 -07:00
bors
6f7229c4da Auto merge of #129403 - scottmcm:only-array-simd, r=compiler-errors
Ban non-array SIMD

Nearing the end of https://github.com/rust-lang/compiler-team/issues/621 !

Currently blocked on ~~https://github.com/rust-lang/compiler-builtins/pull/673~~ ~~https://github.com/rust-lang/compiler-builtins/pull/674~~ ~~https://github.com/rust-lang/rust/pull/129400~~ ~~https://github.com/rust-lang/rust/pull/129481~~ for windows.
2024-09-10 22:47:40 +00:00
James Liu
4198594ef2 Clarify docs for std::collections
Page affected: https://doc.rust-lang.org/std/collections/index.html#performance

Changes:

- bulleted conventions
- expanded definitions on terms used
- more accessible language
- merged Sequence and Map performance cost tables
2024-09-10 14:25:38 -07:00
Pavel Grigorenko
49b3df9245 Map ERROR_CANT_RESOLVE_FILENAME to ErrorKind::FilesystemLoop 2024-09-11 00:18:23 +03:00
Pavel Grigorenko
8f815978b5 Map WSAEDQUOT to ErrorKind::FilesystemQuotaExceeded 2024-09-11 00:15:43 +03:00
FedericoBruzzone
4cecf42971 Report the note when specified in diagnostic::on_unimplemented
Signed-off-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2024-09-10 23:05:36 +02:00
Ralf Jung
d104dedad9 interpret: mark some hot functions inline(always)
recovers some of the perf regressions from #129778
2024-09-10 22:43:56 +02:00
bors
0ee7cb5e36 Auto merge of #130200 - matthiaskrgr:rollup-2g4ijc5, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #130143 (miri-test-libstd: add missing BOOTSTRAP_ARGS)
 - #130173 (rustdoc: add two regression tests)
 - #130175 (`rustc_mir_transform` cleanups 3)
 - #130184 (coverage: Clean up terminology in counter creation)
 - #130185 (abi/compatibility test: remove tests inside repr(C) wrappers)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-10 20:18:27 +00:00
Ding Xiang Fei
89682a5313
downgrade borrowck suggestion level due to possible span conflict 2024-09-11 04:10:04 +08:00
Ding Xiang Fei
e2120a7c38
coalesce lint suggestions that can intersect 2024-09-11 04:10:03 +08:00
Ding Xiang Fei
f93df1f7dc
rescope temp lifetime in let-chain into IfElse
apply rules by span edition
2024-09-11 04:10:00 +08:00
Paul Menage
3810386bbe Add -Z small-data-threshold
This flag allows specifying the threshold size above which LLVM should
not consider placing small objects in a .sdata or .sbss section.

Support is indicated in the target options via the
small-data-threshold-support target option, which can indicate either an
LLVM argument or an LLVM module flag.  To avoid duplicate specifications
in a large number of targets, the default value for support is
DefaultForArch, which is translated to a concrete value according to the
target's architecture.
2024-09-10 12:19:16 -07:00
onur-ozkan
0a7f9e2134 skip formatting if no files have been modified
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-10 20:34:56 +03:00
onur-ozkan
35ce85e0fd handle GitConfig for tools/compiletest
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-10 20:34:43 +03:00
onur-ozkan
b5d69ba9fb add change entry for "tools" and "library" profile update
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-10 19:07:50 +03:00
onur-ozkan
ed89d9b7a2 force ci-llvm by default on library and tools profiles
It's very rare for developers to need to modify LLVM,
so "if-unchanged" isn't a good default since it fetches
the LLVM submodule to track changes.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-10 19:07:18 +03:00
Matthias Krüger
a42d67e6cc
Rollup merge of #130185 - RalfJung:abi-compat-repr-c-wrappers, r=compiler-errors
abi/compatibility test: remove tests inside repr(C) wrappers

When I wrote the test I assumed we'd guarantee ABI compatibility to be "structural" wrt `repr(C)` types, i.e. if two `repr(C)` types have all their fields be pairwise ABI-compatible then the types are ABI-compatible. That got removed from the ABI compatibility docs before they landed, though, so let's also remove it from this test.
2024-09-10 17:35:16 +02:00
Matthias Krüger
98222a524d
Rollup merge of #130184 - Zalathar:counters, r=compiler-errors
coverage: Clean up terminology in counter creation

Some of the terminology in this module is confusing, or has drifted out of sync with other parts of the coverage code.

This PR therefore renames some variables and methods, and adjusts comments and debug logging statements, to make things clearer and more consistent.

No functional changes, other than some small tweaks to debug logging.
2024-09-10 17:35:15 +02:00
Matthias Krüger
accd77ebd6
Rollup merge of #130175 - nnethercote:rustc_mir_transform-cleanups-3, r=saethlin
`rustc_mir_transform` cleanups 3

More cleanups in the style of https://github.com/rust-lang/rust/pull/129929.

r? `@saethlin`
2024-09-10 17:35:14 +02:00
Matthias Krüger
a204f87de8
Rollup merge of #130173 - fmease:rustdoc-regression-tests, r=notriddle
rustdoc: add two regression tests

They were basically copy/pasted from `tests/ui/` to `tests/rustdoc-ui/`.
Not sure if it's worth adding these, I can just close these issues as is if you want.

This brings the number of https://github.com/rust-lang/rust/labels/T-rustdoc + https://github.com/rust-lang/rust/labels/E-needs-test from 3 down to 1.
The remaining one – #103004 — is a nasty one to retroactively find a proper(!) test for.

Fixes #98250.
Fixes #107872.

r? rustdoc
2024-09-10 17:35:14 +02:00
Matthias Krüger
34c935baf3
Rollup merge of #130143 - RalfJung:miri-test-libstd, r=compiler-errors
miri-test-libstd: add missing BOOTSTRAP_ARGS

Note sure if BOOTSTRAP_ARGS will make any difference here, but all the other x.py invocations have it and I did not *deliberately* leave it away when I added these, so... probably best to add them?

Also don't unnecessarily set BOOTSTRAP_SKIP_TARGET_SANITY while we are at it.
2024-09-10 17:35:13 +02:00
Florian Schmiderer
713828d4f4 Add test for S_OBJNAME and update test for LF_BUILDINFO cl and cmd for
pdb files.
2024-09-10 17:23:05 +02:00
Michael Goulet
5cf117ed05 Don't call closure_by_move_body_def_id on FnOnce async closures in MIR validation 2024-09-10 10:55:05 -04:00
bors
33855f80d4 Auto merge of #130025 - Urgau:missing_docs-expect, r=petrochenkov
Also emit `missing_docs` lint with `--test` to fulfil expectations

This PR removes the "test harness" suppression of the `missing_docs` lint to be able to fulfil `#[expect]` (expectations) as it is now "relevant".

I think the goal was to maybe avoid false-positive while linting on public items under `#[cfg(test)]` but with effective visibility we should no longer have any false-positive.

Another possibility would be to query the lint level and only emit the lint if it's of expect level, but that is even more hacky.

Fixes https://github.com/rust-lang/rust/issues/130021

try-job: x86_64-gnu-aux
2024-09-10 14:54:09 +00:00
lcnr
7a57a74bf5 generalize: track relevant info in cache key 2024-09-10 15:21:57 +02:00
Folkert de Vries
6ca5ec7b4e disallow naked_asm! outside of #[naked] functions 2024-09-10 15:19:14 +02:00
Ralf Jung
86075759cc abi/compatibility test: remove tests inside repr(C) wrappers 2024-09-10 13:18:20 +02:00
bors
f827364a95 Auto merge of #129337 - EtomicBomb:rfc, r=notriddle
rustdoc rfc#3662 changes under unstable flags

* All new functionality is under unstable options
* Adds `--merge=shared|none|finalize` flags
* Adds `--parts-out-dir=<crate specific directory>` for `--merge=none`
to write cross-crate info file for a single crate
* Adds `--include-parts-dir=<previously specified directory>` for
`--merge=finalize` to write cross-crate info files
* `tests/rustdoc/` tests for the new flags
2024-09-10 11:15:51 +00:00