| Age | Commit message (Collapse) | Author | Lines |
|
They were starting to get unwieldy.
|
|
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
|
|
Slightly improve code samples in E0591
* Improve formatting
* Don't hide `unsafe` block - it's important!
|
|
Expand docs on Peekable::peek_mut
Slightly expand docs on `std::iter::Peekable::peek_mut`, tracked in #78302
r? `@m-ou-se`
|
|
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
|
|
Change comments on types to doc-comments
Found while investigating https://github.com/rust-lang/rust/issues/79459.
r? `@Aaron1011`
|
|
Remove intermediate vectors from `add_bounds`
This PR removes two short lived vectors that don't serve any obvious purpose.
|
|
Fix bold code formatting in keyword docs
|
|
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).
|
|
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
|
|
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
|
|
Improve doc for 'as _'
Fix #78042.
`@rustbot` modify labels: A-coercions T-doc
|
|
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`.
|
|
Setup proc-macro metadata at encoding instead of decoding
This should improve the common non-proc-macro case for metadata decoding.
|
|
* Improve formatting
* Don't hide `unsafe` block - it's important!
|
|
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`
|
|
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
|
|
|
|
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).
|
|
sync_cg_clif-2020-11-27
|
|
Encode proc_macro name directly.
Do not store None values.
|
|
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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit 648caced6eb0d23c31758f69f2f44a7d748526b9.
Rustup on github actions isn't yet updated
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
Store HIR ForeignItem in a side table
In a similar fashion to Item, ImplItem and TraitItem.
|
|
|
|
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`
|
|
Skip most of `create_substs_for_ast_path` if type is not generic
|
|
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.
|
|
Generic Associated Types in Trait Paths - Ast part
The Ast part of https://github.com/rust-lang/rust/pull/78978
r? `@petrochenkov`
|
|
|
|
Co-authored-by: varkor <github@varkor.com>
|
|
|
|
|
|
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.
|
|
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`.
|
|
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.
|