Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 16 pull requests #82517

Merged
merged 206 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
173e1ba
Fix default initialized fields in suggestion
camsteffen Nov 23, 2020
f74e200
Remove redundant shadow check
camsteffen Nov 23, 2020
fa75f63
Fix field_reassign_with_default for private fields
camsteffen Nov 23, 2020
4bd77a1
Auto merge of #6537 - flip1995:beta, r=ebroto
bors Jan 3, 2021
bfbc083
Fix for issue 6640
pag4k Feb 2, 2021
e0e51e4
Fixed test
pag4k Feb 3, 2021
e32e4de
New lint: default_numeric_fallback
Y-Nak Feb 2, 2021
8b8b0a9
Fix enclosing_body_owner_opt and rename it to enclosing_body_opt
Y-Nak Feb 4, 2021
22d4483
Simplify DefaultNumericFallback
Y-Nak Feb 7, 2021
c44eafd
Use id instead of name
camsteffen Feb 5, 2021
a42be85
Fix vec_init_then_push FP
camsteffen Feb 5, 2021
6c73f98
Fix missing_panics_doc warning on `unreachable!`.
daxpedda Feb 8, 2021
1021327
Simplify if_chain
camsteffen Feb 8, 2021
39ba449
Fix collapsible_if false positive with attributes
camsteffen Feb 8, 2021
347b01e
rework use_self impl based on ty::Ty comparison
tnielens Apr 26, 2020
fc334fb
use_self - fix issue with `hir_ty_to_ty`
tnielens Oct 9, 2020
ae2dd67
Rewrite use_self lint one more time
flip1995 Oct 16, 2020
bb40db7
Update test files
flip1995 Oct 16, 2020
da65d81
Don't trigger use_self in macros
flip1995 Jan 17, 2021
7e1c1c1
Fix qpath_res call
camsteffen Feb 10, 2021
7f61ddd
Move "types to lint" to the item stack
camsteffen Feb 10, 2021
52f98d8
Use TyS::same_type
camsteffen Feb 10, 2021
37f9782
Add test for checking a combination of unreachable and panic.
daxpedda Feb 10, 2021
8b9f4a0
Merge commit '70c0f90453701e7d6d9b99aaa1fc6a765937b736' into clippyup
flip1995 Feb 11, 2021
feeed17
Merge remote-tracking branch 'upstream/beta' into backport_remerge
flip1995 Feb 11, 2021
8117573
Auto merge of #6720 - flip1995:backport_remerge, r=flip1995
bors Feb 11, 2021
cc82e55
Update changelog for 1.51
flip1995 Feb 11, 2021
fa2c1d6
Auto merge of #6719 - flip1995:changelog, r=xFrednet,flip1995
bors Feb 11, 2021
605e9ba
Auto merge of #6179 - flip1995:rewrite_use_self, r=phansch
bors Feb 12, 2021
b80ac2a
Added boilerplate
booleancoercion Feb 10, 2021
6472939
Implemented majority of from_str_radix_10
booleancoercion Feb 11, 2021
a389c02
from_str_radix_10 should be done
booleancoercion Feb 11, 2021
0b31b47
Changed applicability to MaybeIncorrect because of surrounding braces
booleancoercion Feb 11, 2021
d1a627a
Ran bless and rustfmt
booleancoercion Feb 11, 2021
9194c11
Fixed doctests that shouldn't have been compiled
booleancoercion Feb 11, 2021
642efab
Fixed typos and updated to matches! where applicable
booleancoercion Feb 12, 2021
047f3e1
Auto merge of #6700 - daxpedda:panics-doc-unreachable, r=llogiq
bors Feb 12, 2021
d36fe85
Made parens addition smarter and added tests with bless
booleancoercion Feb 12, 2021
5bbb1bc
lintcheck: env var LINTCHECK_TOML can be used to override toml file l…
matthiaskrgr Feb 12, 2021
fedfbb9
lintcheck: explain sources.toml configuration
matthiaskrgr Feb 12, 2021
8c5d301
Updated labels in template files
xFrednet Feb 13, 2021
0ce5ecc
Auto merge of #6738 - xFrednet:0000-update-labels-in-template-files, …
bors Feb 13, 2021
0256103
Use title case in clippy_dev README
flip1995 Feb 13, 2021
51aefbd
Auto merge of #6735 - matthiaskrgr:lintcheck, r=flip1995
bors Feb 13, 2021
87109bb
Add minimal reproducer for ICE in #6179
Y-Nak Feb 13, 2021
dd91987
Fix clippy's path to the copy intrinsics.
m-ou-se Feb 13, 2021
5f611ce
Auto merge of #6736 - Y-Nak:reproducer-for-use_self-ice, r=flip1995
bors Feb 13, 2021
ce0a47a
Auto merge of #81238 - RalfJung:copy-intrinsics, r=m-ou-se
bors Feb 13, 2021
04c2454
Fix ICE caused by suggestion with no code substitutions
estebank Feb 14, 2021
eb80ac4
Auto merge of #6697 - camsteffen:vec-init-push-fp, r=flip1995
bors Feb 14, 2021
9c3b43e
Auto merge of #6701 - camsteffen:collapsible-if, r=flip1995
bors Feb 14, 2021
1202550
Do not lint when the closure is called using an iterator
ThibsG Feb 14, 2021
2f19f5f
Auto merge of #6741 - ThibsG:BlockInIfConditions1141, r=flip1995
bors Feb 14, 2021
93796b2
Add some restrictions to default_numeric_fallback to avoid FNs
Y-Nak Feb 15, 2021
0198ac7
Add fn_sig_opt to get fn signature from HirId
Y-Nak Feb 15, 2021
fb91c76
Add more tests for default_numeric_fallback
Y-Nak Feb 15, 2021
5b68fc1
Use ItemId as a strongly typed index.
cjgillot Jan 30, 2021
2dc6539
Only store a LocalDefId in hir::Item.
cjgillot Jan 30, 2021
fc9bc33
Only store a LocalDefId in hir::TraitItem.
cjgillot Jan 30, 2021
dbe7609
Only store a LocalDefId in hir::ImplItem.
cjgillot Jan 30, 2021
7226291
Upgrade compiletest-rs to 0.6 and tester to 0.9
phansch Feb 15, 2021
87c682a
Auto merge of #6743 - rust-lang:update-compiletest, r=Manishearth
bors Feb 15, 2021
1b74439
lintcheck: rename struct field
matthiaskrgr Feb 14, 2021
4856e5f
lintcheck: rename a few symbols, add documentation to functions
matthiaskrgr Feb 14, 2021
214d821
lintcheck: put some code into a gather_stats() function
matthiaskrgr Feb 14, 2021
f8dbcae
lintcheck: fix bug in downloade_and_extract() for git sources: we nee…
matthiaskrgr Feb 15, 2021
8f1cceb
lintcheck: print warnings if we can't check out or clone a git repo
matthiaskrgr Feb 15, 2021
028692b
lintcheck: filter out messages that come from cargo-metadata errors o…
matthiaskrgr Feb 15, 2021
a95c250
lintcheck: update logs
matthiaskrgr Feb 15, 2021
1f8ee3c
Handle struct ctor case
Y-Nak Feb 16, 2021
f28c54c
Auto merge of #6744 - matthiaskrgr:lintcheck, r=flip1995
bors Feb 16, 2021
9b0c1eb
Change to span_lint_and_sugg from span_lint_and_help
Y-Nak Feb 16, 2021
e2753f9
Auto merge of #6662 - Y-Nak:default-numeric-fallback, r=flip1995
bors Feb 16, 2021
2a28ea0
Add command line options option to lintcheck crates config
flip1995 Feb 16, 2021
dd5c9b7
lintcheck: Slight improvements to the error reporting
flip1995 Feb 16, 2021
9bcb257
Add workspace to manifest
camsteffen Feb 12, 2021
e355652
Test workspace at once
camsteffen Feb 16, 2021
877be18
Auto merge of #6749 - camsteffen:test-all, r=Manishearth
bors Feb 16, 2021
e3f5846
Reformat clippy_dev README
flip1995 Feb 16, 2021
79d7f4c
lintcheck: Add a note that -Wclippy::all is enabled by default
flip1995 Feb 17, 2021
c5b9264
Replace vec![] calls with slice literals
est31 Feb 17, 2021
0036707
Remove redundant to_string calls
est31 Feb 17, 2021
2d60a61
replace if-let and while-let with `if let` and `while let`
TaKO8Ki Feb 17, 2021
ddeea97
Auto merge of #6750 - flip1995:lintcheck_options, r=matthiaskrgr
bors Feb 17, 2021
4ac14f9
Teach SpanlessEq binding IDs
camsteffen Feb 17, 2021
742922a
Make expr_fallback FnMut
camsteffen Feb 17, 2021
9ad6e26
Fix match_same_arms with SpanlessEq changes
camsteffen Feb 17, 2021
6165ccc
Added detailled suggs for new case
pag4k Feb 17, 2021
a149f61
Auto merge of #81993 - flip1995:clippyup, r=Manishearth
bors Feb 17, 2021
a87fa0e
Fix FP of result_unit_err when using type aliases
Y-Nak Feb 18, 2021
b185fa3
ast: Keep expansion status for out-of-line module items
petrochenkov Feb 16, 2021
6e12a2f
Rollup merge of #82215 - TaKO8Ki:replace-if-let-while-let, r=varkor
Dylan-DPC Feb 18, 2021
7d535f6
Auto merge of #6759 - Y-Nak:fix-fp-of-result_unit_err, r=llogiq
bors Feb 18, 2021
aea55d2
Fix lintcheck by excluding checked crates from workspace
flip1995 Feb 18, 2021
2f815ec
Auto merge of #6763 - flip1995:fix_lintcheck, r=matthiaskrgr
bors Feb 18, 2021
a78271b
Changed fn body suggestion msg
pag4k Feb 18, 2021
0f70e88
Auto merge of #6665 - pag4k:unnecessary_wraps_bug_6640, r=camsteffen
bors Feb 18, 2021
90d3275
lintcheck: parallelize
matthiaskrgr Feb 18, 2021
2c302b2
Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011
Dylan-DPC Feb 19, 2021
54c6054
Change unnecessary_wraps to pedantic
camsteffen Feb 19, 2021
46c91db
Change known problems
camsteffen Feb 19, 2021
1f4153a
collapsible_match: fix lint message capitalization
matthiaskrgr Feb 19, 2021
4334f57
Move try_print_query_stack to rustc_interface.
cjgillot Apr 8, 2020
bf55aee
Updated from_str_radix_10 sugg to be slightly smarter and ran bless
booleancoercion Feb 19, 2021
c4b8d87
Fixed the known problems section
booleancoercion Feb 19, 2021
bb5f9d1
lintcheck: tweak some comments
matthiaskrgr Feb 19, 2021
d198551
lintheck: show output (and compiler errors!) when compiling clippy fo…
matthiaskrgr Feb 19, 2021
4974734
lintcheck: show progress percentage in the "Linting..." message
matthiaskrgr Feb 19, 2021
22aeec0
lintcheck: sort crates before linting
matthiaskrgr Feb 19, 2021
8499a32
lintcheck: add -j <N> option to configure threads.
matthiaskrgr Feb 19, 2021
23de801
Auto merge of #6764 - matthiaskrgr:lintcheck_par_iter, r=flip1995
bors Feb 20, 2021
2746632
Auto merge of #6766 - matthiaskrgr:nestedmatch, r=flip1995
bors Feb 20, 2021
7ad4b7a
Replace normalize.css 3.0.0 with unminified version.
jsha Feb 20, 2021
9bbd482
Update normalize.css to 8.0.1
jsha Feb 20, 2021
7acb105
Re-minify normalize.css.
jsha Feb 20, 2021
67087a1
Auto merge of #6717 - booleancoercion:master, r=llogiq
bors Feb 20, 2021
10f2342
Remove some P-s
bugadani Feb 20, 2021
5af6f96
Fix camel case postfix for `enum_variant_names` lint
ThibsG Feb 20, 2021
d230389
New lint: inconsistent_struct_constructor
Y-Nak Feb 20, 2021
d646aa2
Fix unnecessary_sort_by.rs that fails the dogfood test
Y-Nak Feb 20, 2021
19a3775
Fix FP in inherent_to_string when the function has generic parameters
MortenLohne Feb 20, 2021
d2ddf9c
Auto merge of #6754 - camsteffen:spanlesseq-res, r=flip1995
bors Feb 21, 2021
8a47901
Auto merge of #6765 - camsteffen:unnecessary-wraps-pedantic, r=flip1995
bors Feb 21, 2021
208e957
Auto merge of #6770 - ThibsG:PostfixEnumVariant, r=flip1995
bors Feb 21, 2021
728f397
Auto merge of #6771 - MortenLohne:master, r=flip1995
bors Feb 21, 2021
bfdf0fa
Describe the order of fields in struct ctor doesn't affect the result…
Y-Nak Feb 22, 2021
efe33f9
Add: option_manual_map lint
Jarcho Jan 10, 2021
5fe3b6c
Quick fix cargo dev bless
Y-Nak Feb 22, 2021
23aa2f8
Fix dogfood errors
Jarcho Feb 19, 2021
fe01ddc
Auto merge of #6769 - Y-Nak:inconsistent-struct-constructor, r=matthi…
bors Feb 22, 2021
0eefa61
upper_case_acronyms: move lint from style to pedantic lint group
matthiaskrgr Feb 22, 2021
697f3b6
Auto merge of #6775 - matthiaskrgr:upper_case_pedantic, r=flip1995
bors Feb 22, 2021
0d6640a
Add impl `Error` for `Arc`
richard-uk1 Feb 22, 2021
e05965e
Remove unneeded blank lines from doc
giraffate Feb 22, 2021
a3127fa
Auto merge of #6774 - Y-Nak:quick-fix-bless, r=phansch
bors Feb 23, 2021
0984754
Auto merge of #6777 - giraffate:remove_unneeded_blank_lines_from_doc,…
bors Feb 23, 2021
363f6d3
lintcheck: rerun if clippy changed
matthiaskrgr Feb 22, 2021
fa74d48
Improve error msgs when found type is deref of expected
osa1 Feb 21, 2021
f02df27
Auto merge of #6780 - matthiaskrgr:lintcheck2, r=flip1995
bors Feb 23, 2021
eaae95b
lintcheck fix build (forgot to pass function parameter) and runtime (…
matthiaskrgr Feb 23, 2021
a5c5c8f
Auto merge of #6781 - matthiaskrgr:lintcheck_fix, r=matthiaskrgr
bors Feb 23, 2021
2179313
Convert core/num/mod.rs to intra-doc links
jyn514 Aug 22, 2020
ea3118c
Fix link
jyn514 Dec 31, 2020
a6eb836
Use #[doc = include_str!()] in std
LeSeulArtichaut Dec 30, 2020
bcb1f06
Make char methods const
YenForYang Nov 30, 2020
6a72491
Remove const from iterator fns
lopopolo Feb 13, 2021
7b41ad1
Update since attributes for new const_ascii_methods_on_intrinsics to …
lopopolo Feb 13, 2021
1ed9dd4
Make ascii_change_case_unchecked const
lopopolo Feb 23, 2021
89c7610
Constify ptr::write and the write[_unaligned] methods on *mut T
usbalbin Jan 18, 2021
de6f1b8
Do not consider using a semicolon inside of a different-crate macro
notriddle Feb 14, 2021
a2c25fa
Auto merge of #6573 - Jarcho:option_match_map, r=llogiq
bors Feb 23, 2021
09bded4
Factor out `clippy_utils` crate
smoelius Feb 17, 2021
8d2de8f
Update clippy_lints/src/lib.rs
smoelius Feb 11, 2021
c5b9d22
Update clippy_utils/src/lib.rs
smoelius Feb 11, 2021
523de29
Get tests to pass
smoelius Feb 13, 2021
29b6570
Remove unused dependencies
smoelius Feb 13, 2021
b7f03c6
Remove unused features
smoelius Feb 13, 2021
ff157ae
Improve tests
smoelius Feb 17, 2021
5f04b50
Fix one import
smoelius Feb 17, 2021
1e7b1cc
Fix versioncheck test
smoelius Feb 17, 2021
964f2a0
Bump clippy_utils version
smoelius Feb 17, 2021
979206f
Fix doc test
smoelius Feb 17, 2021
ce76fb3
Fix update_lints
smoelius Feb 18, 2021
2c26c0f
Update custom_ice_message.stderr
smoelius Feb 18, 2021
50e3ef9
Remove file accidentally re-added during rebase
smoelius Feb 18, 2021
8500ad5
Typo
smoelius Feb 18, 2021
33ee598
Update clippy_utils/Cargo.toml
smoelius Feb 18, 2021
c7869b8
Update references in doc directory
smoelius Feb 18, 2021
ab7381f
Move `declare_clippy_lint` back into clippy_lints
smoelius Feb 18, 2021
6b8b43c
README: Add subsection on running Clippy as a rustc wrapper
ojeda Feb 23, 2021
a03950b
rustdoc: Name fields of `ResolutionFailure::WrongNamespace`
camelid Jan 30, 2021
045d3f3
Auto merge of #6782 - ojeda:readme-as-wrapper, r=flip1995
bors Feb 24, 2021
489c4f0
Auto merge of #6756 - smoelius:clippy_utils, r=flip1995,obi-obk
bors Feb 24, 2021
8047458
Move conf.rs back into clippy_lints
smoelius Feb 24, 2021
4545150
Auto merge of #6786 - smoelius:move-conf-rs-back-into-clippy-lints, r…
bors Feb 24, 2021
72e3335
Add OpenDNS to `doc-valid-idents`
avitex Feb 24, 2021
b0d18e9
add test coverage for all `doc-valid-idents`
avitex Feb 24, 2021
59750dc
upper_case_acronyms: add optional aggressive mode and relax default
matthiaskrgr Feb 24, 2021
913c710
upper_case_acronyms: add io-toml tests and bless previous tests
matthiaskrgr Feb 24, 2021
e655941
Account for associated consts in the "unstable assoc item name coliss…
estebank Feb 3, 2021
76a689d
Auto merge of #6783 - avitex:add-opendns-ident, r=giraffate
bors Feb 25, 2021
2a6b061
run cargo dev update_lints
matthiaskrgr Feb 24, 2021
ef41f2b
Auto merge of #6788 - matthiaskrgr:upper_case_acronyms, r=flip1995
bors Feb 25, 2021
c6408a4
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Feb 25, 2021
8f8c7c2
Bump nightly version -> 2021-02-25
flip1995 Feb 25, 2021
928e72d
Auto merge of #6789 - flip1995:rustup, r=flip1995
bors Feb 25, 2021
81af346
Merge commit '928e72dd10749875cbd412f74bfbfd7765dbcd8a' into clippyup
flip1995 Feb 25, 2021
a6dd9b9
Fix Clippy build and test
flip1995 Feb 25, 2021
0046d7c
Update Cargo.lock
flip1995 Feb 25, 2021
d7cb66d
add helpful error notes and fix the false 'defined here' messages
henryboisdequin Feb 17, 2021
c9cf922
Rollup merge of #75807 - jyn514:num-intra-link, r=poliorcetics
Dylan-DPC Feb 25, 2021
cb2b4ff
Rollup merge of #80534 - LeSeulArtichaut:doc-include, r=jyn514
Dylan-DPC Feb 25, 2021
351d947
Rollup merge of #80553 - derekdreery:arc_error, r=m-ou-se
Dylan-DPC Feb 25, 2021
4b9c213
Rollup merge of #81167 - usbalbin:const_write, r=oli-obk
Dylan-DPC Feb 25, 2021
749d70a
Rollup merge of #81575 - camelid:rustdoc-wrongnamespace-cleanup, r=jy…
Dylan-DPC Feb 25, 2021
c562913
Rollup merge of #81713 - estebank:unstable-assoc-item-lint, r=oli-obk
Dylan-DPC Feb 25, 2021
f891af9
Rollup merge of #82078 - lopopolo:char-u8-const-fn, r=m-ou-se
Dylan-DPC Feb 25, 2021
568ae3a
Rollup merge of #82087 - estebank:abolish-ice, r=oli-obk
Dylan-DPC Feb 25, 2021
6b06e57
Rollup merge of #82090 - notriddle:consider-using-a-semicolon-here, r…
Dylan-DPC Feb 25, 2021
199095a
Rollup merge of #82213 - est31:slices_for_vecs, r=jyn514
Dylan-DPC Feb 25, 2021
00aa3e6
Rollup merge of #82214 - est31:no_to_string, r=oli-obk
Dylan-DPC Feb 25, 2021
6bf4867
Rollup merge of #82220 - henryboisdequin:fixes-80853, r=varkor
Dylan-DPC Feb 25, 2021
05ed081
Rollup merge of #82313 - jsha:update-normalize-css, r=GuillaumeGomez
Dylan-DPC Feb 25, 2021
20928e0
Rollup merge of #82321 - bugadani:ast3, r=varkor
Dylan-DPC Feb 25, 2021
12ea0f6
Rollup merge of #82364 - osa1:issue82361, r=estebank
Dylan-DPC Feb 25, 2021
ebe67d9
Rollup merge of #82514 - flip1995:clippyup, r=Manishearth
Dylan-DPC Feb 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 119 additions & 11 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -565,14 +565,14 @@ dependencies = [
"cargo_metadata 0.12.0",
"clippy-mini-macro-test",
"clippy_lints",
"compiletest_rs",
"compiletest_rs 0.6.0",
"derive-new",
"rustc-workspace-hack",
"rustc_tools_util 0.2.0",
"semver 0.11.0",
"serde",
"tempfile",
"tester",
"tester 0.9.0",
]

[[package]]
Expand All @@ -584,6 +584,7 @@ name = "clippy_lints"
version = "0.1.52"
dependencies = [
"cargo_metadata 0.12.0",
"clippy_utils",
"if_chain",
"itertools 0.9.0",
"pulldown-cmark 0.8.0",
Expand All @@ -600,6 +601,20 @@ dependencies = [
"url 2.1.1",
]

[[package]]
name = "clippy_utils"
version = "0.1.52"
dependencies = [
"if_chain",
"itertools 0.9.0",
"regex-syntax",
"rustc-semver",
"serde",
"smallvec 1.6.1",
"toml",
"unicode-normalization",
]

[[package]]
name = "cloudabi"
version = "0.1.0"
Expand Down Expand Up @@ -695,7 +710,30 @@ dependencies = [
"serde_derive",
"serde_json",
"tempfile",
"tester",
"tester 0.7.0",
"winapi 0.3.9",
]

[[package]]
name = "compiletest_rs"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0086d6ad78cf409c3061618cd98e2789d5c9ce598fc9651611cf62eae0a599cb"
dependencies = [
"diff",
"filetime",
"getopts",
"lazy_static",
"libc",
"log",
"miow 0.3.6",
"regex",
"rustfix",
"serde",
"serde_derive",
"serde_json",
"tempfile",
"tester 0.9.0",
"winapi 0.3.9",
]

Expand Down Expand Up @@ -984,14 +1022,35 @@ dependencies = [
"dirs-sys",
]

[[package]]
name = "dirs-next"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
dependencies = [
"cfg-if 1.0.0",
"dirs-sys-next",
]

[[package]]
name = "dirs-sys"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
dependencies = [
"libc",
"redox_users",
"redox_users 0.3.4",
"winapi 0.3.9",
]

[[package]]
name = "dirs-sys-next"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users 0.4.0",
"winapi 0.3.9",
]

Expand Down Expand Up @@ -1115,7 +1174,7 @@ checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e"
dependencies = [
"cfg-if 0.1.10",
"libc",
"redox_syscall",
"redox_syscall 0.1.57",
"winapi 0.3.9",
]

Expand Down Expand Up @@ -2226,7 +2285,7 @@ name = "miri"
version = "0.1.0"
dependencies = [
"colored",
"compiletest_rs",
"compiletest_rs 0.5.0",
"env_logger 0.7.1",
"getrandom 0.2.0",
"hex 0.4.2",
Expand Down Expand Up @@ -2458,7 +2517,7 @@ dependencies = [
"cloudabi",
"instant",
"libc",
"redox_syscall",
"redox_syscall 0.1.57",
"smallvec 1.6.1",
"winapi 0.3.9",
]
Expand Down Expand Up @@ -2899,17 +2958,36 @@ version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"

[[package]]
name = "redox_syscall"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
dependencies = [
"bitflags",
]

[[package]]
name = "redox_users"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431"
dependencies = [
"getrandom 0.1.14",
"redox_syscall",
"redox_syscall 0.1.57",
"rust-argon2",
]

[[package]]
name = "redox_users"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
"getrandom 0.2.0",
"redox_syscall 0.2.5",
]

[[package]]
name = "regex"
version = "1.4.3"
Expand Down Expand Up @@ -4535,6 +4613,12 @@ dependencies = [
"unicode_categories",
]

[[package]]
name = "rustversion"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"

[[package]]
name = "ryu"
version = "1.0.5"
Expand Down Expand Up @@ -4812,7 +4896,7 @@ checksum = "7fd8b795c389288baa5f355489c65e71fd48a02104600d15c4cfbc561e9e429d"
dependencies = [
"cfg-if 0.1.10",
"libc",
"redox_syscall",
"redox_syscall 0.1.57",
"winapi 0.3.9",
]

Expand Down Expand Up @@ -4973,7 +5057,7 @@ checksum = "c8a4c1d0bee3230179544336c15eefb563cf0302955d962e456542323e8c2e8a"
dependencies = [
"filetime",
"libc",
"redox_syscall",
"redox_syscall 0.1.57",
"xattr",
]

Expand All @@ -4986,7 +5070,7 @@ dependencies = [
"cfg-if 0.1.10",
"libc",
"rand",
"redox_syscall",
"redox_syscall 0.1.57",
"remove_dir_all",
"winapi 0.3.9",
]
Expand Down Expand Up @@ -5020,6 +5104,17 @@ dependencies = [
"winapi 0.3.9",
]

[[package]]
name = "term"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
dependencies = [
"dirs-next",
"rustversion",
"winapi 0.3.9",
]

[[package]]
name = "termcolor"
version = "1.1.0"
Expand Down Expand Up @@ -5065,6 +5160,19 @@ dependencies = [
"term 0.6.1",
]

[[package]]
name = "tester"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0639d10d8f4615f223a57275cf40f9bdb7cfbb806bcb7f7cc56e3beb55a576eb"
dependencies = [
"cfg-if 1.0.0",
"getopts",
"libc",
"num_cpus",
"term 0.7.0",
]

[[package]]
name = "textwrap"
version = "0.11.0"
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,7 @@ pub enum ItemKind {
/// A use declaration item (`use`).
///
/// E.g., `use foo;`, `use foo::bar;` or `use foo::bar as FooBar;`.
Use(P<UseTree>),
Use(UseTree),
/// A static item (`static`).
///
/// E.g., `static FOO: i32 = 42;` or `static FOO: &'static str = "bar";`.
Expand All @@ -2719,7 +2719,7 @@ pub enum ItemKind {
/// E.g., `extern {}` or `extern "C" {}`.
ForeignMod(ForeignMod),
/// Module-level inline assembly (from `global_asm!()`).
GlobalAsm(P<GlobalAsm>),
GlobalAsm(GlobalAsm),
/// A type alias (`type`).
///
/// E.g., `type Foo = Bar<u8>;`.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/global_asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn expand_global_asm<'cx>(
ident: Ident::invalid(),
attrs: Vec::new(),
id: ast::DUMMY_NODE_ID,
kind: ast::ItemKind::GlobalAsm(P(global_asm)),
kind: ast::ItemKind::GlobalAsm(global_asm),
vis: ast::Visibility {
span: sp.shrink_to_lo(),
kind: ast::VisibilityKind::Inherited,
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_builtin_macros/src/standard_library_imports.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use rustc_ast as ast;
use rustc_ast::ptr::P;
use rustc_expand::base::{ExtCtxt, ResolverExpand};
use rustc_expand::expand::ExpansionConfig;
use rustc_session::Session;
Expand Down Expand Up @@ -72,11 +71,11 @@ pub fn inject(
span,
Ident::invalid(),
vec![cx.attribute(cx.meta_word(span, sym::prelude_import))],
ast::ItemKind::Use(P(ast::UseTree {
ast::ItemKind::Use(ast::UseTree {
prefix: cx.path(span, import_path),
kind: ast::UseTreeKind::Glob,
span,
})),
}),
);

krate.items.insert(0, use_item);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub(crate) unsafe fn codegen(
let args = [usize, usize]; // size, align

let ty = llvm::LLVMFunctionType(void, args.as_ptr(), args.len() as c_uint, False);
let name = "__rust_alloc_error_handler".to_string();
let name = "__rust_alloc_error_handler";
let llfn = llvm::LLVMRustGetOrInsertFunction(llmod, name.as_ptr().cast(), name.len(), ty);
// -> ! DIFlagNoReturn
llvm::Attribute::NoReturn.apply_llfn(llvm::AttributePlace::Function, llfn);
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_llvm/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
// Default per-arch clobbers
// Basically what clang does
let arch_clobbers = match &self.sess().target.arch[..] {
"x86" | "x86_64" => vec!["~{dirflag}", "~{fpsr}", "~{flags}"],
"mips" | "mips64" => vec!["~{$1}"],
_ => Vec::new(),
"x86" | "x86_64" => &["~{dirflag}", "~{fpsr}", "~{flags}"][..],
"mips" | "mips64" => &["~{$1}"],
_ => &[],
};

let all_constraints = ia
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ fn get_linker(
let original_path = tool.path();
if let Some(ref root_lib_path) = original_path.ancestors().nth(4) {
let arch = match t.arch.as_str() {
"x86_64" => Some("x64".to_string()),
"x86" => Some("x86".to_string()),
"aarch64" => Some("arm64".to_string()),
"arm" => Some("arm".to_string()),
"x86_64" => Some("x64"),
"x86" => Some("x86"),
"aarch64" => Some("arm64"),
"arm" => Some("arm"),
_ => None,
};
if let Some(ref a) = arch {
// FIXME: Move this to `fn linker_with_args`.
let mut arg = OsString::from("/LIBPATH:");
arg.push(format!("{}\\lib\\{}\\store", root_lib_path.display(), a.to_string()));
arg.push(format!("{}\\lib\\{}\\store", root_lib_path.display(), a));
cmd.arg(&arg);
} else {
warn!("arch is not supported");
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_errors/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ impl Diagnostic {
suggestion: Vec<(Span, String)>,
applicability: Applicability,
) -> &mut Self {
assert!(!suggestion.is_empty());
self.suggestions.push(CodeSuggestion {
substitutions: vec![Substitution {
parts: suggestion
Expand All @@ -318,6 +319,10 @@ impl Diagnostic {
suggestions: Vec<Vec<(Span, String)>>,
applicability: Applicability,
) -> &mut Self {
assert!(!suggestions.is_empty());
for s in &suggestions {
assert!(!s.is_empty());
}
self.suggestions.push(CodeSuggestion {
substitutions: suggestions
.into_iter()
Expand Down Expand Up @@ -348,6 +353,7 @@ impl Diagnostic {
suggestion: Vec<(Span, String)>,
applicability: Applicability,
) -> &mut Self {
assert!(!suggestion.is_empty());
self.suggestions.push(CodeSuggestion {
substitutions: vec![Substitution {
parts: suggestion
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,6 +1577,14 @@ impl Expr<'_> {
expr
}

pub fn peel_blocks(&self) -> &Self {
let mut expr = self;
while let ExprKind::Block(Block { expr: Some(inner), .. }, _) = &expr.kind {
expr = inner;
}
expr
}

pub fn can_have_side_effects(&self) -> bool {
match self.peel_drop_temps().kind {
ExprKind::Path(_) | ExprKind::Lit(_) => false,
Expand Down
Loading