Commit Graph

263155 Commits

Author SHA1 Message Date
Jonathan Pallant
ba0d6c9739
Update generate-copyright
This tool now scans for cargo dependencies and includes any important looking license files.

We do this because cargo package metadata is not sufficient - the Apache-2.0 license says you have to include any NOTICE file, for example. And authors != copyright holders (cargo has the former, we must include the latter).
2024-08-06 11:04:55 +01:00
bors
a411267453 Auto merge of #13210 - Alexendoo:lintcheck-force-warn, r=xFrednet
lintcheck: force warn all lints

It occurred to me that like `--filter` we could use `--force-warn` for normal operations, we especially want to see lints that crates decided were too annoying or were false positives

Also excludes `clippy::cargo` from the default set as nobody is really writing those and it slows things down

r? `@xFrednet`

changelog: none
2024-08-06 09:46:08 +00:00
Ralf Jung
5783e73f46 make some Frame fields more private 2024-08-06 11:08:14 +02:00
Ralf Jung
522af10ccc interpret: refactor function call handling to be better-abstracted 2024-08-06 11:08:12 +02:00
bors
93ea767e29 Auto merge of #126804 - estebank:short-error-primary-label, r=davidtwco
On short error format, append primary span label to message

The `error-format=short` output only displays the path, error code and main error message all in the same line. We now add the primary span label as well after the error message, to provide more context.
2024-08-06 07:06:24 +00:00
Pavel Grigorenko
15982b2fca rustc_errors: fix inaccurate comment 2024-08-06 09:26:47 +03:00
Pavel Grigorenko
b0a8944120 rustc_errors: enforce OUTPUT_REPLACEMENTS is sorted with a compile-time assertion 2024-08-06 09:26:47 +03:00
许杰友 Jieyou Xu (Joe)
97cbc2083f check_attr: treat cfg_attr like cfg 2024-08-06 06:12:10 +00:00
许杰友 Jieyou Xu (Joe)
fdb64b9478 tests: add regression test to make sure cfg_attr isn't considered unhandled 2024-08-06 06:12:10 +00:00
bors
cfb38819cc Auto merge of #13145 - xFrednet:07797-restriction-and-then-why, r=Jarcho
Make restriction lint's use `span_lint_and_then` (q -> w)

This migrates a few restriction lints to use `span_lint_and_then`. This change is motivated by https://github.com/rust-lang/rust-clippy/issues/7797.

I've also cleaned up some lint message. Mostly minor stuff. For example: suggestions with a longer message than `"try"` now use `SuggestionStyle::ShowAlways`

---

cc: https://github.com/rust-lang/rust-clippy/issues/7797

sister PR of: https://github.com/rust-lang/rust-clippy/pull/13136

changelog: none
2024-08-06 04:47:27 +00:00
Esteban Küber
1bbaf6eb2f On short error format, append primary span label to message
The `error-format=short` output only displays the path, error code and
main error message all in the same line. We now add the primary span label
as well after the error message, to provide more context.
2024-08-06 04:08:10 +00:00
bors
8c7e0e1608 Auto merge of #128200 - estebank:normalize-whitespace, r=pnkfelix
Change output normalization logic to be linear against size of output

Modify the rendered output normalization routine to scan each character *once* and construct a `String` to be printed out to the terminal *once*, instead of using `String::replace` in a loop multiple times. The output doesn't change, but the time spent to prepare a diagnostic is now faster (or rather, closer to what it was before #127528).
2024-08-06 03:44:38 +00:00
bors
c9687a95a6 Auto merge of #125558 - Amanieu:const-asm-type, r=lcnr
Tweak type inference for `const` operands in inline asm

Previously these would be treated like integer literals and default to `i32` if a type could not be determined. To allow for forward-compatibility with `str` constants in the future, this PR changes type inference to use an unbound type variable instead.

The actual type checking is deferred until after typeck where we still ensure that the final type for the `const` operand is an integer type.

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->
2024-08-06 01:20:43 +00:00
y21
4c6a3f4b6e pass the right ParamEnv to might_permit_raw_init_strict 2024-08-06 01:53:50 +02:00
y21
fdf3b31165 pass the right ParamEnv to might_permit_raw_init_strict 2024-08-06 01:53:50 +02:00
Chris Denton
3fd645e254
Check staticlib name falls back to rust_out 2024-08-05 23:50:15 +00:00
bors
b586701f78 Auto merge of #128707 - matthiaskrgr:rollup-63klywk, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #122049 (Promote riscv64gc-unknown-linux-musl to tier 2)
 - #128580 (Use `ParamEnv::reveal_all` in CFI)
 - #128688 (custom MIR: add support for tail calls)
 - #128694 (Normalize when equating `dyn` tails in MIR borrowck)
 - #128697 (interpret: move nullary-op evaluation into operator.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-05 22:53:14 +00:00
