Ralf Jung
ccaabc9479
re-bless ui tests
2021-01-22 10:56:28 +01:00
Ralf Jung
0c7fd2c685
expand successful-promotion test a bit
2021-01-22 10:36:30 +01:00
Ralf Jung
f62cecd807
do promote array indexing if we know it is in-bounds
2021-01-22 10:36:25 +01:00
Ralf Jung
69a997bef2
update const_err description
2021-01-22 10:21:52 +01:00
Ralf Jung
5be27b7a70
avoid promoting division, modulo and indexing operations that could fail
2021-01-22 10:21:49 +01:00
Dániel Buga
9988821a04
Move missing_item check inside condition
2021-01-22 08:22:15 +01:00
Dániel Buga
58a90de9ad
No peeking
2021-01-22 08:14:25 +01:00
Dániel Buga
3e9f27dadf
Remove unnecessary closure
2021-01-22 08:06:01 +01:00
slo1
a4db851302
Update src/test/ui/command/command-setgroups.rs to ignore windows
2021-01-21 22:42:38 -08:00
slo1
23f9314327
Update src/test/ui/command/command-setgroups.rs
...
Co-authored-by: Ashley Mannix <kodraus@hey.com>
2021-01-21 22:42:38 -08:00
slo1
41e6b23000
Add setgroups to std::os::unix::process::CommandExt
2021-01-21 22:42:38 -08:00
bors
25f39fe802
Auto merge of #81135 - jyn514:no-backticks, r=flip1995
...
Fix formatting for removed lints
- Don't add backticks for the reason a lint was removed. This is almost
never a code block, and when it is the backticks should be in the reason
itself.
- Don't assume clippy is the only tool that needs to be checked for
backwards compatibility
I split this out of https://github.com/rust-lang/rust/pull/80527/ because it kept causing tests to fail, and it's a good change to have anyway.
r? `@flip1995`
2021-01-22 06:13:19 +00:00
bors
a1b89f07f0
Auto merge of #81135 - jyn514:no-backticks, r=flip1995
...
Fix formatting for removed lints
- Don't add backticks for the reason a lint was removed. This is almost
never a code block, and when it is the backticks should be in the reason
itself.
- Don't assume clippy is the only tool that needs to be checked for
backwards compatibility
I split this out of https://github.com/rust-lang/rust/pull/80527/ because it kept causing tests to fail, and it's a good change to have anyway.
r? `@flip1995`
2021-01-22 06:13:19 +00:00
Esteban Küber
9e82329c8f
Do not suggest using a break label when one is already present
2021-01-21 21:43:29 -08:00
Esteban Küber
3a5ede6ef4
Fix clippy and comment
2021-01-21 21:43:28 -08:00
Esteban Küber
7698807770
Fix clippy and comment
2021-01-21 21:43:28 -08:00
Esteban Küber
8c5dafdcb8
Parse loop labels missing a leading '
...
When encountering the following typo:
```rust
a: loop { break 'a; }
```
provide an appropriate suggestion.
2021-01-21 21:41:47 -08:00
Esteban Küber
612a7fc18e
Add loop head span to hir
2021-01-21 21:41:46 -08:00
Esteban Küber
74ddaf000c
Avoid emitting redundant "unused label" lint
2021-01-21 21:41:46 -08:00
Esteban Küber
c065234b34
Add more misspelled label tests
2021-01-21 21:41:46 -08:00
Esteban Küber
8a13abba1d
Tweak error for invalid break expr
...
Point at loop head on invalid `break expr`.
Suggest removing `expr` or using label if available.
2021-01-21 21:41:46 -08:00
Esteban Küber
060dba67b7
Add loop head span to hir
2021-01-21 21:41:46 -08:00
Esteban Küber
a701ff981d
Suggest 'a
when given a
only when appropriate
...
When encountering a name `a` that isn't resolved, but a label `'a` is
found in the current ribs, only suggest `'a` if this name is the value
expression of a `break` statement.
Solve FIXME.
2021-01-21 21:41:46 -08:00
Esteban Küber
707ce2b798
Account for labels when suggesting loop
instead of while true
2021-01-21 21:41:46 -08:00
Aaron Hill
ccfc292999
Refactor token collection to capture trailing token immediately
2021-01-22 00:33:03 -05:00
Joshua Nelson
0797ffec09
Deny internal lints for rustdoc
2021-01-21 23:05:52 -05:00
Joshua Nelson
a194881991
Fix rustc::internal lints on rustdoc
2021-01-21 22:25:59 -05:00
bors
dc1eee2f25
Auto merge of #81177 - Aaron1011:fix/force-capture-tokens, r=petrochenkov
...
Force token collection to run when parsing nonterminals
Fixes #81007
Previously, we would fail to collect tokens in the proper place when
only builtin attributes were present. As a result, we would end up with
attribute tokens in the collected `TokenStream`, leading to duplication
when we attempted to prepend the attributes from the AST node.
We now explicitly track when token collection must be performed due to
nomterminal parsing.
2021-01-22 02:42:38 +00:00
Rune Tynan
26565f05c0
Bump format version
2021-01-21 21:18:31 -05:00
Daniel Conley
3ce97000e1
library/core/test/iter.rs split attempt 2
2021-01-21 19:36:32 -05:00
Cameron Steffen
82bab19a01
Deprecate find_map lint
2021-01-21 18:19:55 -06:00
Cameron Steffen
a22915bf48
Remove unneeded allow's
2021-01-21 18:19:53 -06:00
Cameron Steffen
a752d31e0a
Replace find_map with manual_find_map
2021-01-21 18:18:21 -06:00
Cameron Steffen
c92bdc4dbb
Split filter_map into manual_filter_map
2021-01-21 18:18:18 -06:00
Cameron Steffen
7a8660861e
Add expr_fallback to SpanlessEq
2021-01-21 18:17:25 -06:00
Cameron Steffen
e89ad4ba71
Fix comment
2021-01-21 18:17:25 -06:00
Dan Gohman
9abcfa55c3
Don't link with --export-dynamic on wasm32-wasi
...
Remove --export-dynamic from the link arguments on the wasm32-wasi
target, as it emits spurious exports and increases code size.
Leave it in place for wasm32-unknown-unknown and
wasm32-unknown-emscripten. Even though it isn't a great solution
there, users are likely depending on its behavior there.
2021-01-21 16:13:43 -08:00
Cameron Steffen
2d509f8b40
Check if let guard in collapsible_match
2021-01-21 18:13:36 -06:00
bors
a9a396d8ed
Auto merge of #81160 - RalfJung:swap, r=oli-obk
...
use raw-ptr-addr-of for slice::swap
Fixes https://github.com/rust-lang/rust/issues/80682
2021-01-22 00:01:53 +00:00
xFrednet
a905cf6737
Added documentation for common abbreviations
...
This list was created as a collaborative effort on Zulip and the [thread] is definitely worth a read as we had quite some fun. A big **THANK YOU** goes out to everyone who participated you make this project fun to work on!!!
The Zulip [thread]: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Common.20abbreviations.20in.20basics.2Emd/near/223548065
2021-01-22 00:25:24 +01:00
Joshua Nelson
5f74ab4969
Add more self-profile info to rustc_resolve
2021-01-21 18:15:17 -05:00
Camille GILLOT
3f42abec58
Lower closure prototype after its body.
2021-01-21 22:59:07 +01:00
Manish Goregaokar
09d4d49299
ExhaustiveEnums -> ExhaustiveItems
2021-01-21 13:39:00 -08:00
Manish Goregaokar
f6cb96ef07
Make exhaustive_enums only warn on exported items
2021-01-21 13:34:44 -08:00
Manish Goregaokar
dc93188805
Make exhaustive_enums a late pass
2021-01-21 13:31:15 -08:00
Manish Goregaokar
f1ab3024b2
New lint: exhaustive_enums
2021-01-21 13:31:06 -08:00
bors
202720bf48
Auto merge of #81152 - lzutao:intersperse_fold, r=m-ou-se
...
Fix intersperse_fold
Here is a standalone playground link in case anybody wants to modify code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=626b4d044fb74f044a36098ad907e40f
Fixes #81145
cc #79479 `@jonas-schievink`
2021-01-21 21:05:34 +00:00
Lukas Lueg
c61785ea44
Fix typo
2021-01-21 20:31:37 +01:00
Ömer Sinan Ağacan
e3faeb486a
mir: Improve size_of handling when arg is unsized
2021-01-21 22:17:05 +03:00
bors
043cf97abc
Auto merge of #6609 - giraffate:fix_wrong_suggestion_of_ref_in_deref, r=llogiq
...
Fix a wrong suggestion of `ref_in_deref`
Fix #6358 .
changelog: Fix a wrong suggestion of `ref_in_deref`
2021-01-21 19:16:11 +00:00