about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-02-17Rollup merge of #79981 - camelid:overflowing_literals-inference-error, r=lcnrGuillaume Gomez-18/+67
Add 'consider using' message to overflowing_literals Fixes #79744. Ironically, the `overflowing_literals` handler for binary or hex already had this message! You would think it would be the other way around :) cc ```@scottmcm```
2021-02-17avoid converting types into themselves (clippy::useless_conversion)Matthias Krüger-3/+3
2021-02-17try-back-block-type test: Use TryFromSliceError for From testIan Jackson-8/+4
Using `i32` is rather fragile because it has many implementations - and indeed I'm about to add one. TryFromSliceError is nice because it doesn't seem likely to grow new conversions. We still have one conversion, from Infallible. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-02-17In some limited cases, suggest `where` bounds for non-type paramsEsteban Küber-1/+21
Partially address #81971.
2021-02-17Add long explanation for E0543Jesus Rubio-1/+1
2021-02-17Make sure pdbs are copied along with exe and dlls when bootstrappingRyan Levick-2/+10
2021-02-17[libtest] Run the test synchronously when hitting thread limithyd-dev-0/+23
2021-02-17replace if-let and while-let with `if let` and `while let`Takayuki Maeda-34/+34
2021-02-17Add check for ES5 in CIGuillaume Gomez-1/+8
2021-02-17make suggest setup help messages betterHenry Boisdequin-3/+9
2021-02-16rustdoc: treat edition 2021 as unstableEric Huss-12/+2
2021-02-16Make `Clean` take &mut DocContextJoshua Nelson-250/+242
- Take `FnMut` in `rustc_trait_selection::find_auto_trait_generics` - Take `&mut DocContext` in most of `clean` - Collect the iterator in auto_trait_impls instead of iterating lazily; the lifetimes were really bad. - Changes `fn sess` to properly return a borrow with the lifetime of `'tcx`, not the mutable borrow.
2021-02-16Take `&mut DocContext` in passesJoshua Nelson-83/+49
This should hopefully allow for less interior mutability.
2021-02-16Update booksEric Huss-0/+0
2021-02-16Add riscv32 and riscv64 musl to supported platform targetsKhem Raj-0/+2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-16Move some tests to more reasonable directoriesCaio-19/+5
2021-02-16Ensure debug_assert! tests get runTeddy Katz-0/+1
2021-02-17Use -Ccodegen-units=1 to make issue-23458 test deterministicTomasz Miąsko-1/+1
The test case fails with either one error or two errors. Use a single code generation unit to avoid nondeterminism.
2021-02-16Auto merge of #81611 - cjgillot:meowner, r=estebankbors-186/+166
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-16Delete symlinked directoriesRyan Levick-5/+4
2021-02-16Auto merge of #82192 - GuillaumeGomez:rollup-gi1639b, r=GuillaumeGomezbors-20/+54
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-16Remove ordering hintkadmin-2/+0
2021-02-16Rollup merge of #82175 - RalfJung:invalid-fn-ptr, r=oli-obkGuillaume Gomez-10/+37
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-3/+3
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-1/+2
r=GuillaumeGomez Add long explanation for E0545 Helps with #61137
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-16Work around various issues cleaning up bootstrap on WindowsRyan Levick-6/+36
2021-02-16update MiriRalf Jung-8/+9
2021-02-16Do not delete bootstrap.exe on Windows during cleanRyan Levick-0/+3
Windows does not allow deleting currently running executables
2021-02-16add testRalf Jung-10/+37
2021-02-16Fix run-make-fulldeps testBenoît du Garreau-155/+65
2021-02-16Document that `assert!` format arguments are evaluated lazilyTeddy Katz-0/+11
It can be useful to do some computation in `assert!` format arguments, in order to get better error messages. For example: ```rust assert!( some_condition, "The state is invalid. Details: {}", expensive_call_to_get_debugging_info(), ); ``` It seems like `assert!` only evaluates the format arguments if the assertion fails, which is useful but doesn't appear to be documented anywhere. This PR documents the behavior and adds some tests.
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-16Update w/ commentskadmin-16/+68
2021-02-15Treat read of COpy types via refs as not move in move-closureAman Arora-34/+248
2021-02-15Handle restricting closure originAman Arora-0/+39
2021-02-15Implement reborrow for closure capturesAman Arora-12/+59
2021-02-16avoid full-slicing slicesMatthias Krüger-3/+3
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-15Trait impls are Items, therefore HIR owners.Camille GILLOT-2/+2
2021-02-15Only store a LocalDefId in hir::MacroDef.Camille GILLOT-4/+4
2021-02-15Index Modules using their LocalDefId.Camille GILLOT-3/+2
2021-02-15Only store a LocalDefId in hir::ForeignItem.Camille GILLOT-6/+12
2021-02-15Only store a LocalDefId in hir::ImplItem.Camille GILLOT-52/+47
2021-02-15Only store a LocalDefId in hir::TraitItem.Camille GILLOT-23/+25
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-84/+62
Items are guaranteed to be HIR owner.
2021-02-15Use ItemId as a strongly typed index.Camille GILLOT-12/+12
2021-02-15Add long explanation for E0545Jesus Rubio-1/+2
2021-02-15Simplify pattern grammar by allowing nested leading vertmark-211/+73
Along the way, we also implement a handful of diagnostics improvements and fixes, particularly with respect to the special handling of `||` in place of `|` and when there are leading verts in function params, which don't allow top-level or-patterns anyway.
2021-02-15name async generators something more human friendly in type error diagnosticsGus Wynn-0/+65
2021-02-15Rollup merge of #82147 - lnicola:rust-analyzer-2021-02-15, r=jonas-schievinkJonas Schievink-17/+18
:arrow_up: rust-analyzer