Commit Graph

219326 Commits

Author SHA1 Message Date
b-naber
c6d32f4b05 add myself to compiler reviewers list 2023-03-09 16:10:24 +00:00
bors
ea4ebed2ed Auto merge of #10309 - c410-f3r:arith, r=giraffate
[arithmetic_side_effects] Fix #10252

Fix #10252

At least for integers, shifts are already handled by the compiler.

----

changelog: [`arithmetic_side_effects`]: No longer lints on right or left shifts with constant integers, as the compiler warns about them.
[#10309](https://github.com/rust-lang/rust-clippy/pull/10309)
<!-- changelog_checked-->
2023-03-09 13:30:11 +00:00
Pietro Albini
9c24608b50
record the cpu usage in a gitignored directory 2023-03-09 13:55:23 +01:00
Pietro Albini
1853e113b5
add authors for two apache-2-with-llvm-exception files 2023-03-09 12:24:51 +01:00
Pietro Albini
95a659f252
annotate original authors of the ayu theme 2023-03-09 12:24:50 +01:00
Pietro Albini
3ff2d59ba1
attribute the source code from the enum-primitive crate 2023-03-09 12:24:49 +01:00
Pietro Albini
b33172a2df
replace legacy copyright annotations in submodules 2023-03-09 12:24:47 +01:00
Pietro Albini
9b5ded93f1
clarify the fuchsia code licensing 2023-03-09 12:24:46 +01:00
Pietro Albini
598dd1d7d8
mark the whole library/std/src/sync/mpmc as copyrighted by crossbeam 2023-03-09 12:24:45 +01:00
Pietro Albini
89867e8b45
avoid reuse tripping over copyright notices 2023-03-09 12:24:43 +01:00
Pietro Albini
7b9a8e113b
use the same copyright string for adobe fonts 2023-03-09 12:24:42 +01:00
Pietro Albini
39e8b35df9
split fira sans copyright notice into multiple lines 2023-03-09 12:24:41 +01:00
Pietro Albini
f2d9f6dc12
add notice for rustc_apfloat 2023-03-09 12:24:39 +01:00
Pietro Albini
7455bf4949
add mermaid.min.js notice 2023-03-09 12:24:38 +01:00
Pietro Albini
1e40d081ae
add notice for file generated with unicode data 2023-03-09 12:24:37 +01:00
Pietro Albini
f28e2fb9fd
add normalize.css notice from src/librustdoc/html/static/COPYRIGHT.txt 2023-03-09 12:24:35 +01:00
Pietro Albini
27648b7da1
explicitly list files at the top level
This helps downstream forks of the compiler like Ferrocene to have their
own annotations for their own files, without having the upstream
licensing be applied. For Ferrocene specifically we keep custom code in
a top-level ferrocene/ directory, and we don't want the dep5 file to
apply to it.
2023-03-09 12:24:34 +01:00
Pietro Albini
8bd2431444
add a note that the metadata is currently incomplete 2023-03-09 12:24:33 +01:00
Pietro Albini
49b902f06e
include directories in grouped licensing information 2023-03-09 12:24:32 +01:00
Pietro Albini
6473ff150f
strip leading dots from copyright statements 2023-03-09 12:24:30 +01:00
Matthias Krüger
5b3f84d8af
Rollup merge of #108929 - eltociear:patch-20, r=GuillaumeGomez
Fix typo in span_map.rs

correspondance -> correspondence
2023-03-09 12:11:55 +01:00
Matthias Krüger
ceff836bfe
Rollup merge of #108922 - celinval:stable-mir-bot, r=oli-obk
Add auto notification for changes to stable mir

Adds a new entry to the triagebot configuration file to notify subscribers about changes to the stable MIR. I added myself and `@oli-obk` for now.

r?oli-obk
2023-03-09 12:11:55 +01:00
Matthias Krüger
972ea7fd84
Rollup merge of #108917 - Ayush1325:tidy-improve, r=workingjubilee
Consider target_family as pal

Currently, tidy does not consider code in target_family as platform-specific. This is erroneous and should be fixed.

r? `@workingjubilee`
2023-03-09 12:11:54 +01:00
Matthias Krüger
506495a4b3
Rollup merge of #108870 - GuillaumeGomez:rustdoc-reexport-of-reexport-of-private, r=notriddle
Fix invalid inlining of reexport of reexport of private item

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

The problem is that a reexport is always resolving to the end type, so if the end type is private, the reexport inlines. Except that if you reexport a public reexport (which reexports the private item), then it should not be inlined again.

r? `@notriddle`
2023-03-09 12:11:54 +01:00
Matthias Krüger
bec7011a2c
Rollup merge of #108854 - Ezrashaw:improve-int-idents, r=oli-obk
feat/refactor: improve errors in case of ident with number at start

Improve parser code when we parse a integer (or float) literal but expect an identifier. We emit an error message saying that identifiers can't begin with numbers. This PR just improves that code and expands it to all identifiers. Note that I haven't implemented error recovery (this didn't exist before anyway), I might do that in a follow up PR.
2023-03-09 12:11:53 +01:00
Matthias Krüger
aedd94fcab
Rollup merge of #108778 - jyn514:quiet-fmt, r=albertlarsan68
x fmt: Don't print all modified files if there's more than 10

This avoids spam for dozens of modified files.

Fixes https://github.com/rust-lang/rust/issues/106920.
2023-03-09 12:11:53 +01:00
Matthias Krüger
ac258e9e02
Rollup merge of #108294 - compiler-errors:arbitary-sugg-binder, r=TaKO8Ki
Place binder correctly for arbitrary trait bound suggestion

suggest `for<'a> &'a T: Trait` instead of `&'a T: for<'a> T`.
2023-03-09 12:11:52 +01:00
Matthias Krüger
83791f9de7
Rollup merge of #106915 - notriddle:notriddle/load-only-one-theme, r=GuillaumeGomez,jsha
Only load one CSS theme by default

This is a tweaked version of #103971 that uses `document.write` to create the stylesheet link at startup, avoiding a FOUC during page navigation. It also rebases the PR, making it work with the new hashed filenames.

Fixes #82614

Preview: http://notriddle.com/notriddle-rustdoc-demos/load-only-one-theme-v2/std/index.html
2023-03-09 12:11:52 +01:00
Pietro Albini
656c31c862
fix broken collect-license-metadata 2023-03-09 11:18:48 +01:00
Ezra Shaw
252e0b3385
feat/refactor: improve errors in case of ident with number at start 2023-03-09 21:29:32 +13:00
bors
eceedd9c8b Auto merge of #108920 - matthiaskrgr:rollup-qrr9a0u, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous)
 - #108759 (1.41.1 supported 32-bit Apple targets)
 - #108839 (Canonicalize root var when making response from new solver)
 - #108856 (Remove DropAndReplace terminator)
 - #108882 (Tweak E0740)
 - #108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap)
 - #108911 (Improve rustdoc-gui/tester.js code a bit)
 - #108916 (Remove an unused return value in `rustc_hir_typeck`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-09 08:21:17 +00:00
bors
39f2657d11 Auto merge of #108920 - matthiaskrgr:rollup-qrr9a0u, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous)
 - #108759 (1.41.1 supported 32-bit Apple targets)
 - #108839 (Canonicalize root var when making response from new solver)
 - #108856 (Remove DropAndReplace terminator)
 - #108882 (Tweak E0740)
 - #108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap)
 - #108911 (Improve rustdoc-gui/tester.js code a bit)
 - #108916 (Remove an unused return value in `rustc_hir_typeck`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-09 08:21:17 +00:00
Ikko Eltociear Ashimine
18667722e2
Fix typo in span_map.rs
correspondance -> correspondence
2023-03-09 14:47:42 +09:00
bors
66a2d62210 Auto merge of #108178 - cjgillot:ssa-deref, r=oli-obk
Do not consider `&mut *x` as mutating `x` in `CopyProp`

This PR removes an unfortunate overly cautious case from the current implementation.

Found by https://github.com/rust-lang/rust/pull/105274 cc `@saethlin`
2023-03-09 04:50:38 +00:00
Joshua Nelson
eb9b031232 Don't print all modified files if there's more than 10
This avoids spam for dozens of modified files.
2023-03-09 03:43:34 +00:00
bors
6a179026de Auto merge of #108919 - matthiaskrgr:rollup-g271pm2, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #108686 (rustdoc: include link on all.html location header)
 - #108846 (StableMIR: Proof-of-concept implementation + test )
 - #108873 (Simplify `sort_by` calls)
 - #108883 (Suppress copy impl error when post-normalized type references errors)
 - #108884 (Tweak illegal `Copy` impl message)
 - #108887 (Rename `MapInPlace` as `FlatMapInPlace`.)
 - #108901 (fix: evaluate with wrong obligation stack)
 - #108903 (Move Clippy tests back to their intended directory)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-08 22:48:17 +00:00
Samuel Tardieu
a701af45cb lintcheck: use multithreading unless --fix or --recursive is used 2023-03-08 22:29:57 +01:00
Celina G. Val
d326ae7b85 Add auto notification for changes to stable mir 2023-03-08 12:37:18 -08:00
Matthias Krüger
a22c5f9581
Rollup merge of #108916 - fmease:rm-unused-ret-val, r=compiler-errors
Remove an unused return value in `rustc_hir_typeck`

Unused since #89580. Just something I noticed a while ago.

`@rustbot` label C-cleanup
2023-03-08 21:26:53 +01:00
Matthias Krüger
e6f39f7225
Rollup merge of #108911 - GuillaumeGomez:improve-rustdoc-gui-tester-code, r=notriddle
Improve rustdoc-gui/tester.js code a bit

Just a small clean-up.

r? `@notriddle`
2023-03-08 21:26:53 +01:00
Matthias Krüger
2ebb5b1ddc
Rollup merge of #108898 - ferrocene:pa-libc-check-cfg, r=Mark-Simulacrum
Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap

Downstream forks of the Rust compiler might want to use a custom `libc` to add support for targets that are not yet available upstream. Adding a patch to replace `libc` with a custom one would cause compilation errors though, because Cargo would interpret the custom `libc` as part of the workspace, and apply the check-cfg lints on it.

Since https://github.com/rust-lang/libc/pull/3037, the `libc` build script emits check-cfg flags only when the `LIBC_CHECK_CFG` environment variable is set, so this PR allows the use of custom `libc`s.
2023-03-08 21:26:52 +01:00
Matthias Krüger
e6e82db307
Rollup merge of #108882 - compiler-errors:E0740, r=eholk
Tweak E0740

Also drive-by suppress E0740 if it's an unresolved type.
2023-03-08 21:26:52 +01:00
Matthias Krüger
d9fdac52b2 Rollup merge of #108856 - Zeegomo:remove-drop-and-rep, r=tmiasko
Remove DropAndReplace terminator

#107844 made DropAndReplace unused, let's remove it completely from the codebase.
2023-03-08 21:26:51 +01:00
Matthias Krüger
4e84fbf8a0
Rollup merge of #108856 - Zeegomo:remove-drop-and-rep, r=tmiasko
Remove DropAndReplace terminator

#107844 made DropAndReplace unused, let's remove it completely from the codebase.
2023-03-08 21:26:51 +01:00
Matthias Krüger
2428083558
Rollup merge of #108839 - compiler-errors:canonicalize-the-root-var, r=lcnr
Canonicalize root var when making response from new solver

During trait solving, if we equate two inference variables `?0` and `?1` but don't equate them with any rigid types, then `InferCtxt::probe_ty_var` will return `Err` for both of these. The canonicalizer code will then canonicalize the variables independently(!), and the response will not reflect the fact that these two variables have been made equal.

This hinders inference and I also don't think it's sound? I haven't thought too much about it past that, so let's talk about it.

r? ``@lcnr``
2023-03-08 21:26:51 +01:00
Matthias Krüger
23f46c50b2
Rollup merge of #108759 - workingjubilee:pedantically-correct-release-notes-for-1.41.1-apple32, r=Mark-Simulacrum
1.41.1 supported 32-bit Apple targets

This question was raised by #108556.
2023-03-08 21:26:50 +01:00
Matthias Krüger
9408af97f5
Rollup merge of #108754 - compiler-errors:retry, r=oli-obk
Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous

Fixes #108721

The problem here is that when we're checking `is_sized_raw` during codegen on some type that has a lot of opaques in it, something emits several nested obligations that are individually ambiguous, but when processed together in a loop then apply modulo regions. Since the `evaluate_predicates_recursively` inner loop doesn't process predicates until they stop changing, we return `EvaluatedToAmbig`, which makes the sized check return false incorrectly. See:

f15f0ea739/compiler/rustc_trait_selection/src/traits/select/mod.rs (L596-L606)

... Compared to the analogous loop in the new solver:

f15f0ea739/compiler/rustc_trait_selection/src/solve/mod.rs (L481-L512)

To fix this, if we get ambiguous during `pred_known_to_hold_modulo_regions`, just retry the obligation in a fulfillment context.

--

Unfortunately... I don't have a test for this. I've only tested this locally. Pending minimization :/

r? types
2023-03-08 21:26:50 +01:00
Matthias Krüger
7732cccd99
Rollup merge of #108903 - rust-lang:pa-fix-clippy-tests, r=flip1995
Move Clippy tests back to their intended directory

See https://github.com/rust-lang/rust/pull/108674#issuecomment-1459736086.

r? `@flip1995`
2023-03-08 21:24:54 +01:00
Matthias Krüger
33c3036826
Rollup merge of #108901 - LYF1999:yf/108897, r=lcnr
fix: evaluate with wrong obligation stack

fix #108897
r? ``@lcnr``
2023-03-08 21:24:53 +01:00
Matthias Krüger
a95943b77d
Rollup merge of #108887 - nnethercote:rename-MapInPlace, r=lqd
Rename `MapInPlace` as `FlatMapInPlace`.

After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration.

r? ``@lqd``
2023-03-08 21:24:53 +01:00