about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-02-12Modifiers -> QualifiersRune Tynan-9/+9
2021-02-08Allow default hash types in conversionRune Tynan-0/+2
2021-02-08Vec -> HashSetRune Tynan-12/+15
2021-02-08Add comment + move derive helperRune Tynan-1/+5
2021-02-08Make `header` a vec of modifiers, make FunctionPointer consistent with ↵Rune Tynan-16/+85
Function and Method.
2021-02-07Auto merge of #80632 - Nadrieril:fix-80501, r=varkorbors-12/+94
Identify unreachable subpatterns more reliably In https://github.com/rust-lang/rust/pull/80104 I used `Span`s to identify unreachable sub-patterns in the presence of or-patterns during exhaustiveness checking. In https://github.com/rust-lang/rust/issues/80501 it was revealed that `Span`s are complicated and that this was not a good idea. Instead, this PR identifies subpatterns logically: as a path in the tree of subpatterns of a given pattern. I made a struct that captures a set of such subpatterns. This is a bit complex, but thankfully self-contained; the rest of the code does not need to know anything about it. Fixes https://github.com/rust-lang/rust/issues/80501. I think I managed to keep the perf neutral. r? `@varkor`
2021-02-07Auto merge of #81853 - GuillaumeGomez:rollup-xzh1z4v, r=GuillaumeGomezbors-1/+20
Rollup of 5 pull requests Successful merges: - #81526 (btree: use Option's unwrap_unchecked()) - #81742 (Add a note about the correctness and the effect on unsafe code to the `ExactSizeIterator` docs) - #81830 (Add long error explanation for E0542) - #81835 (Improve long explanation for E0546) - #81843 (Add regression test for #29821) Failed merges: - #81836 (Add long explanation for E0547) r? `@ghost` `@rustbot` modify labels: rollup
2021-02-07Rollup merge of #81843 - bstrie:issue-29821, r=lcnrGuillaume Gomez-0/+19
Add regression test for #29821 Closes #29821
2021-02-07Rollup merge of #81830 - jesusprubio:add-log-explanation-e0542, r=GuillaumeGomezGuillaume Gomez-1/+1
Add long error explanation for E0542 Helps with #61137
2021-02-07Auto merge of #81502 - CraftSpider:method-abi, r=jyn514bors-0/+27
Add abi field to `Method` Also bumps version and adds a test (Will conflict with #81500, whichever is merged first) Rationale: It's possible for methods to have an ABI. This should be exposed in the JSON.
2021-02-07Auto merge of #81462 - osa1:issue75158, r=Mark-Simulacrumbors-0/+20
Add test for #75158 This also shifts some type-size related tests into a new directory, so that we keep the number of files at the root down. Closes #75158
2021-02-07Auto merge of #81821 - nikic:update-wasm32, r=sanxiynbors-10/+4
Upgrade wasm32 image to Ubuntu 20.04 This switches the wasm32 image, which is used to test wasm32-unknown-emscripten, to Ubuntu 20.04. While at it, enable most of the excluded tests, as they seem to work fine with some minor fixes.
2021-02-06Auto merge of #78052 - da-x:path-trimming-type-aliases, r=davidtwcobors-3919/+3921
path trimming: ignore type aliases Continuation of #73996.
2021-02-06Remove accidentally left-behind git markRune Tynan-1/+0
2021-02-06Add regression test for #29821bstrie-0/+19
Closes #29821
2021-02-06Auto merge of #80883 - GuillaumeGomez:remove-some-function-fields, r=ollie27bors-220/+246
Remove some function fields Same kind as #80845. This PR removes the `all_types` and `ret_types` from the `clean::Function` type. Another change that I had to do was implementing the `From` trait to be able to convert `hir::def::DefKind` into `clean::TypeKind` without requiring `DocContext` (and so I updated the `clean` method so that it's taken into account). The last two commits improve a bit the `get_real_types` function and the `Type::generics` method. r? `@jyn514`
2021-02-06Auto merge of #81832 - jonas-schievink:rollup-3nw53p0, r=jonas-schievinkbors-178/+273
Rollup of 7 pull requests Successful merges: - #81402 (tidy: Run tidy style against markdown files.) - #81434 (BTree: fix documentation of unstable public members) - #81680 (Refactor `PrimitiveTypeTable` for Clippy) - #81737 (typeck: Emit structured suggestions for tuple struct syntax) - #81738 (Miscellaneous small diagnostics cleanup) - #81766 (Enable 'task list' markdown extension) - #81812 (Add a test for escaping LLVMisms in inline asm) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-02-06Rollup merge of #81812 - nagisa:nagisa/escape-the-escape-hatch, r=AmanieuJonas Schievink-0/+32
Add a test for escaping LLVMisms in inline asm We escape certain LLVM-specific features when passing the inline assembly string to the LLVM. Until now, however, there was no test making sure this behaviour stays intact. This commit adds such a test! r? `@Amanieu` cc `@joshtriplett`
2021-02-06Rollup merge of #81766 - jyn514:task-lists, r=GuillaumeGomezJonas Schievink-1/+37
Enable 'task list' markdown extension Closes https://github.com/rust-lang/rust/issues/71183.
2021-02-06Rollup merge of #81738 - camelid:misc-small-diag-cleanup, r=lcnrJonas Schievink-16/+16
Miscellaneous small diagnostics cleanup
2021-02-06Rollup merge of #81737 - camelid:typeck-structure-sugg, r=lcnrJonas Schievink-3/+3
typeck: Emit structured suggestions for tuple struct syntax And tuple variant syntax, but that didn't fit in the subject :) Now the fact that these are suggestions is exposed both to the layout engine and to IDEs and rustfix for automatic application.
2021-02-06Rollup merge of #81680 - camsteffen:primty, r=oli-obkJonas Schievink-18/+4
Refactor `PrimitiveTypeTable` for Clippy I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
2021-02-06Rollup merge of #81402 - ehuss:md-tidy, r=jyn514Jonas Schievink-140/+181
tidy: Run tidy style against markdown files. This adds tidy checks for markdown files. I think it is useful to have some style enforcement (for the same reasons the style is enforced on other files). I think it is worthwhile to avoid `ignore` on rust examples since having broken code in documentation is frustrating. Avoiding trailing whitespace is good because it has semantic meaning in markdown, which I think should be avoided.
2021-02-06Add long error explanation for E0542Jesus Rubio-1/+1
2021-02-06Auto merge of #81824 - RalfJung:miri, r=RalfJungbors-8/+8
update Miri Fixes https://github.com/rust-lang/rust/issues/81770 Cc `@rust-lang/miri` r? `@ghost`
2021-02-06Add a test for escaping LLVMisms in inline asmSimonas Kazlauskas-0/+32
We escape certain LLVM-specific features when passing the inline assembly string to the LLVM. Until now, however, there was no test making sure this behaviour stays intact. This commit adds such a test!
2021-02-06update MiriRalf Jung-8/+8
2021-02-06Upgrade wasm32 image to Ubuntu 20.04Nikita Popov-10/+4
This switches the wasm32 image, which is used to test wasm32-unknown-emscripten to Ubuntu 20.04. While at it, enable most of the excluded tests, as they seem to work fine with some minor fixes.
2021-02-06path trimming: disable on src/test/run-make-fulldeps/coverage-spanviewDan Aloni-3794/+3796
2021-02-06path trimming: ignore type aliasesDan Aloni-191/+191
2021-02-06Auto merge of #81792 - pietroalbini:bump-nightly, r=Mark-Simulacrumbors-3/+3
Bump nightly version to 1.52.0 cc `@rust-lang/release`
2021-02-06Enable 'task list' markdown extensionJoshua Nelson-1/+37
- Add documentation about task lists
2021-02-05Add abi field to `Method`Rune Tynan-0/+28
2021-02-05Bump clippy versionMark Rousskov-2/+2
2021-02-06Rollup merge of #81753 - tmiasko:inline-instruction-set, r=oli-obkMara Bos-0/+146
Never MIR inline functions with a different instruction set
2021-02-06Rollup merge of #81675 - poliorcetics:respect-shortness, r=jyn514Mara Bos-1/+34
Make rustdoc respect `--error-format short` in doctests Note that this will not work with `cargo test`, only with `rustdoc --test`, I'll have to modify `cargo` as well. Fix #81662. `@rustbot` label +T-rustdoc +A-doctests
2021-02-06Rollup merge of #80011 - Stupremee:stabilize-peekable-next-if, r=dtolnayMara Bos-1/+0
Stabilize `peekable_next_if` This PR stabilizes the `peekable_next_if` feature Resolves #72480
2021-02-05Remove unneeded From trait impl for DefKindGuillaume Gomez-7/+1
2021-02-05Remove unused cache argumentGuillaume Gomez-12/+9
2021-02-05Improve codeGuillaume Gomez-3/+3
2021-02-05Improve html::render::cache::get_real_types codeGuillaume Gomez-5/+127
2021-02-05Remove Function all_types and ret_types fieldsGuillaume Gomez-218/+88
2021-02-05Explicitly match all DefKind item in conversion to TypeKindGuillaume Gomez-0/+43
2021-02-05bump nightly version to 1.52.0Pietro Albini-1/+1
2021-02-05Auto merge of #81257 - ↵bors-10747/+10745
pnkfelix:issue-80949-short-term-resolution-via-revert-of-pr-78373, r=matthewjasper Revert 78373 ("dont leak return value after panic in drop") Short term resolution for issue #80949. Reopen #47949 after this lands. (We plan to fine-tune PR #78373 to not run into this problem.)
2021-02-05Rollup merge of #81781 - m-ou-se:fix-ci, r=pietroalbiniMara Bos-1/+1
Fix `install-awscli.sh` error in CI This fixes the `install-awscli.sh` error about missing `'bdist_wheel'`.
2021-02-05Rollup merge of #81763 - camelid:rustdoc-passes-desc-up, r=GuillaumeGomezMara Bos-7/+7
Cleanup rustdoc pass descriptions a bit Also changed a couple of comments from "intra-doc-links" to "intra-doc links" (my understanding is that "intra-doc links" is the standard way to refer to them).
2021-02-05Rollup merge of #81730 - RustyYato:object-safe-allocator, r=AmanieuMara Bos-0/+13
Make `Allocator` object-safe This allows rust-lang/wg-allocators#83: polymorphic allocators
2021-02-05Rollup merge of #81500 - CraftSpider:union-kind, r=jyn514Mara Bos-6/+20
Remove struct_type from union output Also bumps the format number and adds a test Rationale: It's illegal to have unions of the form `union Union(i32, f32);`, or `union Union;`. The struct_type field was recently removed from the rustdoc Union AST, at which time this field was changed to always just read "union". It makes sense to completely remove it, as it provides no information.
2021-02-05Rollup merge of #81497 - camelid:rustdoc-display_fn-remove-cell, r=jyn514Mara Bos-11/+11
rustdoc: Move `display_fn` struct inside `display_fn` This makes it clear that it's an implementation detail of `display_fn` and shouldn't be used elsewhere, and it enforces in the compiler that no one else can use it. r? ````@GuillaumeGomez````