about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
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-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
2020-10-17Rollup merge of #77855 - ↵Yuki Okushi-23/+230
davidtwco:pr-77341-follow-up-non-constructable-variants, r=estebank resolve: further improvements to "try using the enum's variant" diagnostic Follow-up on https://github.com/rust-lang/rust/pull/77341#issuecomment-702738281. This PR improves the diagnostic modified in #77341 to suggest not only those variants which do not have fields, but those with fields (by suggesting with placeholders). In addition, the wording of the tuple-variant-only case is improved slightly. I've not made further changes to the tuple-variant-only case (e.g. to only suggest variants with the correct number of fields) because I don't think I have enough information to do so reliably (e.g. in the case where there is an attempt to construct a tuple variant, I have no information on how many fields were provided; and in the case of pattern matching, I only have a slice of spans and would need to check for things like `..` in those spans, which doesn't seem worth it). r? @estebank
2020-10-17Rollup merge of #77827 - jyn514:stable-primitives, r=GuillaumeGomezYuki Okushi-3/+8
Don't link to nightly primitives on stable channel I am not sure how to test this. Closes https://github.com/rust-lang/rust/issues/77775 r? @GuillaumeGomez
2020-10-17Rollup merge of #77547 - RalfJung:stable-union-drop, r=matthewjasperYuki Okushi-123/+67
stabilize union with 'ManuallyDrop' fields and 'impl Drop for Union' As [discussed by @SimonSapin and @withoutboats](https://github.com/rust-lang/rust/issues/55149#issuecomment-634692020), this PR proposes to stabilize parts of the `untagged_union` feature gate: * It will be possible to have a union with field type `ManuallyDrop<T>` for any `T`. * While at it I propose we also stabilize `impl Drop for Union`; to my knowledge, there are no open concerns around this feature. In the RFC discussion, we also talked about allowing `&mut T` as another non-`Copy` non-dropping type, but that felt to me like an overly specific exception so I figured we'd wait if there is actually any use for such a special case. Some things remain unstable and still require the `untagged_union` feature gate: * Union with fields that do not drop, are not `Copy`, and are not `ManuallyDrop<_>`. The reason to not stabilize this is to avoid semver concerns around libraries adding `Drop` implementations later. (This is already not fully semver compatible as, to my knowledge, the borrow checker will exploit the non-dropping nature of any type, but it seems prudent to avoid further increasing the amount of trouble adding an `impl Drop` can cause.) Due to this, quite a few tests still need the `untagged_union` feature, but I think the ones where I could remove the feature flag provide good test coverage for the stable part. Cc @rust-lang/lang
2020-10-17Rollup merge of #75209 - Hirrolot:suggest-macro-imports, r=estebankYuki Okushi-0/+15
Suggest imports of unresolved macros Closes https://github.com/rust-lang/rust/issues/75191.
2020-10-16Handle ExprKind::ConstBlock on clippySantiago Pastorino-1/+17
2020-10-16Add inline const testsSantiago Pastorino-25/+55