- 29 11月, 2020 1 次提交
-
-
由 Nadrieril 提交于
-
- 28 11月, 2020 15 次提交
-
-
由 bors 提交于
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`.
-
由 bors 提交于
Setup proc-macro metadata at encoding instead of decoding This should improve the common non-proc-macro case for metadata decoding.
-
由 bors 提交于
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`
-
由 bors 提交于
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
-
由 Aaron Hill 提交于
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).
-
由 Camille GILLOT 提交于
Encode proc_macro name directly. Do not store None values.
-
由 bors 提交于
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`
-
由 Nadrieril 提交于
-
由 Nadrieril 提交于
-
由 Nadrieril 提交于
-
由 Nadrieril 提交于
-
由 Nadrieril 提交于
-
由 Nadrieril 提交于
-
由 Nadrieril 提交于
-
由 oli 提交于
-
- 27 11月, 2020 24 次提交
-
-
由 bors 提交于
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.
-
由 Aaron Hill 提交于
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.
-
由 bors 提交于
Store HIR ForeignItem in a side table In a similar fashion to Item, ImplItem and TraitItem.
-
由 bors 提交于
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`
-
由 bors 提交于
Skip most of `create_substs_for_ast_path` if type is not generic
-
由 Aaron Hill 提交于
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.
-
由 bors 提交于
Generic Associated Types in Trait Paths - Ast part The Ast part of https://github.com/rust-lang/rust/pull/78978 r? `@petrochenkov`
-
由 Camille GILLOT 提交于
-
由 Dániel Buga 提交于
Co-authored-by: Nvarkor <github@varkor.com>
-
由 Aaron Hill 提交于
-
由 Aaron Hill 提交于
-
由 Aaron Hill 提交于
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.
-
由 Aaron Hill 提交于
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`.
-
由 bors 提交于
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.
-
由 Camille GILLOT 提交于
-
由 Camille GILLOT 提交于
-
由 Camille GILLOT 提交于
-
由 Camille GILLOT 提交于
-
由 Camille GILLOT 提交于
-
由 Camille GILLOT 提交于
-
由 Joshua Nelson 提交于
-
由 Joshua Nelson 提交于
-
由 Joshua Nelson 提交于
- Take `String` instead of `Symbol` - this avoids having to intern then immediately stringify the existing string. - Remove unused `get_stability` and `get_deprecation` - Remove unused `attrs` field from `primitives`
-
由 Joshua Nelson 提交于
-