LeSeulArtichaut
9cc563b70b
Fixup: filter().is_none() -> !any()
2020-12-07 21:40:20 +01:00
Albin Hedman
69ab0bcabf
Use 'error-pattern' in ui test
2020-12-07 21:26:09 +01:00
bors
3d6705aa5a
Auto merge of #79797 - jethrogb:sgx-fix-79038, r=Mark-Simulacrum
...
Fix SGX CI, take 3
Broken in #79038
r? `@Mark-Simulacrum`
I actually ran `./x.py test --target x86_64-fortanix-unknown-sgx` on the commit before submitting it this time.
2020-12-07 20:25:24 +00:00
Eric Arellano
d6baf3875c
Dogfood 'str_split_once() with Tidy
2020-12-07 12:54:55 -07:00
Eric Arellano
12db2225b6
Dogfood 'str_split_once() with compiler/
2020-12-07 12:48:44 -07:00
Albin Hedman
bdda98aaba
Add comment for assert_inhabited in compiler/rustc_mir/src/interpret/intrinsics.rs
...
Co-authored-by: Ralf Jung <post@ralfj.de >
2020-12-07 18:59:10 +01:00
Joshua Nelson
0ee3f6d7ef
Update xsv to prevent random CI failures
...
This fixes occasional proptest failures due to a bug in xsv, which
aren't related to bugs in the rust compiler.
2020-12-07 12:51:28 -05:00
bors
afa995b2dd
Auto merge of #79751 - aDotInTheVoid:json-true-idx, r=jyn514
...
Rustdoc: Use correct def_id for doctree::Import
The default overwrites the crate root, which crashes rustdoc-json.
While investigating this, It turns out somehow, some items are being documented twice. I'm not sure how this is happening but for now, we just make sure they were the same if they have the same id.
[Zulip descussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Panic.20in.20json-format/near/218899256 )
[Bless script](https://gist.github.com/aDotInTheVoid/2dfce0d241338def3f033f941b7c183d ) (Once this is more pollished I'll submit it)
r? `@jyn514`
2020-12-07 17:35:02 +00:00
Eduard-Mihai Burtescu
97c7022d08
rustc_codegen_ssa: use bitcasts instead of type punning for scalar transmutes.
2020-12-07 18:19:43 +02:00
bors
aaed9d9926
Auto merge of #6370 - giraffate:fix_fp_in_unnecessary_lazy_evaluations, r=llogiq,flip1995
...
Fix FP in `unnecessary_lazy_evaluations`
Fix https://github.com/rust-lang/rust-clippy/issues/6343
changelog: Fix FP in `unnecessary_lazy_evaluations`
2020-12-07 15:19:30 +00:00
bors
b5ff9c3d05
Auto merge of #79773 - lcnr:type-visitor, r=oli-obk
...
small `TypeVisitor` refactor
cc `@LeSeulArtichaut` `@scottmcm`
adds `ControlFlow::map_break`
2020-12-07 15:07:09 +00:00
Bastian Kauschke
e3e4870bce
small TypeVisitor refactor
2020-12-07 15:52:59 +01:00
Jethro Beekman
9703bb8192
Fix SGX CI, take 3
...
Broken in #79038
2020-12-07 15:22:34 +01:00
Aleksey Kladov
88da5682c3
Privatize some of libcore unicode_internals
...
My understanding is that these API are perma unstable, so it doesn't
make sense to pollute docs & IDE completion[1] with them.
[1]: https://github.com/rust-analyzer/rust-analyzer/issues/6738
2020-12-07 16:16:42 +03:00
bors
2b76c48328
Auto merge of #79772 - ethanboxx:79760-wrongly-speaks-of-methods, r=oli-obk
...
smarter E0390
Should fix #79760
I am fairly new to the compiler so am hoping I did things correctly :).
2020-12-07 09:28:25 +00:00
Takayuki Nakata
ba1249465c
cargo dev fmt
2020-12-07 16:45:10 +09:00
Takayuki Nakata
e90b977a08
Fix FP in unnecessary_lazy_evaluations
2020-12-07 16:42:43 +09:00
bors
e5721a5283
Auto merge of #79641 - sourcefrog:split-example, r=dtolnay
...
Add a doctest example of str::split on a slice of chars
This is mentioned as supported, but the semantics are not described.
2020-12-07 06:05:34 +00:00
Camelid
2ee34a0923
Use summary_opts() in another spot
...
I added `summary_opts()` before I cut the branch for #77686 (2 months
ago!), so this "slipped through the cracks".
2020-12-06 18:52:36 -08:00
Wesley Wiser
01aec8d185
[mir-opt] Allow debuginfo to be generated for a constant or a Place
...
Prior to this commit, debuginfo was always generated by mapping a name
to a Place. This has the side-effect that `SimplifyLocals` cannot remove
locals that are only used for debuginfo because their other uses have
been const-propagated.
To allow these locals to be removed, we now allow debuginfo to point to
a constant value. The `ConstProp` pass detects when debuginfo points to
a local with a known constant value and replaces it with the value. This
allows the later `SimplifyLocals` pass to remove the local.
2020-12-06 20:48:25 -05:00
est31
73a7d935dc
Add tests
2020-12-07 02:01:21 +01:00
est31
7208a01cdf
Turn quadratic time on number of impl blocks into linear time
...
Previously, if you had a lot of inherent impl blocks on a type like:
struct Foo;
impl Foo { fn foo_1() {} }
...
impl Foo { fn foo_100_000() {} }
The compiler would be very slow at processing it, because
an internal algorithm would run in O(n^2), where n is the number
of impl blocks. Now, we add a new algorithm that allocates but
is faster asymptotically.
If there is an overlap between multiple impl blocks in terms of
identifiers, we still run a O(m^2) algorithm on groups of impl
blocks that have overlaps, but that m refers to the size of the
connected component, which is hopefully smaller than the n
that refers to the sum of all connected components.
2020-12-07 02:01:21 +01:00
Tomasz Miąsko
8065dabd17
Validate naked functions definitions
2020-12-07 00:00:00 +00:00
bors
f00ace93d0
Auto merge of #79776 - petrochenkov:mvtest, r=Mark-Simulacrum
...
Move some tests to subdirectories
Mostly tests related to imports.
(A couple of very outdated tests is also deleted.)
Part of https://github.com/rust-lang/rust/issues/73494 .
2020-12-07 00:00:00 +00:00
Aman Arora
d9523622ff
Move handling UpvarRef to PlaceBuilder
...
- This allows us to delay figuring out the index of a capture
in the closure structure when all projections to atleast form
a capture have been applied to the builder
Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com >
2020-12-06 18:30:23 -05:00
Vadim Petrochenkov
4eb9da3b17
Move some tests to subdirectories
2020-12-07 02:25:09 +03:00
Camelid
b4b66f6e24
Fix trimming of lint docs
...
It was removing all the indentation before.
Co-authored-by: Eric Huss <eric@huss.org >
2020-12-06 14:11:02 -08:00
Ethan Brierley
67db0ea4a7
suggestions from camelid review
2020-12-06 21:30:30 +00:00
Albin Hedman
d0a1e40eae
Remove unused feature gate
2020-12-06 22:29:13 +01:00
Aman Arora
6e5cca79fc
Use min_captures for creating UpvarSusbts::tupled_upvar_tys
...
- final_upvar_tys now reads types from places instead of using `node_ty`
Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com >
2020-12-06 15:48:20 -05:00
Aman Arora
76c68aa182
Writeback min_capture map to TypeckResults
...
- Derive TypeFoldable on `hir::place::Place` and associated
structs, to them to be written into typeck results.
Co-authored-by: Jennifer Wills <wills.jenniferg@gmail.com >
Co-authored-by: Logan Mosier <logmosier@gmail.com >
2020-12-06 15:48:19 -05:00
Ethan Brierley
0c13a9c020
smarter E0390
2020-12-06 20:30:07 +00:00
Tomasz Miąsko
0e527baf77
Retain assembly operands span when lowering AST to HIR
2020-12-06 20:48:08 +01:00
Tomasz Miąsko
91fe548825
Retain assembly operands span when lowering AST to HIR
2020-12-06 20:48:08 +01:00
Albin Hedman
345f230df9
Fix comments related to abort()
2020-12-06 20:25:13 +01:00
Albin Hedman
3282b549ac
Tests finally working
2020-12-06 19:53:39 +01:00
Albin Hedman
4255a5afd5
Moved failing test to src/test/ui/
...
Still have not figured out how to make it work
2020-12-06 19:01:03 +01:00
bors
0f6f2d681b
Auto merge of #79765 - flip1995:clippyup, r=Manishearth
...
Update Clippy
Biweekly Clippy update (which I forgot about on Thursday)
This includes a `Cargo.lock` update, so probably needs `rollup=never`.
r? `@Manishearth`
2020-12-06 16:59:10 +00:00
flip1995
898ef0ff87
Update Cargo.lock
2020-12-06 15:07:59 +01:00
flip1995
8eca423ea1
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
2020-12-06 15:01:03 +01:00
flip1995
d3eb49baa9
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
2020-12-06 15:01:03 +01:00
bors
d577c535b4
Auto merge of #78609 - lcnr:rustdoc-const-eval, r=matthewjasper
...
extend `WithOptConstParam` docs, move rustdoc test
This should hopefully make things a bit clearer, feel free to comment on anything which can still be improved.
cc `@ecstatic-morse` `@nikomatsakis` `@RalfJung`
2020-12-06 13:03:45 +00:00
LeSeulArtichaut
0917260368
Add a few basic tests for if-let guards
2020-12-06 13:43:21 +01:00
LeSeulArtichaut
93c6135c15
Handle Guard::IfLet in clippy
2020-12-06 13:43:19 +01:00
LeSeulArtichaut
61e69bc3fc
Handle Guard::IfLet in clippy
2020-12-06 13:43:19 +01:00
LeSeulArtichaut
402f55f33f
Implement lowering of if-let guards to MIR
2020-12-06 13:42:24 +01:00
LeSeulArtichaut
f3d4aa6afb
Implement lowering of if-let guards to MIR
2020-12-06 13:42:24 +01:00
LeSeulArtichaut
bab20800f0
Introduce if-let guards in the THIR
2020-12-06 11:48:08 +01:00
LeSeulArtichaut
cfaaa21e2a
Implement liveness passes for if-let guards
2020-12-06 11:48:08 +01:00
LeSeulArtichaut
f9cc626028
Implement typechecking if-let guards
2020-12-06 11:48:07 +01:00