Chris Denton
c6d94821f0
Don't ICE if getting the input's file_stem fails 2024-08-05 22:30:13 +00:00
Chris Denton
c8d50ef2ee
Windows: Test if \\.\NUL works as an input file 2024-08-05 22:13:17 +00:00
Matthias Krüger
c53698b399
Rollup merge of #128697 - RalfJung:nullary-op, r=compiler-errors
interpret: move nullary-op evaluation into operator.rs

We call it an operator, so we might as well treat it like one. :)

Also use more consistent naming for the "evaluate intrinsic" functions. "emulate" is really the wrong term, this *is* a genuine implementation of the intrinsic semantics after all.
2024-08-05 23:35:24 +02:00
Matthias Krüger
77f57cbcac
Rollup merge of #128694 - compiler-errors:norm, r=WaffleLapkin
Normalize when equating `dyn` tails in MIR borrowck

See the explanation in the comment.

Fixes #128621
cc `@WaffleLapkin`
2024-08-05 23:35:23 +02:00
Matthias Krüger
83155b3900
Rollup merge of #128688 - RalfJung:custom-mir-tail-calls, r=compiler-errors
custom MIR: add support for tail calls

Cc ``@WaffleLapkin``
2024-08-05 23:35:23 +02:00
Matthias Krüger
9cb3688f1f
Rollup merge of #128580 - compiler-errors:cfi-param-env, r=lcnr
Use `ParamEnv::reveal_all` in CFI

I left a huge comment for why this ICEs in the test I committed.

