about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-09-11Rollup merge of #88733 - Noble-Mushtak:88577, r=estebankJubilee-0/+25
Fix ICE for functions with more than 65535 arguments This pull request fixes #88577 by changing the `param_idx` field in the `Param` variant of `WellFormedLoc` from `u16` to `u32`, thus allowing for more than 65,535 arguments in a function. Note that I also added a regression test, but needed to add `// ignore-tidy-filelength` because the test is more than 8000 lines long.
2021-09-11Rollup merge of #88668 - hvdijk:x32, r=joshtriplettJubilee-1/+1
Change more x64 size checks to not apply to x32. Commit 95e096d6 changed a bunch of size checks already, but more have been added, so this fixes the new ones the same way: the various size checks that are conditional on target_arch = "x86_64" were not intended to apply to x86_64-unknown-linux-gnux32, so add target_pointer_width = "64" to the conditions.
2021-09-11Rollup merge of #88209 - Amanieu:asm_in_underscore, r=nagisaJubilee-25/+49
Improve error message when _ is used for in/inout asm operands As suggested by ```@Commeownist``` in https://github.com/rust-lang/rust/issues/72016#issuecomment-903102415.
2021-09-11Rollup merge of #88147 - FabianWolff:issue-88097, r=jackh726Jubilee-0/+31
Fix non-capturing closure return type coercion Fixes #88097. For the example given there: ```rust fn peculiar() -> impl Fn(u8) -> u8 { return |x| x + 1 } ``` which incorrectly reports an error, I noticed something weird in the debug log: ``` DEBUG rustc_typeck::check::coercion coercion::try_find_coercion_lub([closure@test.rs:2:12: 2:21], [closure@test.rs:2:12: 2:21], exprs=1 exprs) ``` Apparently, `try_find_coercion_lub()` thinks that the LUB for two closure types always has to be a function pointer (which explains the `expected closure, found fn pointer` error in #88097). There is one corner case where that isn't true, though — namely, when the two closure types are equal, in which case the trivial LUB is the type itself. This PR fixes this by inserting an explicit check for type equality in `try_find_coercion_lub()`.
2021-09-11Add test for -Z panic-in-drop=abortAmanieu d'Antras-0/+54
2021-09-11Allow simd_shuffle to accept vectors of any lengthCaleb Zulawski-18/+95
2021-09-11Fix duplicate bounds for const_trait_implDeadbeef-4/+9
2021-09-11don't clone types that are Copy (clippy::clone_on_copy)Matthias Krüger-3/+3
2021-09-11correct ARM+MUSL notesoliverbr-2/+2
- use "with MUSL" style where applicable - add "hardfloat" suffix for "armv7-unknown-linux-musleabihf"
2021-09-11Auto merge of #88214 - notriddle:notriddle/for-loop-span-drop-temps-mut, ↵bors-11/+75
r=nagisa rustc: use more correct span data in for loop desugaring Fixes #82462 Before: help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | for x in DroppingSlice(&*v).iter(); { | + After: help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped | LL | }; | + This seems like a reasonable fix: since the desugared "expr_drop_temps_mut" contains the entire desugared loop construct, its span should contain the entire loop construct as well.
2021-09-11In suggest_missing_return_type, erase late bound regions after normalizingjackh726-0/+39
2021-09-11Auto merge of #88824 - Manishearth:rollup-7bzk9h6, r=Manishearthbors-125/+657
Rollup of 15 pull requests Successful merges: - #85200 (Ignore derived Clone and Debug implementations during dead code analysis) - #86165 (Add proc_macro::Span::{before, after}.) - #87088 (Fix stray notes when the source code is not available) - #87441 (Emit suggestion when passing byte literal to format macro) - #88546 (Emit proper errors when on missing closure braces) - #88578 (fix(rustc): suggest `items` be borrowed in `for i in items[x..]`) - #88632 (Fix issues with Markdown summary options) - #88639 (rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields) - #88667 (Tweak `write_fmt` doc.) - #88720 (Rustdoc coverage fields count) - #88732 (RustWrapper: avoid deleted unclear attribute methods) - #88742 (Fix table in docblocks) - #88776 (Workaround blink/chromium grid layout limitation of 1000 rows) - #88807 (Fix typo in docs for iterators) - #88812 (Fix typo `option` -> `options`.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-09-10Fix debuginfo tests for the latest version of the Windows SDK.Wesley Wiser-77/+58
- Cdb now correctly visualizes enums. - Cdb doesn't render emoji characters in `OSStr` anymore. - Cdb doesn't always render `str` correctly (#88840)
2021-09-10Add the corrections stuff to the 88803 test caseMichael Howell-1/+12
2021-09-10feat(rustc_typeck): suggest removing bad parens in `(recv.method)()`Michael Howell-0/+19
Fixes #88803
2021-09-10Revert "Temporarily ignore some debuginfo tests on windows."Wesley Wiser-12/+0
This reverts commit 8059bc1069b88a51ec2dfc2483854b9a854b1994.
2021-09-11Update LLVM submoduleMitchell Kember-0/+0
This merges upstream `release/13.x` changes to our fork. In particular, this includes the bugfix https://reviews.llvm.org/D108608 (see also https://bugs.llvm.org/show_bug.cgi?id=51637).
2021-09-10rustc: Remove local variable IDs from `Export`sVadim Petrochenkov-13/+13
Local variables can never be exported.
2021-09-10Fix error recovery in format macro parsingFabian Wolff-0/+77
2021-09-10Add a range pattern inference failing testGary Guo-0/+49
2021-09-10Add ui test for issue 88074Gary Guo-0/+16
2021-09-10Perform type inference in range patternGary Guo-12/+1
2021-09-10Duplicate tests for incremental spans mode.Camille GILLOT-1096/+2532
2021-09-10Keep a parent LocalDefId in SpanData.Camille GILLOT-10/+18
2021-09-10Improve diagnostics if a character literal contains combining marksFabian Wolff-0/+90
2021-09-10Auto merge of #88823 - hyd-dev:miri, r=RalfJungbors-8/+8
Update Miri Fixes #88768. r? `@RalfJung`
2021-09-10Rollup merge of #88812 - gz:patch-1, r=ehussManish Goregaokar-1/+1
Fix typo `option` -> `options`.
2021-09-10Rollup merge of #88776 - dns2utf8:rustdoc_workaround_1000_elements_grid_bug, ↵Manish Goregaokar-0/+12
r=GuillaumeGomez Workaround blink/chromium grid layout limitation of 1000 rows I made this in case we don't come up with a better solution in time. See https://github.com/rust-lang/rust/issues/88545 for more details. A rendered version of the standard library is hosted here: https://data.estada.ch/rustdoc-nightly_497ee321af_2021-09-09/core/arch/arm/index.html r? `@GuillaumeGomez` `@jsha`
2021-09-10Rollup merge of #88742 - GuillaumeGomez:fix-table-in-docblocks, r=nbdd0121Manish Goregaokar-3/+81
Fix table in docblocks "Overwrite" of #88702. Instead of adding a z-index to the sidebar (which only hides the issue, doesn't fix it), I wrap `<table>` elements inside a `<div>` and limit all chidren of `.docblock` elements' width to prevent having the scrollbar on the whole doc block. ![Screenshot from 2021-09-08 15-11-24](https://user-images.githubusercontent.com/3050060/132515740-71796515-e74f-429f-ba98-2596bdbf781c.png) Thanks `@nbdd0121` for `overflow-x: auto;`. ;) r? `@notriddle`
2021-09-10Rollup merge of #88720 - GuillaumeGomez:rustdoc-coverage-fields-count, ↵Manish Goregaokar-5/+108
r=Manishearth Rustdoc coverage fields count Follow-up of #88688. Instead of requiring enum tuple variant fields and tuple struct fields to be documented, we count them if they are documented, otherwise we don't include them in the count. r? `@Manishearth`
2021-09-10Rollup merge of #88639 - Emilgardis:fix-issue-88600, r=GuillaumeGomezManish Goregaokar-24/+61
rustdoc: Fix ICE with `doc(hidden)` on tuple variant fields Fixes #88600. ```rust pub struct H; pub struct S; pub enum FooEnum { HiddenTupleItem(#[doc(hidden)] H), MultipleHidden(#[doc(hidden)] H, #[doc(hidden)] H), MixedHiddenFirst(#[doc(hidden)] H, S), MixedHiddenLast(S, #[doc(hidden)] H), HiddenStruct { #[doc(hidden)] h: H, s: S, }, } ``` Generates ![image](https://user-images.githubusercontent.com/1502855/132259152-382f9517-c2a0-41d8-acd0-64e5993931fc.png)
2021-09-10Rollup merge of #88632 - camelid:md-opts, r=CraftSpiderManish Goregaokar-13/+18
Fix issues with Markdown summary options - Use `summary_opts()` for Markdown summaries - Enable all main body Markdown options for summaries
2021-09-10Rollup merge of #88578 - ↵Manish Goregaokar-2/+92
notriddle:notriddle/suggest-add-reference-to-for-loop-iter, r=nagisa fix(rustc): suggest `items` be borrowed in `for i in items[x..]` Fixes #87994
2021-09-10Rollup merge of #88546 - scrabsha:scrabsha/closure-missing-braces, r=estebankManish Goregaokar-0/+110
Emit proper errors when on missing closure braces This commit focuses on emitting clean errors for the following syntax error: ``` Some(42).map(|a| dbg!(a); a ); ``` Previous implementation tried to recover after parsing the closure body (the `dbg` expression) by replacing the next `;` with a `,`, which made the next expression belong to the next function argument. As such, the following errors were emitted (among others): - the semicolon token was not expected, - a is not in scope, - Option::map is supposed to take one argument, not two. This commit allows us to gracefully handle this situation by adding giving the parser the ability to remember when it has just parsed a closure body inside a function call. When this happens, we can treat the unexpected `;` specifically and try to parse as much statements as possible in order to eat the whole block. When we can't parse statements anymore, we generate a clean error indicating that the braces are missing, and return an ExprKind::Err. Closes #88065. r? `@estebank`
2021-09-10Rollup merge of #87441 - ibraheemdev:i-86865, r=cjgillotManish Goregaokar-0/+29
Emit suggestion when passing byte literal to format macro Closes #86865
2021-09-10Update Mirihyd-dev-8/+8
2021-09-10Temporarily ignore some debuginfo tests on windows.Mara Bos-0/+12
2021-09-10Work around CI issue with windows sdk 10.0.20348.0.Mara Bos-0/+9
2021-09-10Add test for enum tuple variants and tuple struct doc countGuillaume Gomez-2/+71
2021-09-10Don't require documentation for fields in an enum tuple variant or for tuple ↵Guillaume Gomez-3/+37
struct fields.
2021-09-10Fix typo `option` -> `options`.Gerd Zellweger-1/+1
2021-09-09Remove unnecessary `Cache.*_did` fieldsNoah Lev-29/+19
They can be obtained by accessing the `TyCtxt` where they are needed.
2021-09-09In relate_tys, when creating new universes, insert missing universes as otherjackh726-0/+35
2021-09-09Ignore automatically derived impls of `Clone` and `Debug` in dead code analysisFabian Wolff-77/+145
2021-09-09Emit proper errors on missing closure bracesSasha Pourcelot-0/+110
This commit focuses on emitting clean errors for the following syntax error: ``` Some(42).map(|a| dbg!(a); a ); ``` Previous implementation tried to recover after parsing the closure body (the `dbg` expression) by replacing the next `;` with a `,`, which made the next expression belong to the next function argument. As such, the following errors were emitted (among others): - the semicolon token was not expected, - a is not in scope, - Option::map is supposed to take one argument, not two. This commit allows us to gracefully handle this situation by adding giving the parser the ability to remember when it has just parsed a closure body inside a function call. When this happens, we can treat the unexpected `;` specifically and try to parse as much statements as possible in order to eat the whole block. When we can't parse statements anymore, we generate a clean error indicating that the braces are missing, and return an ExprKind::Err.
2021-09-09add test for builtin types N + N unifying with fn callEllen-1/+22
2021-09-09Use more accurate spans for "unused delimiter" lintEsteban Kuber-82/+499
2021-09-09regression test for issue #88583.Felix S. Klock II-0/+15
2021-09-09Revert "Implement Anonymous{Struct, Union} in the AST"Felix S. Klock II-138/+0
This reverts commit 059b68dd677808e14e560802d235ad40beeba71e. Note that this was manually adjusted to retain some of the refactoring introduced by commit 059b68dd677808e14e560802d235ad40beeba71e, so that it could likewise retain the correction introduced in commit 5b4bc05fa57be19bb5962f4b7c0f165e194e3151
2021-09-09Revert "Add test for restriction of anonymous types on validation"Felix S. Klock II-227/+0
This reverts commit 8a1dd6918bb686a960ad5ced46a16b5b59668464.