about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-12-11add missing constraintsTunahan Karlibas-6/+10
2020-12-11Remove unnecessary check and fix local_def_id parameterTunahan Karlibas-11/+4
2020-12-09Extra assertions in eval_body_using_ecx to disallow queries forTunahan Karlibas-1/+7
functions that does allocations
2020-12-09Remove memoization leftoversTunahan Karlibas-59/+4
closes #79667
2020-12-08Auto merge of #79817 - LingMan:if_map, r=lcnrbors-41/+13
Replace simple `if let` constructs with Option::map Replaces a few constructs of the form ``` if let Some(x) = var { Some(...) } else { None } ``` with calls to `Option::map`. `@rustbot` modify labels +C-cleanup +T-compiler
2020-12-08Auto merge of #79752 - cjgillot:dead-alien, r=lcnrbors-21/+44
Visit ForeignItems when marking dead code Follow-up to #79318 r? `@lcnr`
2020-12-08Auto merge of #79806 - LeSeulArtichaut:fixup-filter-is-none, r=jyn514bors-7/+4
Fixup: `filter().is_none()` -> `!any()`
2020-12-08Visit ForeignItems when marking dead code.Camille GILLOT-21/+44
2020-12-08Auto merge of #79712 - JohnTitor:test-issue-66286, r=estebankbors-0/+39
Add a regression test for issue-66286 Fixes #66422
2020-12-08Auto merge of #79820 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 10 commits in 63d0fe43449adcb316d34d98a982b597faca4178..d274fcf862b89264fa2c6b917b15230705257317 2020-12-02 01:44:30 +0000 to 2020-12-07 23:08:44 +0000 - Clarify cargo manifest edition field docs (rust-lang/cargo#8953) - Run rustdoc doctests relative to the workspace (rust-lang/cargo#8954) - Workaround fs issue in `cargo publish`. (rust-lang/cargo#8950) - Fix panic with -Zbuild-std and no roots. (rust-lang/cargo#8942) - Slightly optimize `cargo vendor` (rust-lang/cargo#8937) - Fixes rust-lang/cargo#8783 , cargo new fails without a author name or email (rust-lang/cargo#8912) - Fix test escaping __CARGO_TEST_ROOT (rust-lang/cargo#8929) - Add period to allowed feature name characters. (rust-lang/cargo#8932) - faq: small fixes (rust-lang/cargo#8931) - Fix semver documentation tests. (rust-lang/cargo#8930)
2020-12-07Update cargoEric Huss-0/+0
2020-12-08Replace simple `if let` constructs with Option::mapLingMan-41/+13
Replaces a few constructs of the form if let Some(x) = var { Some(...) } else { None } with calls to Option::map.
2020-12-08Auto merge of #79780 - camelid:use-summary_opts, r=GuillaumeGomezbors-1/+1
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-07Auto merge of #79653 - tmiasko:naked-functions, r=Amanieubors-139/+773
Validate naked functions definitions Validate that naked functions are defined in terms of a single inline assembly block that uses only `const` and `sym` operands and has `noreturn` option. Implemented as future incompatibility lint with intention to migrate it into hard error. When it becomes a hard error it will ensure that naked functions are either unsafe or contain an unsafe block around the inline assembly. It will guarantee that naked functions do not reference functions parameters (obsoleting part of existing checks from #79411). It will limit the definitions of naked functions to what can be reliably supported. It will also reject naked functions implemented using legacy LLVM style assembly since it cannot satisfy those conditions. https://github.com/rust-lang/rfcs/pull/2774 https://github.com/rust-lang/rfcs/pull/2972
2020-12-07Fixup: `filter().is_none()` -> `!any()`LeSeulArtichaut-7/+4
2020-12-07Auto merge of #79797 - jethrogb:sgx-fix-79038, r=Mark-Simulacrumbors-5/+3
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-07Auto merge of #79751 - aDotInTheVoid:json-true-idx, r=jyn514bors-41/+249
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-07Auto merge of #79773 - lcnr:type-visitor, r=oli-obkbors-36/+55
small `TypeVisitor` refactor cc `@LeSeulArtichaut` `@scottmcm` adds `ControlFlow::map_break`
2020-12-07small `TypeVisitor` refactorBastian Kauschke-36/+55
2020-12-07Fix SGX CI, take 3Jethro Beekman-5/+3
Broken in #79038
2020-12-07Auto merge of #79772 - ethanboxx:79760-wrongly-speaks-of-methods, r=oli-obkbors-17/+122
smarter E0390 Should fix #79760 I am fairly new to the compiler so am hoping I did things correctly :).
2020-12-07Auto merge of #79641 - sourcefrog:split-example, r=dtolnaybors-0/+7
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-06Use `summary_opts()` in another spotCamelid-1/+1
I added `summary_opts()` before I cut the branch for #77686 (2 months ago!), so this "slipped through the cracks".
2020-12-07Validate naked functions definitionsTomasz Miąsko-119/+755
2020-12-07Auto merge of #79776 - petrochenkov:mvtest, r=Mark-Simulacrumbors-105/+71
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-07Move some tests to subdirectoriesVadim Petrochenkov-105/+71
2020-12-06suggestions from camelid reviewEthan Brierley-68/+32
2020-12-06smarter E0390Ethan Brierley-7/+148
2020-12-06Retain assembly operands span when lowering AST to HIRTomasz Miąsko-20/+18
2020-12-06Auto merge of #79765 - flip1995:clippyup, r=Manishearthbors-577/+4342
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-06Update Cargo.lockflip1995-1/+8
2020-12-06Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyupflip1995-576/+4334
2020-12-06Auto merge of #78609 - lcnr:rustdoc-const-eval, r=matthewjasperbors-13/+38
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-06Auto merge of #79734 - ethanboxx:inferred_const_note, r=varkorbors-0/+28
Const parameters can not be inferred with `_` help note This should close: #79557 # Example output ``` error[E0747]: type provided when a constant was expected --> inferred_const_note.rs:6:19 | 6 | let a = foo::<_, 2>([0, 1, 2]); | ^ | = help: Const parameters can not be inferred with `_` error: aborting due to previous error For more information about this error, try `rustc --explain E0747`. ``` r? `@lcnr`
2020-12-06Auto merge of #6421 - xFrednet:4176-unreadable-literal-lint-fractal-option, ↵bors-37/+118
r=Manishearth Added a lint-fraction-readability flag to the configuration This adds an option to disable the `unreadable_literal` lint for floats with a longer fraction. This allows users to write `0.100200300` without getting a warning. Fixes #4176 I have some open questions about this PR: 1. I've named the option `lint-fraction-readability` is this a good name or should I rename it to something else? 2. What should the default configuration value be? * The current default value is `true` as this was also the previous default. 3. Do I have to document this new option somewhere else or will it be extracted from the code comment? 4. The current fix option will also rewrite the fraction if the integer part violates the `unreadable_literal` lint it would otherwise also trigger the `inconsistent_digit_grouping` lint. Is this also okay? * `1.100200300` will be unaffected by the fix function * `100200300.100200300` will be effected and fixed to `100_200_300.100_200_300` --- The project needed some getting used to but I'm happy with the result. A big thank you to `@flip1995` for giving me some pointers for this implementation and to everyone for the great introduction documentation! --- changelog: Added the `unreadable-literal-lint-fractions` configuration to disable the `unreadable_literal` lint for fractions
2020-12-06Auto merge of #79737 - Xanewok:update-rls, r=calebcartwrightbors-61/+69
Update RLS and Rustfmt Fixes #79406 Fixes #79407 This does pull 1.4.28 version of Rustfmt. Do you want me to pull the 1.4.29 while we're at it? r? `@calebcartwright`
2020-12-06Auto merge of #79729 - matthiaskrgr:clones_, r=jyn514bors-3/+3
remove redundant clones
2020-12-06Bump Rustfmt to 1.4.29Igor Matuszewski-7/+7
2020-12-06Auto merge of #79650 - the8472:fix-take, r=dtolnaybors-16/+54
Fix incorrect io::Take's limit resulting from io::copy specialization The specialization introduced in #75272 fails to update `io::Take` wrappers after performing the copy syscalls which bypass those wrappers. The buffer flushing before the copy does update them correctly, but the bytes copied after the initial flush weren't subtracted. The fix is to subtract the bytes copied from each `Take` in the chain of wrappers, even when an error occurs during the syscall loop. To do so the `CopyResult` enum now has to carry the bytes copied so far in the error case.
2020-12-05Auto merge of #79697 - rylev:clearer-const-diagnostic, r=oli-obkbors-25/+25
A slightly clearer diagnostic when misusing const Fixes #79598 This produces the following diagnostic: "expected one of `>`, a const expression, lifetime, or type, found keyword `const`" Instead of the previous, more confusing: "expected one of `>`, const, lifetime, or type, found keyword `const`" This might not be completely clear as some users might not understand what a const expression is, but I do believe this is an improvement.
2020-12-05Use true ID for def_id.Nixon Enraght-Moony-41/+249
2020-12-05Renamed the configuraiton to unreadable-literal-lint-fractionsxFrednet-4/+4
2020-12-05Auto merge of #79685 - sivadeilra:fix_env_vars_win, r=davidtwcobors-0/+8
Fix src/test/ui/env-vars.rs on 128-core machines on Windows On Windows, the environment variable NUMBER_OF_PROCESSORS has special meaning. Unfortunately, you can get different answers, depending on whether you are enumerating all environment variables or querying a specific variable. This was causing the src/test/ui/env-vars.rs test to fail on machines with more than 64 processors when run on Windows.
2020-12-05Auto merge of #79719 - JohnTitor:nomicon, r=Mark-Simulacrumbors-1/+1
Ping me when nomicon's toolstate is broken So that I can notice the breakage easily.
2020-12-05Add libc to rustc-workspace-hackIgor Matuszewski-0/+2
2020-12-05Auto merge of #79445 - SNCPlay42:struct-tail-recursion-limit, r=oli-obkbors-2/+45
check the recursion limit when finding a struct's tail fixes #79437 This does a `delay_span_bug` (via `ty_error_with_message`) rather than emit a new error message, under the assumption that there will be an error elsewhere (even if the type isn't infinitely recursive, just deeper than the recursion limit, this appears to be the case).
2020-12-05Update RLS and RustfmtIgor Matuszewski-60/+66
2020-12-05Const parameters can not be inferred with `_`Ethan Brierley-0/+28
Small improvement. Thanks varkor Co-authored-by: varkor <github@varkor.com> Bless
2020-12-05Auto merge of #78373 - matthewjasper:drop-on-into, r=pnkfelixbors-10909/+11088
Don't leak return value after panic in drop Closes #47949
2020-12-05remove redundant clonesMatthias Krüger-3/+3