Commit Graph

219423 Commits

Author SHA1 Message Date
Camille GILLOT
b34a8a294d Pacify tidy. 2023-03-09 17:45:13 +00:00
Camille GILLOT
a5ef6bac28 Also test destructuring assignment. 2023-03-09 17:45:13 +00:00
Camille GILLOT
e107194b66 Ignore AscribeUserType in unsafeck to avoid duplicate diagnostics. 2023-03-09 17:45:13 +00:00
Camille GILLOT
4462bb54e3 Introduce a no-op PlaceMention statement for let _ =. 2023-03-09 17:45:13 +00:00
Camille GILLOT
be758ef5ab Add ui test. 2023-03-09 17:45:13 +00:00
Michael Goulet
d4b59a0da2 Propagate expected return type instead of real return type in check_binop 2023-03-09 17:24:07 +00:00
Michael Goulet
1b6d6f92d1 Fix canonicalizer bug for int/float vars too 2023-03-09 17:24:07 +00:00
bors
9074da0bd7 Auto merge of #10359 - mladedav:dm/private/is-empty, r=llogiq
Include async functions in the len_without_is_empty

fixes #7232

Changes done to the functionality:

Allowing different error types for the functions was disallowed. So the following was linted before but is not after this change
```
impl Foo {
    pub len(&self) -> Result<usize, Error1> { todo!(); }
    pub is_empty(&self) -> Result<bool, Error2> { todo!(); }
}
```

---

changelog: Enhancement: [`len_without_is_empty`]: Now also detects `async` functions
[#10359](https://github.com/rust-lang/rust-clippy/pull/10359)
<!-- changelog_checked -->
2023-03-09 17:15:23 +00:00
Guillaume Gomez
9b788da2da Update rustdoc anonymous reexport test and add regression test for #108931 2023-03-09 18:08:22 +01:00
Guillaume Gomez
e8bd4ef1e5 Don't hide anonymous re-exports but never inline them 2023-03-09 18:08:22 +01:00
bors
a45f71265c Auto merge of #10458 - samueltardieu:multithreading-lintcheck, r=llogiq
lintcheck: use multithreading unless --fix or --recursive is used

Use multithreading unless there is a reason not to.

changelog: none
2023-03-09 17:01:20 +00:00
Michael Goulet
3aea46979a Emit alias-eq when equating numeric var and projection 2023-03-09 16:42:56 +00:00
bors
5f9873497f Auto merge of #10467 - blyxyas:underscore_typed, r=Jarcho
Add `let_with_type_underscore` lint

Fixes #10463
changelog: [`let_with_type_underscore`]: Add the lint.
2023-03-09 16:35:30 +00:00
blyxyas
ca3bf94c43
Add let_with_type_underscore lint 2023-03-09 17:18:03 +01:00
b-naber
c6d32f4b05 add myself to compiler reviewers list 2023-03-09 16:10:24 +00:00
bohan
d223c26bce fix(lexer): not skipped whitespace warning for '\x0c' 2023-03-09 22:44:58 +08:00
clubby789
3abcae2beb Document tool lints 2023-03-09 14:07:20 +00:00
lcnr
3097453f21 improve readability of winnowing 2023-03-09 14:36:54 +01: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
lcnr
a5258d1721 no more do while 2023-03-09 12:53:03 +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
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
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