1. 18 5月, 2021 12 次提交
  2. 17 5月, 2021 16 次提交
    • H
      Add a comment for `check_abi()` · 97bc0eef
      hyd-dev 提交于
      97bc0eef
    • R
      remove some functions that were only used by Miri · cb5533cf
      Ralf Jung 提交于
      cb5533cf
    • B
      Auto merge of #84571 - jedel1043:issue-49804-impl, r=petrochenkov · 9964284f
      bors 提交于
      Parse unnamed fields of struct and union type
      
      Added the `unnamed_fields` feature gate.
      
      This is a prototype of [RFC 2102](https://github.com/rust-lang/rust/issues/49804), so any suggestions are greatly appreciated.
      
      r? `@petrochenkov`
      9964284f
    • C
    • R
      5d71c674
    • R
      remove size field from Allocation · 7962b5ae
      Ralf Jung 提交于
      7962b5ae
    • B
      Auto merge of #85353 - jonas-schievink:async-blocks-in-ctfe, r=oli-obk · 44ec846f
      bors 提交于
      Allow `async {}` expressions in const contexts
      
      Gated behind a new `const_async_blocks` feature.
      44ec846f
    • J
      64acb7d9
    • B
      Auto merge of #85178 - cjgillot:local-crate, r=oli-obk · 3396a383
      bors 提交于
      Remove CrateNum parameter for queries that only work on local crate
      
      The pervasive `CrateNum` parameter is a remnant of the multi-crate rustc idea.
      
      Using `()` as query key in those cases avoids having to worry about the validity of the query key.
      3396a383
    • B
      Auto merge of #84993 - eddyb:cg-ssa-on-demand-blocks, r=nagisa · a55748ff
      bors 提交于
      rustc_codegen_ssa: only create backend `BasicBlock`s as-needed.
      
      Instead of creating one backend (e.g. LLVM) block per MIR block ahead of time, and then deleting the ones that weren't visited, this PR moves to creating the blocks as they're needed (either reached via the RPO visit, or used as the target of a branch from a different block).
      
      As deleting a block was the only `unsafe` builder method (generally we only *create* backend objects, not *remove* them), that's gone now and codegen is overall a bit safer.
      
      The only change in output is the order of LLVM blocks (which AFAIK has no semantic meaning, other than the first block being the entry block). This happens because the blocks are now created due to control-flow edges, rather than MIR block order.
      
      I'm making this a standalone PR because I keep getting wild perf results when I change *anything* in codegen, but if you want to read more about my plans in this area, see https://github.com/rust-lang/rust/pull/84771#issuecomment-830636256 (and https://github.com/rust-lang/rust/pull/84771#issue-628295651 - but that may be a bit outdated).
      
      (You may notice some of the APIs in this PR, like `append_block`, don't help with the future plans - but I didn't want to include the necessary refactors that pass a build around everywhere, in this PR, so it's a small compromise)
      
      r? `@nagisa` `@bjorn3`
      a55748ff
    • E
    • E
    • B
      Auto merge of #85312 - ehuss:macro_use-unused-attr, r=petrochenkov · fe72845f
      bors 提交于
      Fix unused attributes on macro_rules.
      
      The `unused_attributes` lint wasn't firing on attributes of `macro_rules` definitions. The consequence is that many attributes are silently ignored on `macro_rules`. The reason is that `unused_attributes` is a late-lint pass, and only has access to the HIR, which does not have macro_rules definitions.
      
      My solution here is to change `non_exported_macro_attrs` to be `macro_attrs` (a list of all attributes used for `macro_rules`, instead of just those for `macro_export`), and then to check this list in the `unused_attributes` lint. There are a number of alternate approaches, but this seemed the most reliable and least invasive. I am open to completely different approaches, though.
      
      One concern is that I don't fully understand the implications of extending `non_exported_macro_attrs` to include non-exported macros. That list was originally added in #62042 to handle stability attributes, so I suspect it was just an optimization since that was all that was needed. It was later extended to be included in SVH in #83901. #80641 also added a use to check for `invalid` attributes, which seems a little odd to me (it didn't validate non-exported macros, and seems highly specific).
      
      Overall, there doesn't seem to be a clear story of when `unused_attributes` should be used versus an error like E0518. I considered alternatively using an "allow list" of built-in attributes that can be used on macro_rules (allow, warn, deny, forbid, cfg, cfg_attr, macro_export, deprecated, doc), but I feel like that could be a pain to maintain.
      
      Some built-in attributes already present hard-errors when used with macro_rules. These are each hard-coded in various places:
      - `derive`
      - `test` and `bench`
      - `proc_macro` and `proc_macro_derive`
      - `inline`
      - `global_allocator`
      
      The primary motivation is that I sometimes see people use `#[macro_use]` in front of `macro_rules`, which indicates there is some confusion out there (evident that there was even a case of it in rustc).
      fe72845f
    • J
      Add tracking issue · 014e8d46
      Jonas Schievink 提交于
      014e8d46
    • B
      Auto merge of #85290 - Amanieu:asm_const_int, r=nagisa · 7dc9ff5c
      bors 提交于
      Remove support for floating-point constants in asm!
      
      Floating-point constants aren't very useful anyways and this simplifies
      the code since the type check can now be done in typeck.
      
      cc `@rust-lang/wg-inline-asm`
      
      r? `@nagisa`
      7dc9ff5c
    • T
      mark internal inplace_iteration traits as hidden · 39e492a2
      The8472 提交于
      39e492a2
  3. 16 5月, 2021 12 次提交