about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-02-17Do not ICE when evaluating locals' types of invalid `yield`Esteban Küber-0/+30
When a `yield` is outside of a generator, check its value regardless to avoid an ICE while trying to get all locals' types in writeback. Fix #78653.
2021-02-16Auto merge of #81611 - cjgillot:meowner, r=estebankbors-1190/+1126
Only store a LocalDefId in some HIR nodes Some HIR nodes are guaranteed to be HIR owners: Item, TraitItem, ImplItem, ForeignItem and MacroDef. As a consequence, we do not need to store the `HirId`'s `local_id`, and we can directly store a `LocalDefId`. This allows to avoid a bit of the dance with `tcx.hir().local_def_id` and `tcx.hir().local_def_id_to_hir_id` mappings.
2021-02-16Auto merge of #82192 - GuillaumeGomez:rollup-gi1639b, r=GuillaumeGomezbors-62/+127
Rollup of 6 pull requests Successful merges: - #82145 (Fix ES5 errors (IE11)) - #82160 (Fix typo in rustc_infer::infer::UndoLog) - #82161 (Add long explanation for E0545) - #82163 (avoid full-slicing slices) - #82175 (validation: fix invalid-fn-ptr error message) - #82184 ([Minor] Update discriminant_value docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-02-16Rollup merge of #82184 - petertodd:2021-discriminant-value-doc, r=nagisaGuillaume Gomez-2/+2
[Minor] Update discriminant_value docs Updated for new `DiscriminantKind` trait.
2021-02-16Rollup merge of #82175 - RalfJung:invalid-fn-ptr, r=oli-obkGuillaume Gomez-11/+41
validation: fix invalid-fn-ptr error message https://github.com/rust-lang/rust/pull/82061 changed the code here to print an `ImmTy` instead of a `ScalarMaybeUninit`; that was an accident. So go back to printing a `ScalarMaybeUninit`. r? ```@oli-obk```
2021-02-16Rollup merge of #82163 - matthiaskrgr:slice, r=jyn514Guillaume Gomez-40/+33
avoid full-slicing slices If we already have a slice, there is no need to get another full-range slice from that, just use the original. clippy::redundant_slicing
2021-02-16Rollup merge of #82161 - jesusprubio:add-long-explanation-e0545, ↵Guillaume Gomez-2/+38
r=GuillaumeGomez Add long explanation for E0545 Helps with #61137
2021-02-16Rollup merge of #82160 - pierwill:patch-2, r=lcnrGuillaume Gomez-1/+1
Fix typo in rustc_infer::infer::UndoLog Also use double quotes.
2021-02-16Rollup merge of #82145 - GuillaumeGomez:es5-checks, r=Nemo157Guillaume Gomez-6/+12
Fix ES5 errors (IE11) rustdoc is supposed to run on IE11 but someone reported me that it wasn't. I just confirmed it by using `es-check` with the `es5` option like this: ``` $ es-check es5 src/librustdoc/html/static/*.js ``` The PR fixes those issues and add CI checks to prevent regressions. `@Mark-Simulacrum:` I added checks in the CI, but not sure if it's the correct way to do it. Any help on that side would be very appreciated! r? `@Nemo157`
2021-02-16Auto merge of #82150 - RalfJung:miri, r=RalfJungbors-8/+9
update Miri This pulls in the recent cargo-miri fixes by `@hyd-dev.` Cc `@rust-lang/miri` r? `@ghost` Fixes https://github.com/rust-lang/rust/issues/82173
2021-02-16[Minor] Update discriminant_value docsPeter Todd-2/+2
2021-02-16update MiriRalf Jung-8/+9
2021-02-16add testRalf Jung-10/+37
2021-02-16validation: fix invalid-fn-ptr error messageRalf Jung-1/+4
2021-02-16Auto merge of #82058 - gilescope:to_digit_speedup, r=lcnrbors-2/+2
no need to check assertion on fast path as will always hold. V small change. Easy to review though!
2021-02-16Auto merge of #81734 - richkadel:fixfordash, r=pnkfelixbors-39/+21
Ensures `make` tests run under /bin/dash (if available), like CI, and fixes a Makefile Note: This cherrypicks #81688 (`@pnkfelix)` Updates `tools.mk` to explicitly require `SHELL := /bin/dash`, since CI uses `dash` but other environments (including developer local machines) may default to `bash`. Replaces bash-specific shell command in one Makefile with a dash-compatible alternative, and re-enables the affected Makefile test. Removes apparently redundant definition of `UNAME`. Also see: [zulip discussion thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/how.20to.20run.2Fbless.20src.2Ftest.2Frun-make-fulldeps.2Fcoverage.20.3F) r? `@pnkfelix` FYI: `@wesleywiser` `@tmandry`
2021-02-16Auto merge of #82153 - jonas-schievink:rollup-ls5r943, r=jonas-schievinkbors-151/+367
Rollup of 19 pull requests Successful merges: - #81503 (Suggest to create a new `const` item if the `fn` in the array is a `const fn`) - #81897 (Add match pattern diagnostics regression test) - #81975 (Seal the CommandExt, OsStrExt and OsStringExt traits) - #82009 (const_generics: Dont evaluate array length const when handling errors) - #82060 (Fix typos in BTreeSet::{first, last} docs) - #82061 (CTFE validation: catch ReadPointerAsBytes and better error) - #82063 (Fixed minor typo in catch_unwind docs) - #82067 (const_generics: Fix incorrect ty::ParamEnv::empty() usage) - #82077 (Edit `rustc_arena::DropArena` docs) - #82096 (Fix a typo) - #82106 (Remove unnecessary `Option` in `default_doc`) - #82107 (expand: Some cleanup) - #82118 (Add missing env!-decl variant) - #82119 (Fix typo in link to CreateSymbolicLinkW documentation.) - #82120 (Stabilize Arguments::as_str) - #82129 (Remove redundant bool_to_option feature gate) - #82133 (Update link for extern prelude.) - #82141 (32-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` output register.) - #82147 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-02-16avoid full-slicing slicesMatthias Krüger-40/+33
If we already have a slice, there is no need to get another full-range slice from that, just use the original. clippy::redundant_slicing
2021-02-15Remove HirItemLike.Camille GILLOT-25/+7
2021-02-15Trait impls are Items, therefore HIR owners.Camille GILLOT-22/+16
2021-02-15Use less HirId when referring to items.Camille GILLOT-28/+27
2021-02-15Only store a LocalDefId in hir::MacroDef.Camille GILLOT-29/+47
2021-02-15Index Modules using their LocalDefId.Camille GILLOT-38/+27
2021-02-15Fix E0657.Camille GILLOT-12/+20
2021-02-15Only store a LocalDefId in hir::ForeignItem.Camille GILLOT-110/+133
2021-02-15Only store a LocalDefId in hir::ImplItem.Camille GILLOT-165/+163
2021-02-15Only store a LocalDefId in hir::TraitItem.Camille GILLOT-125/+139
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-565/+483
Items are guaranteed to be HIR owner.
2021-02-15Use an ItemId inside mir::GlobalAsm.Camille GILLOT-21/+32
2021-02-15Use ItemId as a strongly typed index.Camille GILLOT-51/+63
2021-02-15Add assertions on HIR enum sizes.Camille GILLOT-4/+15
2021-02-15Remove useless Named trait.Camille GILLOT-41/+0
2021-02-15Add long explanation for E0545Jesus Rubio-2/+38
2021-02-15Fix typo in rustc_infer::infer::UndoLogpierwill-1/+1
Also use double quotes.
2021-02-15Rollup merge of #82147 - lnicola:rust-analyzer-2021-02-15, r=jonas-schievinkJonas Schievink-17/+18
:arrow_up: rust-analyzer
2021-02-15Rollup merge of #82141 - jrvanwhy:issue-82052, r=sanxiynJonas Schievink-0/+12
32-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` output register. On 32-bit ARM platforms, the register `r14` has the alias `lr`. When used as an output register in `asm!`, rustc canonicalizes the name to `r14`. LLVM only knows the register by the name `lr`, and rejects it. This changes rustc's LLVM code generation to output `lr` instead. closes #82052 r? ``@nagisa``
2021-02-15Rollup merge of #82133 - ehuss:extern-prelude-link, r=jyn514Jonas Schievink-1/+1
Update link for extern prelude. There was some reorganization in the reference as part of https://github.com/rust-lang/reference/pull/937.
2021-02-15Rollup merge of #82129 - est31:master, r=jyn514Jonas Schievink-1/+0
Remove redundant bool_to_option feature gate
2021-02-15Rollup merge of #82120 - sfackler:arguments-as-str, r=dtolnayJonas Schievink-6/+1
Stabilize Arguments::as_str Closes #74442
2021-02-15Rollup merge of #82119 - m-ou-se:typo, r=dtolnayJonas Schievink-1/+1
Fix typo in link to CreateSymbolicLinkW documentation.
2021-02-15Rollup merge of #82118 - lukaslueg:env_decl, r=m-ou-seJonas Schievink-0/+1
Add missing env!-decl variant Resolves #82117
2021-02-15Rollup merge of #82107 - petrochenkov:minexpclean, r=Aaron1011Jonas Schievink-39/+9
expand: Some cleanup See individual commits for details. r? ``@Aaron1011``
2021-02-15Rollup merge of #82106 - jyn514:cleanup-bootstrap, r=Mark-SimulacrumJonas Schievink-5/+4
Remove unnecessary `Option` in `default_doc` Previously, there were two different ways to encode the same info: `None` or `Some(&[])`. Now there is only one way, `&[]`.
2021-02-15Rollup merge of #82096 - TaKO8Ki:fix-typo, r=GuillaumeGomezJonas Schievink-1/+1
Fix a typo This pull request fixes a typo.
2021-02-15Rollup merge of #82077 - pierwill:edit-droparena, r=lcnrJonas Schievink-6/+9
Edit `rustc_arena::DropArena` docs - Add a "Safety" section, edit formatting for clarity - Add missing punctuation in code comments
2021-02-15Rollup merge of #82067 - BoxyUwU:hahaicantthinkofabadpun, r=oli-obkJonas Schievink-8/+49
const_generics: Fix incorrect ty::ParamEnv::empty() usage Fixes #80561 Not sure if I should keep the `debug!(..)`s or not but its the second time I've needed them so they sure seem useful lol cc ``@lcnr`` r? ``@oli-obk``
2021-02-15Rollup merge of #82063 - NULLx76:fix-minor-typo, r=jonas-schievinkJonas Schievink-1/+1
Fixed minor typo in catch_unwind docs Changed "a an exception" to "an exception" inside of the `std::panic::catch_unwind` docs.
2021-02-15Rollup merge of #82061 - RalfJung:ctfe-read-pointer-as-bytes, r=oli-obkJonas Schievink-14/+30
CTFE validation: catch ReadPointerAsBytes and better error r? ``@oli-obk`` Fixes https://github.com/rust-lang/rust/issues/79690 Cc https://github.com/rust-lang/miri/issues/1706
2021-02-15Rollup merge of #82060 - taiki-e:typo, r=m-ou-seJonas Schievink-12/+12
Fix typos in BTreeSet::{first, last} docs map -> set
2021-02-15Rollup merge of #82009 - BoxyUwU:idontknooow, r=varkorJonas Schievink-5/+45
const_generics: Dont evaluate array length const when handling errors Fixes #79518 Fixes #78246 cc ````@lcnr```` This was ICE'ing because we dont pass in the correct ``ParamEnv`` which meant that there was no ``Self: Foo`` predicate to make ``Self::Assoc`` well formed which caused an ICE when trying to normalize ``Self::Assoc`` in the mir interpreter r? ````@varkor````