Yuki Okushi
29892759f6
Rollup merge of #97077 - ouz-a:Optimize-backend, r=oli-obk
...
Simplify some code that depend on Deref
Now that we can assume #97025 works, it's safe to expect Deref is always in the first place of projections. With this, I was able to simplify some code that depended on Deref's place in projections. When we are able to move Derefer before `ElaborateDrops` successfully we will be able to optimize more places.
r? `@oli-obk`
2022-07-26 07:14:44 +09:00
Yuki Okushi
c1647e10ad
Rollup merge of #92390 - fee1-dead-contrib:const_cmp, r=oli-obk
...
Constify a few `(Partial)Ord` impls
Only a few `impl`s are constified for now, as #92257 has not landed in the bootstrap compiler yet and quite a few impls would need that fix.
This unblocks #92228 , which unblocks marking iterator methods as `default_method_body_is_const`.
2022-07-26 07:14:43 +09:00
bors
8882578a67
Auto merge of #9130 - c410-f3r:arith, r=llogiq
...
Add `Arithmetic` lint
Fixes https://github.com/rust-lang/rust-clippy/issues/8903
r? `@llogiq`
changelog: Add `Arithmetic` lint
2022-07-25 21:26:15 +00:00
bors
6654aabb0f
Auto merge of #97313 - cjgillot:ast-lifetimes-anon, r=petrochenkov
...
Resolve function lifetime elision on the AST
~Based on https://github.com/rust-lang/rust/pull/97720~
Lifetime elision for functions is purely syntactic in nature, so can be resolved on the AST.
This PR replicates the elision logic and diagnostics on the AST, and replaces HIR-based resolution by a `delay_span_bug`.
This refactor allows for more consistent diagnostics, which don't have to guess the original code from HIR.
r? `@petrochenkov`
2022-07-25 20:02:55 +00:00
bors
6dbae3ad19
Auto merge of #97313 - cjgillot:ast-lifetimes-anon, r=petrochenkov
...
Resolve function lifetime elision on the AST
~Based on https://github.com/rust-lang/rust/pull/97720~
Lifetime elision for functions is purely syntactic in nature, so can be resolved on the AST.
This PR replicates the elision logic and diagnostics on the AST, and replaces HIR-based resolution by a `delay_span_bug`.
This refactor allows for more consistent diagnostics, which don't have to guess the original code from HIR.
r? `@petrochenkov`
2022-07-25 20:02:55 +00:00
Eric Huss
2ce2870749
Remove let-chain close brace check.
2022-07-25 11:19:29 -07:00
Camille GILLOT
9450f822fb
Unused tuple fields in rustc_resolve.
2022-07-25 19:45:26 +02:00
Camille GILLOT
ec83476748
Unused tuple fields in rustc_infer.
2022-07-25 19:45:10 +02:00
Camille GILLOT
419d39c072
Clippy fallout.
2022-07-25 19:19:23 +02:00
Camille GILLOT
b9bd65e2ca
Clippy fallout.
2022-07-25 19:19:23 +02:00
Camille GILLOT
3148ea31eb
Update file description.
2022-07-25 19:19:23 +02:00
Camille GILLOT
3c5048d2ec
Report elision failures on the AST.
2022-07-25 19:19:23 +02:00
Maybe Waffle
ed8c2c28f0
apply review suggestions
2022-07-25 21:12:56 +04:00
est31
5fcd2f72fe
Add a clickable link to the layout section
2022-07-25 19:11:10 +02:00
bors
bdf520fd41
Auto merge of #99722 - RalfJung:miri, r=RalfJung
...
update Miri
Fixes https://github.com/rust-lang/rust/issues/99664
r? `@ghost`
2022-07-25 16:48:01 +00:00
lcnr
2e796acf33
use FxIndexSet
for region_bound_pairs
2022-07-25 18:39:34 +02:00
Eric Huss
91599b44dc
Fix some broken link fragments.
2022-07-25 09:16:28 -07:00
Amos Wenger
2c2520fbb4
Allow specifying sysroot OR sysroot_src
2022-07-25 17:52:38 +02:00
Ralf Jung
606924d59b
update Miri
2022-07-25 11:23:59 -04:00
bors
c76db5c04e
Auto merge of #9243 - Jarcho:std_core, r=Manishearth
...
Don't lint `std_instead_of_core` on `std::env`
fixes #9239
This also reorders the execution of the lint to do as little as possible in the case where the path doesn't start with `std` or `alloc`.
changelog: [`std_instead_of_core`](https://rust-lang.github.io/rust-clippy/master/#std_instead_of_core ): Don't lint on `use std::env`
changelog: [`std_instead_of_alloc`](https://rust-lang.github.io/rust-clippy/master/#std_instead_of_alloc ): Don't lint `use std::vec` twice
2022-07-25 15:19:41 +00:00
bjorn3
9dc4ed8d90
Update list of allowed dependencies
...
Cranelift started depending on a couple of new crates
2022-07-25 17:08:20 +02:00
bors
1cce0477e4
Auto merge of #9225 - tabokie:assert_ok, r=Jarcho
...
add `[assertions_on_result_states]` lint
Close #9162
changelog: add `[assertions_on_result_states]` lint
Signed-off-by: tabokie <xy.tao@outlook.com>
2022-07-25 15:00:27 +00:00
Amos Wenger
696775153d
Fix mix up in comments
2022-07-25 16:59:10 +02:00
tabokie
8454602cef
Add [assertions_on_result_states]
lint
...
Signed-off-by: tabokie <xy.tao@outlook.com>
2022-07-25 22:42:41 +08:00
bjorn3
3deceedbc3
Merge branch 'sync_from_rust'
2022-07-25 16:28:35 +02:00
bors
a14edd571e
Auto merge of #9246 - kyoto7250:reopen_issue_8493, r=Jarcho
...
check macro statements in `[non_copy_const]`
close #8493
close #9224
This PR fixes false positives in `[non_copy_const]`.
changelog: fix false positives in`[non_copy_const]`
---
r? `@Jarcho`
2022-07-25 14:26:27 +00:00
Amos Wenger
74a2fad5e6
Gate and rename binary, use it if it's in the sysroot
2022-07-25 16:22:39 +02:00
David Wood
76cf6bd03e
passes: port more of check_attr
module
...
Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-25 15:11:22 +01:00
ouz-a
a5c895e1d8
remove clone
2022-07-25 17:08:54 +03:00
bjorn3
7a3ed235eb
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
2022-07-25 16:07:57 +02:00
bjorn3
640c3f730a
Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into sync_cg_clif-2022-07-25
2022-07-25 16:07:57 +02:00
Amos Wenger
dadb83282d
Remember the difference between 'sysroot root' and 'sysroot src root', start looking in there for a rust-analyzer-proc-macro-srv binary
2022-07-25 16:07:41 +02:00
bjorn3
c19edfd71a
Rustup to rustc 1.64.0-nightly ( 7fe022f5a
2022-07-24)
2022-07-25 16:06:39 +02:00
bors
dc2d232c74
Auto merge of #85673 - csmoe:export-exe-sym, r=bjorn3
...
RFC-2841: add codegen flag export symbols from executable
Closes #84161
r? `@nikomatsakis` `@Mark-Simulacrum`
2022-07-25 14:04:40 +00:00
kyoto7250
b6c301055e
fixed tests to not use tokio
2022-07-25 23:04:18 +09:00
bjorn3
4e1155fbf1
Sync from rust 2f320a224e
2022-07-25 16:00:44 +02:00
Aïssata
e6518296dc
removed CanConstProp + Visitor
2022-07-25 13:54:49 +00:00
bjorn3
d7fc56323e
Update Cranelift to 0.85.3
...
This fixes a couple of potential miscompilations. None affect cg_clif on
x86_64, but one may affect cg_clif on AArch64.
2022-07-25 13:50:43 +00:00
bjorn3
722733c0c6
Merge pull request #1247 from bjorn3/melt_some_ice
...
Melt some ICE
2022-07-25 15:46:04 +02:00
Takayuki Maeda
051e98b7bf
avoid &str
/Symbol
to String
conversions
2022-07-25 22:40:00 +09:00
Takayuki Maeda
bf1a5e72f4
remove is_local_span
as it is no longer used
2022-07-25 22:37:14 +09:00
Aïssata
68b433a089
Lighten up const_prop_lint, reusing const_prop
2022-07-25 13:33:44 +00:00
kyoto7250
477356460b
check macro statements in non_copy_const.rs
2022-07-25 22:28:49 +09:00
Amos Wenger
4364531c2f
Name the binary 'proc-macro-srv'
2022-07-25 15:19:57 +02:00
Amos Wenger
fd1b64ec71
Return result directly
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-07-25 15:19:57 +02:00
Amos Wenger
fba6adfae4
Add doc comment to pass tidy check
2022-07-25 15:19:57 +02:00
Amos Wenger
5f54ec0e85
Add a proc-macro-srv-cli crate
2022-07-25 15:19:57 +02:00
bjorn3
fd2669d1e9
Fix -Zpolymorphize
2022-07-25 13:17:53 +00:00
bors
0b1ed70c12
Auto merge of #12871 - fasterthanlime:sync-from-rust-2, r=Veykril
...
Sync from `rust-lang/rust`
This is the first subtree sync PR from `rust-lang/rust` to `rust-lang/rust-analyzer`, made by following the instructions at: https://doc.rust-lang.org/nightly/clippy/development/infrastructure/sync.html#performing-the-sync-from-rust-langrust-to-clippy
It includes all the commits that were made in:
* https://github.com/rust-lang/rust/pull/99603
(And that were reviewed ahead of time by `@Veykril` + `@lnicola)`
2022-07-25 12:58:58 +00:00
bjorn3
7ef2ba8f7b
Fix size_of_val and min_align_of_val for truly unsized types
2022-07-25 12:47:49 +00:00