`typeid_for_instance` should only be called on monomorphic instances during codegen, and we should just be using `ParamEnv::reveal_all()` rather than the param-env of the instance itself. I added an assertion to ensure that we only do this for fully substituted instances (this may break with polymorphization, but I kinda don't care lol).

Fixes #114160
cc `@rcvalle`
2024-08-05 23:35:22 +02:00
Matthias Krüger
8cbf1c1b22
Rollup merge of #122049 - Amanieu:riscv64-musl-tier2, r=Mark-Simulacrum
Promote riscv64gc-unknown-linux-musl to tier 2
2024-08-05 23:35:22 +02:00
Ralf Jung
46896d6f66 interpret: move nullary-op evaluation into operator.rs 2024-08-05 22:42:34 +02:00
bors
e57f3090ae Auto merge of #128699 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-08-05 20:22:35 +00:00
binarycat
4af77dfea5 implement BufReader::peek 2024-08-05 15:44:54 -04:00
bors
5f6d07b64e Auto merge of #13222 - dtolnay-contrib:deterministic, r=flip1995
Use a deterministic number of digits in rustc_tools_util commit hashes

Using `git rev-parse --short` in rustc_tools_util causes nondeterministic compilation of projects that use `setup_version_info!` and `get_version_info!` when built from the exact same source code and git commit. The number of digits printed by `--short` is sensitive to how many other branches and tags in the repository have been fetched so far, what other commits have been worked on in other branches, how recently you had run `git gc`, platform-specific variation in git's default configuration, and platform differences in the sequence of steps performed by the release pipeline. Someone can compile a tool from a particular commit, switch branches to work on a different commit (or simply do a git fetch), go back to the first commit and be unable to reproduce the binary that was built from it previously.

Currently, variation in short commit hashes causes Clippy version strings to be out of sync between different targets. On x86_64-unknown-linux-gnu:

```console
$ clippy-driver +1.80.0 --version
clippy 0.1.80 (0514789 2024-07-21)
```

Whereas on aarch64-apple-darwin:

```console
$ clippy-driver +1.80.0 --version
clippy 0.1.80 (05147895 2024-07-21)
```

---

changelog: none
2024-08-05 19:36:16 +00:00
bjorn3
52f1ea4915 Don't skip running abi-cafe tests that give SIGILL on Windows 2024-08-05 19:13:52 +00:00
Oneirical
1054054a46 rewrite simd-ffi to rmake 2024-08-05 15:07:33 -04:00
Ralf Jung
f6edc8a07c update lockfile 2024-08-05 20:39:56 +02:00
Michael Goulet
c6f8672dd5 Normalize when equating dyn tails in MIR borrowck 2024-08-05 14:28:06 -04:00
Folkert
19679510c7
add test for symbol visibility of #[naked] functions 2024-08-05 19:55:35 +02:00
bors
a554f4d715 Auto merge of #3789 - RalfJung:deps, r=RalfJung
bump dependencies

In particular pick up https://github.com/RalfJung/rustc-build-sysroot/pull/22 to fix the fallout from https://github.com/rust-lang/rust/pull/128534.
2024-08-05 17:54:48 +00:00
Trevor Gross
c369c2034f
Add a triagebot mention for library/Cargo.lock
Since [1], `Cargo.lock` was split into `Cargo.lock` and
`library/Cargo.lock`. Update Triagebot to give the same warning for both.

[1]: https://github.com/rust-lang/rust/pull/128534
2024-08-05 12:39:35 -05:00
Ralf Jung
014fdb56b4 bump dependencies 2024-08-05 19:29:37 +02:00
bors
d1ad05a43a Auto merge of #3790 - RalfJung:ui-test-folder, r=RalfJung
use a Miri-specific folder for ui tests
2024-08-05 17:28:37 +00:00
Ralf Jung
b113bbec4f use a Miri-specific folder for ui tests 2024-08-05 19:25:56 +02:00
bjorn3
747adbdbe8
Merge pull request #1515 from lqd/abi-cafe
enable abi-cafe tests on `aarch64-apple-darwin`
2024-08-05 19:14:01 +02:00
bors
f7eefec4e0 Auto merge of #128689 - matthiaskrgr:rollup-ukyn8wq, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #128385 (rustdoc-json: discard non-local inherent impls for primitives)
 - #128559 (Don't re-elaborated already elaborated caller bounds in method probe)
 - #128631 (handle crates when they are not specified for std docs)
 - #128664 (Add `Debug` impls to API types in `rustc_codegen_ssa`)
 - #128686 (fix the invalid argument type)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-05 17:03:58 +00:00
Ralf Jung
9213c6c93f bump rustc-build-sysroot dependency 2024-08-05 19:00:29 +02:00
Rémy Rakic
1f19cdf659 mark busted tests for aarch64-apple-darwin and aarch64-unknown-linux-gnu 2024-08-05 16:44:30 +00:00
Matthias Krüger
86798401df
Rollup merge of #128686 - onur-ozkan:unnecessary-type-cast, r=Kobzol
fix the invalid argument type

It was obviously wrong..
2024-08-05 18:36:03 +02:00
Matthias Krüger
48e47a6889
Rollup merge of #128664 - fuzzypixelz:add-codegen-ssa-debug-impls, r=lcnr
Add `Debug` impls to API types in `rustc_codegen_ssa`

Some types used in `rustc_codegen_ssa`'s interface traits are missing `Debug` impls. Though I did not smear `#[derive(Debug)]` all over the crate (some structs are quite large).
2024-08-05 18:36:02 +02:00
Matthias Krüger
9d924d11c4
Rollup merge of #128631 - onur-ozkan:hotfix, r=Mark-Simulacrum
handle crates when they are not specified for std docs

Fixes a regression from https://github.com/rust-lang/rust/pull/128182.

Resolves #128610
2024-08-05 18:36:02 +02:00
Matthias Krüger
63482af982
Rollup merge of #128559 - compiler-errors:elaborate, r=lcnr
Don't re-elaborated already elaborated caller bounds in method probe

Caller bounds are already elaborated. Only elaborate object candidates' principals.

Also removes the only usage of `transitive_bounds`.
2024-08-05 18:36:01 +02:00
Matthias Krüger
376a6f9f43
Rollup merge of #128385 - its-the-shrimp:fix_114039, r=aDotInTheVoid
rustdoc-json: discard non-local inherent impls for primitives

Fixes #114039
at least it should
r? `@aDotInTheVoid`
2024-08-05 18:36:01 +02:00
Ralf Jung
212417b87f custom MIR: add support for tail calls 2024-08-05 18:23:14 +02:00
Rémy Rakic
b3df6dcb60 ensure the download folder exists when running abi-cafe 2024-08-05 16:19:58 +00:00
David Tolnay
9f6536ce6f
Use a deterministic number of digits in rustc_tools_util commit hashes 2024-08-05 08:17:18 -07:00