about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-10-20Rollup merge of #77778 - jyn514:git-hook, r=mark-simulacrumYuki Okushi-3/+11
[x.py setup] Allow setting up git hooks from other worktrees Closes https://github.com/rust-lang/rust/issues/77684 r? @caass
2020-10-19Rollup merge of #78103 - GuillaumeGomez:rustdoc-book, r=jyn514Guillaume Gomez-5/+33
Add link to rustdoc book in rustdoc help popup Part of #75520. It looks like this: ![Screenshot from 2020-10-19 13-46-02](https://user-images.githubusercontent.com/3050060/96446334-934d6900-1211-11eb-8fdc-133fecc8c30d.png) ![Screenshot from 2020-10-19 13-43-46](https://user-images.githubusercontent.com/3050060/96446335-947e9600-1211-11eb-955c-68af5292aecc.png) ![Screenshot from 2020-10-19 13-37-26](https://user-images.githubusercontent.com/3050060/96446337-947e9600-1211-11eb-9a2e-399b99178a65.png) r? @jyn514
2020-10-19Rollup merge of #78089 - varkor:opt_const_param_of-error, r=lcnrGuillaume Gomez-0/+14
Fix issue with specifying generic arguments for primitive types Fixes https://github.com/rust-lang/rust/issues/78005. r? @lcnr
2020-10-19Rollup merge of #77877 - scottmcm:fewer-try-trait-method-references, ↵Guillaume Gomez-1/+1
r=shepmaster Use `try{}` in `try_fold` to decouple iterators in the library from `Try` details I'd like to experiment with changing the `?`/`try` desugaring and correspondingly the `Try` trait (see #42327 for discussions about the suboptimalities of the current one) and this change would keep from needing any `cfg(bootstrap)` in iterator things. This will be lowered to the same thing, so shouldn't cause any perf issues: https://github.com/rust-lang/rust/blob/08e2d4616613716362b4b49980ff303f2b9ae654/compiler/rustc_ast_lowering/src/expr.rs#L428-L429 But ~~I'll trigger~~ I've triggered [a perf run](https://perf.rust-lang.org/compare.html?start=d65c08e9cc164b7b44de53503fae859a4fafd976&end=2c067c5235e779cd75e9f0cdfe572c64f1a12b9b) just in case. ~~EDIT: changed to a draft because of the rustfmt-only syntax error. zulip thread about it: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/New.20bootstrap.20rustfmt.20doesn't.20support.20syntax.20from.20sept.3F/near/213098097~~ EDIT: This now includes a rustfmt version bump to get through tidy.
2020-10-19Add link to rustdoc book in rustdoc help popupGuillaume Gomez-5/+33
2020-10-19Auto merge of #78087 - camelid:bootstrap-print-units, r=jyn514bors-1/+1
bootstrap: Print units for "finished in xxx" message It now says "finished in xxx seconds". Also slightly improved some wording in the README.
2020-10-19Auto merge of #77278 - camelid:use-correct-article, r=estebankbors-298/+298
Use correct article in help message for conversion or cast Before it always used `an`; now it uses the correct article for the type.
2020-10-18Fix issue with specifying generic arguments for primitive typesvarkor-0/+14
2020-10-18bootstrap: Print units for "finished in xxx" messageCamelid-1/+1
It now says "finished in xxx seconds". Also slightly improved some wording in the README.
2020-10-18Auto merge of #76885 - dylni:move-slice-check-range-to-range-bounds, r=KodrAusbors-10/+10
Move `slice::check_range` to `RangeBounds` Since this method doesn't take a slice anymore (#76662), it makes more sense to define it on `RangeBounds`. Questions: - Should the new method be `assert_len` or `assert_length`?
2020-10-18Auto merge of #77306 - lcnr:inline-ok, r=eddybbors-0/+77
normalize substs while inlining fixes #68347 or more precisely, this fixes the same ICE in rust analyser as veloren is pinned to a specific nightly and had an error with the current one. I didn't look into creating an MVCE here as that seems fairly annoying, will spend a few minutes doing so rn. (failed) r? `@eddyb` cc `@bjorn3`
2020-10-18Auto merge of #77956 - JohnTitor:more-tests, r=nagisabors-0/+217
Add some more regression tests This is another round of #77741. Tested with `debug-assertions=true` and it passed on my local. Closes #70877 Closes #70944 Closes #71659 Closes #74816 Closes #75707 Closes #75983 (Skipped #63355 because I'm not sure about the error.)
2020-10-18Use smaller example for issue-71659Yuki Okushi-77/+15
2020-10-18Add test for issue-75983Yuki Okushi-0/+17
2020-10-18Add test for issue-75707Yuki Okushi-0/+29
2020-10-18Add test for issue-74816Yuki Okushi-0/+54
2020-10-18Add test for issue-71659Yuki Okushi-0/+103
2020-10-18Add test for issue-70944Yuki Okushi-0/+23
2020-10-18Add test for issue-70877Yuki Okushi-0/+53
2020-10-17Auto merge of #78041 - luqmana:lld-tls-alignment, r=nikicbors-0/+0
LLVM: Backport fix for LLD COFF TLS Alignment. Update LLVM submodule to pull in changes from https://github.com/rust-lang/llvm-project/pull/81. Fixes #72145.
2020-10-17Auto merge of #78060 - JohnTitor:rollup-uou8vyu, r=JohnTitorbors-64/+121
Rollup of 7 pull requests Successful merges: - #75802 (resolve: Do not put nonexistent crate `meta` into prelude) - #76607 (Modify executable checking to be more universal) - #77851 (BTreeMap: refactor Entry out of map.rs into its own file) - #78043 (Fix grammar in note for orphan-rule error [E0210]) - #78048 (Suggest correct place to add `self` parameter when inside closure) - #78050 (Small CSS cleanup) - #78059 (Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkchecker) Failed merges: r? `@ghost`
2020-10-18Rollup merge of #78059 - JohnTitor:fix-linkcheck, r=ehussYuki Okushi-0/+3
Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkchecker This is found in https://github.com/rust-lang/nomicon/pull/240. It seems the spurious failure shows up without this flag.
2020-10-18Rollup merge of #78050 - GuillaumeGomez:small-css-cleanup, r=jyn514Yuki Okushi-5/+1
Small CSS cleanup r? @jyn514
2020-10-18Rollup merge of #78048 - blyxxyz:e0424-improve-self-placement, r=lcnrYuki Okushi-3/+38
Suggest correct place to add `self` parameter when inside closure It would incorrectly suggest adding it as a parameter to the closure instead of the containing function. [For example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1936bcd1e5f981573386e0cee985c3c0): ``` help: add a `self` receiver parameter to make the associated `fn` a method | 5 | let _ = || self&self; | ^^^^^ ``` `DiagnosticMetadata.current_function` is only used for these messages so tweaking its behavior should be ok.
2020-10-18Rollup merge of #78043 - willcrozi:e0210-error-note-fix, r=lcnrYuki Okushi-27/+27
Fix grammar in note for orphan-rule error [E0210] Fixes the grammar in the error note for [E0210] from: _"= note: implementing a foreign trait is only possible if at least one of the types for which **is it** implemented is local"_ to: _"= note: implementing a foreign trait is only possible if at least one of the types for which **it is** implemented is local"_ The content of this commit is the result of running the following command at the repository root: `find . \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/which is it implemented/which it is implemented/g'`
2020-10-18Rollup merge of #77851 - exrook:split-btreemap, r=dtolnayYuki Okushi-1/+1
BTreeMap: refactor Entry out of map.rs into its own file btree/map.rs is approaching the 3000 line mark, splitting out the entry code buys about 500 lines of headroom. I've created this PR because the changes I've made in #77438 will push `map.rs` over the 3000 line limit and cause tidy to complain. I picked `Entry` to factor out because it feels less tightly coupled to the rest of `BTreeMap` than the various iterator implementations. Related: #60302
2020-10-18Rollup merge of #76607 - Mark-Simulacrum:tidy-bins, r=pnkfelixYuki Okushi-12/+51
Modify executable checking to be more universal This uses a dummy file to check if the filesystem being used supports the executable bit in general. Supersedes #74753.
2020-10-18Rollup merge of #75802 - petrochenkov:nometa, r=nikomatsakisYuki Okushi-16/+0
resolve: Do not put nonexistent crate `meta` into prelude Before the 2018 edition release there was some vague suggestion about adding a crate named `meta` to the standard distribution. On this basis the name `meta` was "partially reserved" by putting `meta` into extern prelude (this means importing something named `meta` will result in an ambiguity error, for example). This only caused confusion so far, and two years later there are no specific plans to add such crate. If some standard crate (named `meta` or not) is added in the future, then cargo will hopefully already have ability to put it into extern prelude explicitly through `Cargo.toml`. Otherwise, it could be added to extern prelude by the compiler at edition boundary. Closes https://github.com/rust-lang/rust/issues/73948
2020-10-17Appease the almightly lord clippy, hallowed be thy nameJacob Hughes-1/+1
2020-10-18Set `MDBOOK_OUTPUT__HTML__INPUT_404` on linkcheckerYuki Okushi-0/+3
2020-10-17Auto merge of #77373 - jonas-schievink:rm-rf-copy-prop, r=oli-obkbors-96/+73
Remove the old copy propagation pass This pass was added a long time ago, and has not really seen much improvement since (apart from some great work in https://github.com/rust-lang/rust/pull/76569 that unfortunately ran into preexisting soundness issues). It is slow and unsound, and we now have a destination propagation pass that performs a related optimization and could be extended. Closes https://github.com/rust-lang/rust/issues/36673 Closes https://github.com/rust-lang/rust/issues/73717 Closes https://github.com/rust-lang/rust/issues/76740
2020-10-17Auto merge of #77124 - spastorino:const-exprs-rfc-2920, r=oli-obkbors-3/+97
Implement const expressions and patterns (RFC 2920) cc `@ecstatic-morse` `@lcnr` `@oli-obk` `@petrochenkov`
2020-10-17Small CSS cleanupGuillaume Gomez-5/+1
2020-10-17Suggest correct place to add `self` parameter when inside closureJan Verbeek-3/+38
It would incorrectly suggest adding it as a parameter to the closure instead of the containing function.
2020-10-17resolve: Do not put nonexistent crate `meta` into preludeVadim Petrochenkov-16/+0
2020-10-17Auto merge of #77685 - jackh726:binder-map, r=lcnrbors-5/+9
Use rebind instead of Binder::bind when possible These are really only the easy places. I just searched for `Binder::bind` and replaced where it straightforward. r? `@lcnr` cc. `@nikomatsakis`
2020-10-17Fix grammar in note for orphan-rule error [E0210]Will Crozier-27/+27
2020-10-17Update LLVM for LLD COFF TLS alignment fix.Luqman Aden-0/+0
2020-10-17Auto merge of #76096 - pickfire:rustdoc-quote, r=jyn514bors-124/+131
Use double quote for rustdoc html r? `@GuillaumeGomez` Feels scary without escaping stuff when I looked at the code, probably susceptible to XSS. Follow up of https://github.com/rust-lang/rust/pull/75842
2020-10-17Fix some double quote that cause CI failureIvan Tham-3/+3
Co-authored-by: Oliver Middleton <olliemail27@gmail.com>
2020-10-17Auto merge of #78025 - ehuss:bump-bootstrap, r=Mark-Simulacrumbors-1/+1
Bump bootstrap compiler Mainly to bring in #77953 to fix https://github.com/rust-lang/cargo/issues/8517.
2020-10-17Rollup merge of #77985 - cuviper:systemz-agr-clobbers-cc, r=nikicDylan DPC-0/+0
llvm: backport SystemZ fix for AGR clobbers Fixes #77382.
2020-10-17Rollup merge of #77932 - ssomers:btree_cleanup_gdb, r=Mark-SimulacrumDylan DPC-19/+29
BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values I accidentally pushed an earlier revision in #77788: it changes the index of tuples for BTreeSet from ""[{}]".format(i) to "key{}".format(i). Which doesn't seem to make the slightest difference on my linux box nor on CI. In fact, gdb doesn't make any distinction between "key{}" and "val{}" for a BTreeMap either, leading to confusing output if you test more. But easy to improve. r? @Mark-Simulacrum
2020-10-17Rollup merge of #77785 - GuillaumeGomez:remove-compiler-reexports, r=ollie27Dylan DPC-2/+16
Remove compiler-synthesized reexports when documenting Fixes #77567 r? @ollie27
2020-10-17Rollup merge of #76199 - Mark-Simulacrum:void-zero, r=nikomatsakisDylan DPC-10/+3
Permit uninhabited enums to cast into ints This essentially reverts part of #6204; it is unclear why that [commit](https://github.com/rust-lang/rust/pull/6204/commits/c0f587de34f30b060df8a88c4068740e587b9340) was introduced, and I suspect no one remembers. The changed code was only called from casting checks and appears to not affect any callers of that code (other than permitting this one case). Fixes #75647.
2020-10-17Remove the old copy propagation passJonas Schievink-96/+73
2020-10-16Add inline const to INCOMPLETE_FEATURESSantiago Pastorino-0/+4
2020-10-17Rollup merge of #78013 - GuillaumeGomez:fix-sidebar-scroll-mobile-devices, ↵Yuki Okushi-4/+0
r=jyn514 Fix sidebar scroll on mobile devices Fixes #77942. The issue was coming from the appearance/disappearance of the "wrapper" on the mobile devices web browsers, which triggers the "resize" event, calling the `hideSidebar` function is the JS code. r? @jyn514
2020-10-17Rollup merge of #77971 - jyn514:broken-intra-doc-links, r=mark-simulacrumYuki Okushi-0/+68
Deny broken intra-doc links in linkchecker Since rustdoc isn't warning about these links, check for them manually. This also fixes the broken links that popped up from the lint.
2020-10-17Rollup merge of #77925 - JohnTitor:sugg-min-features, r=davidtwco,oli-obkYuki Okushi-0/+87
Suggest minimal subset features in `incomplete_features` lint This tells users that we have a minimal subset feature of it and they can fix the lint warning without allowing it. The wording improvement is helpful :) Fixes #77913