about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-11-28Move `src/test/rustdoc` intra-doc link tests into a subdirectoryJoshua Nelson-258/+254
They were starting to get unwieldy.
2020-11-28Auto merge of #79507 - jonas-schievink:rollup-e5yeayh, r=jonas-schievinkbors-268/+471
Rollup of 10 pull requests Successful merges: - #78086 (Improve doc for 'as _') - #78853 (rustc_parse: fix ConstBlock expr span) - #79234 (Resolve typedefs in HashMap gdb/lldb pretty-printers) - #79344 (Convert UNC path to local path to satisfy install script on Windows) - #79383 (Fix bold code formatting in keyword docs) - #79460 (Remove intermediate vectors from `add_bounds`) - #79474 (Change comments on types to doc-comments) - #79476 (Sync rustc_codegen_cranelift) - #79478 (Expand docs on Peekable::peek_mut) - #79486 (Slightly improve code samples in E0591) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2020-11-28Rollup merge of #79486 - camelid:E0591-code-cleanup, r=lcnrJonas Schievink-12/+26
Slightly improve code samples in E0591 * Improve formatting * Don't hide `unsafe` block - it's important!
2020-11-28Rollup merge of #79478 - lukaslueg:peek_mut_docs, r=m-ou-seJonas Schievink-5/+9
Expand docs on Peekable::peek_mut Slightly expand docs on `std::iter::Peekable::peek_mut`, tracked in #78302 r? `@m-ou-se`
2020-11-28Rollup merge of #79476 - bjorn3:sync_cg_clif-2020-11-27, r=bjorn3Jonas Schievink-222/+400
Sync rustc_codegen_cranelift This implements a few extra simd intrinsics, fixes yet another 128bit bug and updates a few dependencies. It also fixes an cg_clif subtree update that did compile, but that caused a panic when compiling libcore. Other than that this is mostly cleanups. `@rustbot` modify labels: +A-codegen +A-cranelift +T-compiler
2020-11-28Rollup merge of #79474 - jyn514:query-mode, r=Aaron1011Jonas Schievink-6/+6
Change comments on types to doc-comments Found while investigating https://github.com/rust-lang/rust/issues/79459. r? `@Aaron1011`
2020-11-28Rollup merge of #79460 - bugadani:simplify, r=jonas-schievinkJonas Schievink-14/+5
Remove intermediate vectors from `add_bounds` This PR removes two short lived vectors that don't serve any obvious purpose.
2020-11-28Rollup merge of #79383 - abdnh:patch-1, r=shepmasterJonas Schievink-2/+2
Fix bold code formatting in keyword docs
2020-11-28Rollup merge of #79344 - JRF63:fix_install_script_win, r=Mark-SimulacrumJonas Schievink-1/+5
Convert UNC path to local path to satisfy install script on Windows `mkdir` with the `-p` flag attempts to create `//?` if passed a UNC path. This fails on both MSYS2 and Git Bash. The UNC paths come from [canonicalizing](https://github.com/rust-lang/rust/blob/32da90b431919eedb3e281a91caea063ba4edb77/src/bootstrap/install.rs#L79) the install prefix path. `mkdir -p` gets invoked on the [install script](https://github.com/rust-lang/rust-installer/blob/d66f476b4d5e7fdf1ec215c9ac16c923dc292324/install-template.sh#L149).
2020-11-28Rollup merge of #79234 - ortem:fix-hashmap-pretty-printers, r=Mark-SimulacrumJonas Schievink-2/+2
Resolve typedefs in HashMap gdb/lldb pretty-printers `GetTypedefedType` (LLDB) and `strip_typedefs` (GDB) calls are needed to resolve key and value types completely. Without these calls, debugger doesn't show the actual type. **Before** (without `GetTypedefedType`): ``` (lldb) frame variable hm[0] (T) hm[0] = { ... } ``` **After** (with `GetTypedefedType`): ``` (lldb) frame variable hm[0] ((i32, alloc::string::String)) hm[0] = { ... } ``` Based on https://github.com/intellij-rust/intellij-rust/pull/6258
2020-11-28Rollup merge of #78853 - calebcartwright:fix-const-block-expr-span, r=spastorinoJonas Schievink-1/+2
rustc_parse: fix ConstBlock expr span The span for a ConstBlock expression should presumably run through the end of the block it contains and not stop at the keyword, just like is done with similar block-containing expression kinds, such as a TryBlock
2020-11-28Rollup merge of #78086 - poliorcetics:as-placeholder, r=Mark-SimulacrumJonas Schievink-3/+14
Improve doc for 'as _' Fix #78042. `@rustbot` modify labels: A-coercions T-doc
2020-11-28Auto merge of #78296 - Aaron1011:fix/stmt-tokens, r=petrochenkovbors-255/+602
Properly handle attributes on statements We now collect tokens for the underlying node wrapped by `StmtKind` nstead of storing tokens directly in `Stmt`. `LazyTokenStream` now supports capturing a trailing semicolon after it is initially constructed. This allows us to avoid refactoring statement parsing to wrap the parsing of the semicolon in `parse_tokens`. Attributes on item statements (e.g. `fn foo() { #[bar] struct MyStruct; }`) are now treated as item attributes, not statement attributes, which is consistent with how we handle attributes on other kinds of statements. The feature-gating code is adjusted so that proc-macro attributes are still allowed on item statements on stable. Two built-in macros (`#[global_allocator]` and `#[test]`) needed to be adjusted to support being passed `Annotatable::Stmt`.
2020-11-28Auto merge of #79353 - cjgillot:procmacro, r=petrochenkovbors-67/+62
Setup proc-macro metadata at encoding instead of decoding This should improve the common non-proc-macro case for metadata decoding.
2020-11-27Slightly improve code samples in E0591Camelid-12/+26
* Improve formatting * Don't hide `unsafe` block - it's important!
2020-11-28Auto merge of #79469 - rust-lang:revert-77467-query-docs, r=jyn514bors-0/+3
Revert "Normalize `<X as Y>::T` for rustdoc" Reverts rust-lang/rust#77467 by disabling normalization. See https://github.com/rust-lang/rust/issues/79459; I intend to reland normalization once that's fixed. r? `@Aaron1011` cc `@oli-obk` `@GuillaumeGomez`
2020-11-27Auto merge of #79284 - Nadrieril:constructor-module, r=varkorbors-1636/+1661
Split match exhaustiveness into two files I feel the constructor-related things in the `_match` module make enough sense on their own so I split them off. It makes `_match` feel less like a complicated mess. I'm not aware of PRs in progress against this module apart from my own so hopefully I'm not annoying too many people. I have a lot of questions about the conventions in naming and modules around the compiler. Like, why is the module named `_match`? Could I rename it to `usefulness` maybe? Should `deconstruct_pat` be a submodule of `_match` since only `_match` uses it? Is it ok to move big piles of code around even if it makes git blame more difficult? r? `@varkor` `@rustbot` modify labels: +A-exhaustiveness-checking
2020-11-27Expand docs on Peekable::peek_mutLukas Lueg-5/+9
2020-11-27Bump recursion_limit in rustc_ast_passesAaron Hill-0/+1
When cfg(parallel_compiler) is enabled, we end up trying to prove Send/Sync bounds for some deeply nested types (at least when rustdoc is run).
2020-11-27Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into ↵bjorn3-222/+400
sync_cg_clif-2020-11-27
2020-11-27Encode proc_macro directly.Camille GILLOT-67/+62
Encode proc_macro name directly. Do not store None values.
2020-11-27Auto merge of #79372 - jyn514:more-cleanup, r=GuillaumeGomezbors-67/+49
Cleanup more of rustdoc - Use `Item::from_def_id` for StructField - Use `from_def_id_and_parts` for primitives and keywords - Take `String` instead of `Symbol` in `from_def_id` - this avoids having to intern then immediately stringify the existing string. - Remove unused `get_stability` and `get_deprecation` - Remove unused `attrs` field from `primitives` - Remove unused `attrs` field from `keywords` This will probably conflict with https://github.com/rust-lang/rust/pull/79335 and I would prefer for that PR to land first - I'm anxious for https://github.com/rust-lang/rust/pull/77467 to land :) Makes https://github.com/rust-lang/rust/issues/76998 easier to add. r? `@GuillaumeGomez`
2020-11-27Change comments on types to doc-commentsJoshua Nelson-6/+6
2020-11-27Rename `_match` to `usefulness`Nadrieril-4/+4
2020-11-27Rename `pat_constructor` to `Constructor::from_pat`Nadrieril-63/+63
2020-11-27Move the definitions of the two `Ctxt`s to the topNadrieril-47/+46
2020-11-27Extract everything related to pattern deconstruction to a new moduleNadrieril-1387/+1413
2020-11-27No need to expose `Matrix` internalsNadrieril-1/+6
2020-11-27Disentangle `Fields` and `PatStack`Nadrieril-17/+16
2020-11-27Move `Constructor::apply` to `Fields`Nadrieril-93/+89
2020-11-27Revert the effect of #77467 by disabling normalization in rustdocoli-0/+3
2020-11-27Revert "Use the new component dependency option of the rust-toolchain file"bjorn3-7/+4
This reverts commit 648caced6eb0d23c31758f69f2f44a7d748526b9. Rustup on github actions isn't yet updated
2020-11-27Sync from rust c9228570668803e3e6402770d55f23a12c9ae686bjorn3-3/+3
2020-11-27Rustup to rustc 1.50.0-nightly (72da5a9d8 2020-11-26)bjorn3-10/+10
2020-11-27Use the new component dependency option of the rust-toolchain filebjorn3-4/+7
2020-11-27Auto merge of #77484 - ↵bors-3/+39
terhechte:support-ios-catalyst-macabi-arm64-target-triple, r=nikomatsakis Add support for Arm64 Catalyst on ARM Macs This is an iteration on https://github.com/rust-lang/rust/pull/63467 which was merged a while ago. In the aforementioned PR, I added support for the `X86_64-apple-ios-macabi` target triple, which is Catalyst, iOS apps running on macOS. Very soon, Apple will launch ARM64 based Macs which will introduce `aarch64_apple_darwin.rs`, macOS apps using the Darwin ABI running on ARM. This PR adds support for Catalyst apps on ARM Macs: iOS apps compiled for the darwin ABI. I don't have access to a Apple Developer Transition Kit (DTK), so I can't really test if the generated binaries work correctly. I'm vaguely hopeful that somebody with access to a DTK could give this a spin.
2020-11-27Don't lint on redundant semicolons after item statementsAaron Hill-3/+28
This preserves the current lint behavior for now. Linting after item statements currently prevents the compiler from bootstrapping. Fixing this is blocked on fixing this upstream in Cargo, and bumping the Cargo submodule.
2020-11-27Auto merge of #79318 - cjgillot:fitem, r=lcnrbors-226/+400
Store HIR ForeignItem in a side table In a similar fashion to Item, ImplItem and TraitItem.
2020-11-27Remove intermediate vectors from add_boundsDániel Buga-14/+5
2020-11-27Auto merge of #79433 - calebcartwright:parse-attr-vis, r=petrochenkovbors-2/+4
rustc_parse: restore public visibility on parse_attribute Make `parse_attribute` public as rustfmt is a downstream consumer. Refs https://github.com/rust-lang/rust/pull/78782#discussion_r530658904 r? `@petrochenkov`
2020-11-27Auto merge of #78194 - bugadani:generic, r=varkorbors-0/+8
Skip most of `create_substs_for_ast_path` if type is not generic
2020-11-26Use custom macro instead of printlnAaron Hill-141/+152
Loading a macro from libstd causes us to load serialized `SyntaxContext`s in a platform-dependent way, causing the printed spans to differ between platforms.
2020-11-27Auto merge of #79266 - b-naber:gat_trait_path_parser, r=petrochenkovbors-60/+447
Generic Associated Types in Trait Paths - Ast part The Ast part of https://github.com/rust-lang/rust/pull/78978 r? `@petrochenkov`
2020-11-26Rebase fallout.Camille GILLOT-0/+6
2020-11-26Skip most of create_substs_for_ast_path if type is not genericDániel Buga-0/+8
Co-authored-by: varkor <github@varkor.com>
2020-11-26Fix new 'unnecessary trailing semicolon' warningsAaron Hill-39/+39
2020-11-26Add additional semicolon testAaron Hill-108/+126
2020-11-26Only eat semicolons for statements that need themAaron Hill-8/+2
When parsing a statement (e.g. inside a function body), we now consider `struct Foo {};` and `$stmt;` to each consist of two statements: `struct Foo {}` and `;`, and `$stmt` and `;`. As a result, an attribute macro invoke as `fn foo() { #[attr] struct Bar{}; }` will see `struct Bar{}` as its input. Additionally, the 'unused semicolon' lint now fires in more places.
2020-11-26Properly handle attributes on statementsAaron Hill-186/+484
We now collect tokens for the underlying node wrapped by `StmtKind` instead of storing tokens directly in `Stmt`. `LazyTokenStream` now supports capturing a trailing semicolon after it is initially constructed. This allows us to avoid refactoring statement parsing to wrap the parsing of the semicolon in `parse_tokens`. Attributes on item statements (e.g. `fn foo() { #[bar] struct MyStruct; }`) are now treated as item attributes, not statement attributes, which is consistent with how we handle attributes on other kinds of statements. The feature-gating code is adjusted so that proc-macro attributes are still allowed on item statements on stable. Two built-in macros (`#[global_allocator]` and `#[test]`) needed to be adjusted to support being passed `Annotatable::Stmt`.
2020-11-26Auto merge of #79338 - Aaron1011:fix/token-reparse-cache, r=petrochenkovbors-3/+85
Cache pretty-print/retokenize result to avoid compile time blowup Fixes #79242 If a `macro_rules!` recursively builds up a nested nonterminal (passing it to a proc-macro at each step), we will end up repeatedly pretty-printing/retokenizing the same nonterminals. Unfortunately, the 'probable equality' check we do has a non-trivial cost, which leads to a blowup in compilation time. As a workaround, we cache the result of the 'probable equality' check, which eliminates the compilation time blowup for the linked issue. This commit only touches a single file (other than adding tests), so it should be easy to backport. The proper solution is to remove the pretty-print/retokenize hack entirely. However, this will almost certainly break a large number of crates that were relying on hygiene bugs created by using the reparsed `TokenStream`. As a result, we will definitely not want to backport such a change.