bors
52c235351a
Auto merge of #10879 - Centri3:ptr_cast_constness, r=blyxyas,xFrednet
...
[`ptr_cast_constness`]: Only lint on casts which don't change type
fixes #10874
changelog: [`ptr_cast_constness`]: Only lint on casts which don't change type
2023-06-03 13:19:59 +00:00
Camille GILLOT
9e683442a9
Only check inlining counter after recusing.
2023-06-03 12:29:49 +00:00
bors
dd0c29c934
Auto merge of #14952 - lowr:fix/assignments-are-right-associative, r=HKalbasi
...
fix: assignment operators are right associative
Fixes #14944
Assignment operators, be they simple or complex, are right associative in Rust ([reference]). We need to consider that fact when computing [binding power][bp] of infix operators.
The changes in `0072_destructuring_assignment.{rs,rast}` are unexpected, but I'm pretty sure it's a typo and fixed the `.rs` file accordingly.
[reference]: https://doc.rust-lang.org/reference/expressions.html#expression-precedence
[bp]: https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html
2023-06-03 12:01:09 +00:00
bors
a97a94ab17
Auto merge of #10834 - whee:gh-pages-retain-filter-state, r=xFrednet
...
Use URL parameters for filter states
This fixes #8510 by storing Clippy Lints page filter configuration in the URL parameters.
This includes:
- Lint levels
- Lint groups
- Version filters
"Filter" was already present in the URL and its behavior is retained. There is existing support for passing a `sel` query parameter; this is also retained, but I am not sure if it used in the wild.
The URL parameters only get included if they are modified after loading the page.
I have these changes available here in case people want to play with it: https://whee.github.io/rust-clippy/master/
An example with levels, groups, and versions set (oddly):
https://whee.github.io/rust-clippy/master/#/?groups=pedantic,perf&levels=allow,warn&versions=gte:53,lte:57,eq:54
Adding a filter:
https://whee.github.io/rust-clippy/master/#/manual_str_repeat?groups=pedantic,perf&levels=allow,warn&versions=gte:53,lte:57,eq:54
---
changelog: Docs: [`Clippy's lint list`] now stores filter parameters in the URL, to allow easy sharing
[#10834 ](https://github.com/rust-lang/rust-clippy/pull/10834 )
<!-- changelog_checked -->
2023-06-03 11:39:02 +00:00
Ryo Yoshida
f9c1a7dcd9
fix: assignment operators are right associative
2023-06-03 19:58:35 +09:00
bors
1e17cef9e2
Auto merge of #109432 - flba-eb:108594_forkspawn_exponential_backoff, r=workingjubilee
...
QNX Neutrino: exponential backoff when fork/spawn needs a retry
Fixes #108594 : When retrying, sleep with an exponential duration. When sleep duration is lower than minimum possible sleeping time, yield instead (this will not be often due to the exponential increase of duration).
Minimum possible sleeping time is determined using `libc::clock_getres` but only when spawn/fork failed the first time in a request. This is cached using a LazyLock.
CC `@gh-tr`
r? `@workingjubilee`
`@rustbot` label +O-neutrino
2023-06-03 10:06:59 +00:00
bors
8177591aec
Auto merge of #111516 - compiler-errors:issue-111500, r=jackh726
...
Don't use `can_eq` in `derive(..)` suggestion for missing method
Unsatisfied predicates returned from method probe may reference inference vars from that probe, so drop this extra check I added in #110877 for more accurate derive suggestions...
Fixes #111500
2023-06-03 07:25:40 +00:00
许杰友 Jieyou Xu (Joe)
2a7c6a99ef
Fix suggestion for matching struct with .. on both ends
2023-06-03 15:02:13 +08:00
bors
7d5b746e1c
Auto merge of #111350 - chenyukang:yukang-remove-type-asc, r=Nilstrieb
...
Remove leftover of type ascription feature gating
Fixes #111325
r? `@Nilstrieb`
2023-06-03 04:54:28 +00:00
Brian Hetro
ac279efdbc
Clippy Lints page - Do not show filters in URL if configured as default values
2023-06-03 00:04:19 -04:00
yukang
bff5ecd382
only check when we specify rustc in config.toml
2023-06-03 11:35:53 +08:00
Brian Hetro
2e4ef8e72c
Clippy Lints page - Fix path watch triggering
2023-06-02 22:57:21 -04:00
bors
dff88b2064
Auto merge of #112217 - arlosi:update-vuln-deps, r=Mark-Simulacrum
...
Update dependencies with reported vulnerabilities
Vulnerable dependencies:
* bumpalo 3.12.1 (yanked)
* updated to 3.13.0
* tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001
* updated to 1.28.2
* remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018
* removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).
The new dependencies come from `tempfile@3.5.0` which adds the dependency on `rustix`
2023-06-03 01:59:14 +00:00
yukang
8baa32ff95
cleanup
2023-06-03 09:44:30 +08:00
yukang
2d27932b6c
remove EarlySyntaxWarning for type ascription
2023-06-03 09:22:47 +08:00
yukang
b002c9ff11
remove type ascription feature gate
2023-06-03 09:22:47 +08:00
DrMeepster
7380a4d7a1
explain windows sync layouts
2023-06-02 17:30:05 -07:00
DrMeepster
9d1d651d1d
add deref_pointer_as
2023-06-02 16:24:41 -07:00
bors
7a0070eaea
Auto merge of #112228 - compiler-errors:rollup-97i0pli, r=compiler-errors
...
Rollup of 6 pull requests
Successful merges:
- #109609 (Separate AnonConst from ConstBlock in HIR.)
- #112166 (bootstrap: Rename profile = user to profile = dist)
- #112168 (Lower `unchecked_div`/`_rem` to MIR's `BinOp::Div`/`Rem`)
- #112183 (Normalize anon consts in new solver)
- #112211 (pass `--lib` to `x doc`)
- #112223 (Don't ICE in new solver when auto traits have associated types)
r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-02 23:02:42 +00:00
Michael Goulet
18763cb464
Rollup merge of #112223 - compiler-errors:new-solver-auto-proj, r=BoxyUwU
...
Don't ICE in new solver when auto traits have associated types
People can write malformed auto traits, and that shouldn't cause the new solver to ICE
2023-06-02 16:02:07 -07:00
Michael Goulet
163ce686be
Rollup merge of #112211 - eval-exec:exec/fix-bootstrap-rustdoc, r=ozkanonur
...
pass `--lib` to `x doc`
This PR want to close #112082
2023-06-02 16:02:07 -07:00
Michael Goulet
4ecd45a588
Rollup merge of #112168 - scottmcm:lower-div-rem-unchecked-to-mir, r=oli-obk
...
Lower `unchecked_div`/`_rem` to MIR's `BinOp::Div`/`Rem`
As described in <https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.BinOp.html#variant.Div >, the ordinary `BinOp`s for these are already UB for division by zero ([or overflow](https://llvm.org/docs/LangRef.html#sdiv-instruction ), [demo](https://rust.godbolt.org/z/71e7P7Exh )), as MIR building is responsible for inserting code to panic for those cases regardless of whether the overflow checks are enabled.
So we can lower these in the same arm that lowers `wrapping_add` to MIR `BinOp::Add` and such, as all these cases turn into ordinary `Rvalue::BinaryOp`s.
2023-06-02 16:02:06 -07:00
Michael Goulet
e4a6b24245
Rollup merge of #112183 - compiler-errors:new-solver-anon-ct, r=BoxyUwU
...
Normalize anon consts in new solver
We don't do any of that `expand_abstract_consts` stuff so this isn't sufficient to make GCE work, but it does allow, e.g. `[(); 1]: Default`, to solve.
r? `@BoxyUwU`
2023-06-02 16:02:06 -07:00
Michael Goulet
5460f92a0f
Rollup merge of #112168 - scottmcm:lower-div-rem-unchecked-to-mir, r=oli-obk
...
Lower `unchecked_div`/`_rem` to MIR's `BinOp::Div`/`Rem`
As described in <https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.BinOp.html#variant.Div >, the ordinary `BinOp`s for these are already UB for division by zero ([or overflow](https://llvm.org/docs/LangRef.html#sdiv-instruction ), [demo](https://rust.godbolt.org/z/71e7P7Exh )), as MIR building is responsible for inserting code to panic for those cases regardless of whether the overflow checks are enabled.
So we can lower these in the same arm that lowers `wrapping_add` to MIR `BinOp::Add` and such, as all these cases turn into ordinary `Rvalue::BinaryOp`s.
2023-06-02 16:02:06 -07:00
Michael Goulet
dd09f4d35c
Rollup merge of #112166 - AnakinSkywalkeer:master, r=clubby789
...
bootstrap: Rename profile = user to profile = dist
Fixes #112074
2023-06-02 16:02:05 -07:00
Michael Goulet
6c9b7d6cbf
Rollup merge of #109609 - cjgillot:split-anon-const, r=BoxyUwU
...
Separate AnonConst from ConstBlock in HIR.
Their behaviours are different enough to justify having separate nodes.
2023-06-02 16:02:05 -07:00
DrMeepster
13c20f297f
deref shim arguments with actual ty instead of declared ty
2023-06-02 15:34:01 -07:00
Michael Goulet
84196f3371
Elaborate comment, make sure we do normalizes-to hack eventually for IATs, don't partially support const projection for impls
2023-06-02 22:07:58 +00:00
Michael Goulet
8912015f71
No const equate in new solver
2023-06-02 22:07:57 +00:00
Michael Goulet
2c1473ca70
Normalize anon consts in new solver
2023-06-02 22:07:57 +00:00
Michael Goulet
4fbb43e70f
No more TyCtxt::lazy_normalization
2023-06-02 22:07:57 +00:00
Guillaume Gomez
f92cd67711
Improve new search result display on mobile
2023-06-02 23:56:10 +02:00
Guillaume Gomez
8a35cc3ddc
Move item kind before the item name
2023-06-02 23:56:10 +02:00
Guillaume Gomez
7a09a688de
Update rustdoc tests and add more checks for type kind colors
2023-06-02 23:56:10 +02:00
Guillaume Gomez
741d210c44
Add search result item types after their name
2023-06-02 23:56:10 +02:00
Camille GILLOT
ca4d0d4c24
Separate AnonConst from ConstBlock in HIR.
2023-06-02 21:25:18 +00:00
Camille GILLOT
f10aa7dddc
Simplify pre-order algorithm.
2023-06-02 21:06:58 +00:00
bors
7f3bfc6ae7
Auto merge of #14951 - HKalbasi:mir-fix, r=HKalbasi
...
Fix string pattern matching in mir interpreter
2023-06-02 20:16:28 +00:00
hkalbasi
aab7589c40
Fix string pattern matching in mir interpreter
2023-06-02 23:45:29 +03:30
bors
dd5d7c729d
Auto merge of #112162 - nnethercote:clarify-mono-item-usage, r=wesleywiser
...
Clarify mono item usage
Some commits that make the terminology around mono items clearer, and simplify related data structures.
r? `@wesleywiser`
2023-06-02 19:53:32 +00:00
Centri3
b1a21ae347
Update endian_bytes.rs
2023-06-02 14:38:03 -05:00
Centri3
a6c36556c8
use enum for prefix instead of &str
2023-06-02 14:35:54 -05:00
Michael Goulet
ecd7809784
Don't ICE in new solver when auto traits have associated types
2023-06-02 19:22:25 +00:00
Raghul Nanth A
50c93bbfd2
refactor(test): Move attribute to lint level
2023-06-03 00:00:45 +05:30
Raghul Nanth A
7ac15f9000
Add lint to check lint formulation messages
...
Fix lints that don't conform to the standard formulation
2023-06-03 00:00:30 +05:30
Centri3
cd1d7a3c6f
weird
2023-06-02 13:26:12 -05:00
Centri3
ad7c44b3e4
only lint when cast_from and cast_to's ty are the same
2023-06-02 13:14:16 -05:00
Eval EXEC
8657a64a68
Add --lib to cargo doc
2023-06-03 01:58:48 +08:00
Arlo Siemsen
4d9b476bb1
Update dependencies with reported vulnerabilities
...
bumpalo 3.12.1 (yanked)
* updated to 3.13.0
tokio 1.8.4 - https://rustsec.org/advisories/RUSTSEC-2023-0001
* updated to 1.28.2
remove_dir_all 0.5.3 - https://rustsec.org/advisories/RUSTSEC-2023-0018
* removed by using the standard library function in `rust-installer` instead and updating to `tempfile@3.5.0` (which also removes the dependency).
2023-06-02 12:34:01 -05:00
bors
c85ceeae3f
Auto merge of #10821 - Centri3:unnecessary_operation_cast_underscore, r=dswij
...
Emit `unnecessary_cast` on raw pointers as well
Supersedes(?) #10782 , since this and #10567 will cover the original issue.
Does not lint on type aliases or inferred types.
changelog: [`unnecessary_cast`]: Also emit on casts between raw pointers with the same type and constness
2023-06-02 17:23:56 +00:00