Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit attributes on 'if' expressions #69201

Merged
merged 11 commits into from
Mar 9, 2020

Conversation

Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Feb 16, 2020

Previously, attributes on 'if' expressions (e.g. #[attr] if true {})
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.

This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. #[allow], #[cfg]) and proc-macro attributes are supported.

We still do not accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:

if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}

Closes #68618

@rust-highfive

This comment has been minimized.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 16, 2020
@Aaron1011
Copy link
Member Author

r? @Centril

@Centril Centril added relnotes Marks issues that should be documented in the release notes of the next release. T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Feb 17, 2020
@Centril Centril added this to the 1.43 milestone Feb 17, 2020
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; I'd like to see some more tests though:

  • Interactions with stmt_expr_attributes, specifically demonstrating that let _ = #[allow(...)] if ...; is feature gated.
  • Testing that let _ = #[cfg(FALSE)] if true {}; results in "error: removing an expression is not supported in this position".
  • Testing that #[cfg(FALSE)] and cfg_attr perform normally when attached onto if ... as a statement. (e.g. provoke a type error inside the block in the former case and a lint set to deny in the latter case, and ensure that the test is check-pass).

These mostly test aspects of statements and expressions themselves, but I'd like to be sure that there's nothing out of the ordinary here.

src/test/ui/parser/attr-stmt-expr-attr-bad.rs Show resolved Hide resolved
src/test/ui/parser/recovery-attr-on-if.rs Outdated Show resolved Hide resolved
@Centril
Copy link
Contributor

Centril commented Feb 17, 2020

From #68658 (comment):

We discussed this in today's language team meeting (2020-02-13).

Those present, in particular myself and @joshtriplett, felt that of the options available (1. keep the status quo, 2. accept only syntactically, 3. accept semantically also), that the 3rd option would be the simplest, and least complex approach.

Specifically, we would like to allow #[attr] on if both syntactically (in the parser) and semantically (expansion / conditional compilation, subject to existing feature gates for stmt_expr_attributes, e.g. #[allow()] match 0 { _ => {} }; (ungated) vs. let _ = #[allow()] match 0 { _ => {} }; (gated)).

In reaching this conclusion, we did consult RFC 16 regarding attributes on if expressions. We noted in particular that neither of else #[cfg(not(bar))] if cond2 or else #[cfg(not(baz))] {. Moreover, as @petrochenkov notes in #68658 (comment):

It's pretty established now that macros and attributes work with expressions/statements and not arbitrary syntactic fragments, so the choice in favor of the alternative 2 from https://github.com/rust-lang/rfcs/blob/master/text/0016-more-attributes.md#if is unlikely.

We also noted that while many users interpret code in a linear / textual fashion as opposed to as a tree-like structure, we still believe that the semantics of e.g. #[allow(...)] if ... is something that can be learned as necessary.

Based on this, let's:

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Feb 17, 2020

Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Feb 17, 2020
@joshtriplett
Copy link
Member

I'd like to request one more test, please:

let x = 1;

#[cfg(FALSE)]
if false {
    x = 2;
} else if true {
    x = 3;
} else {
    x = 4;
}
assert_eq!(x, 1);

This makes sure that the attribute gets applied to the entire chained if/else-if/else construct, and not just part of it.

@Aaron1011
Copy link
Member Author

Aaron1011 commented Feb 19, 2020

@Centril: I've added the additional tests you requested and removed the parser recovery test.

@joshtriplett: I've added the test you suggested.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-02-19T16:06:14.4258135Z ========================== Starting Command Output ===========================
2020-02-19T16:06:14.4295156Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/f2672492-244e-4e7c-89ba-7c05bab6e5a0.sh
2020-02-19T16:06:14.4295260Z 
2020-02-19T16:06:14.4297979Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-19T16:06:14.4303973Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69201/merge to s
2020-02-19T16:06:14.4305653Z Task         : Get sources
2020-02-19T16:06:14.4305688Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-19T16:06:14.4305723Z Version      : 1.0.0
2020-02-19T16:06:14.4305758Z Author       : Microsoft
---
2020-02-19T16:06:15.2833440Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-19T16:06:15.2936260Z ##[command]git config gc.auto 0
2020-02-19T16:06:15.3000888Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-19T16:06:15.3072873Z ##[command]git config --get-all http.proxy
2020-02-19T16:06:15.3205112Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69201/merge:refs/remotes/pull/69201/merge
---
2020-02-19T16:11:49.1750071Z    Compiling serde_json v1.0.40
2020-02-19T16:11:50.2881613Z    Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
2020-02-19T16:11:59.3565872Z     Finished release [optimized] target(s) in 1m 21s
2020-02-19T16:11:59.3652037Z tidy check
2020-02-19T16:11:59.9046588Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:4: tab character
2020-02-19T16:11:59.9047073Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:6: tab character
2020-02-19T16:11:59.9047394Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:7: tab character
2020-02-19T16:11:59.9047703Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:8: tab character
2020-02-19T16:11:59.9048022Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:9: tab character
2020-02-19T16:11:59.9048346Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:10: tab character
2020-02-19T16:11:59.9048655Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:11: tab character
2020-02-19T16:11:59.9048976Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:12: tab character
2020-02-19T16:11:59.9049284Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:13: tab character
2020-02-19T16:11:59.9050064Z tidy error: /checkout/src/test/ui/if-attrs/gate-whole-expr.rs:14: tab character
2020-02-19T16:12:01.8422230Z some tidy checks failed
2020-02-19T16:12:01.8422372Z Found 487 error codes
2020-02-19T16:12:01.8422437Z Found 0 error codes with no tests
2020-02-19T16:12:01.8422520Z Done!
2020-02-19T16:12:01.8422520Z Done!
2020-02-19T16:12:01.8422557Z 
2020-02-19T16:12:01.8422590Z 
2020-02-19T16:12:01.8423604Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor"
2020-02-19T16:12:01.8423741Z 
2020-02-19T16:12:01.8423772Z 
2020-02-19T16:12:01.8423848Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
2020-02-19T16:12:01.8423913Z Build completed unsuccessfully in 0:01:31
2020-02-19T16:12:01.8423913Z Build completed unsuccessfully in 0:01:31
2020-02-19T16:12:01.8467495Z == clock drift check ==
2020-02-19T16:12:01.8488385Z   local time: Wed Feb 19 16:12:01 UTC 2020
2020-02-19T16:12:02.0045624Z   network time: Wed, 19 Feb 2020 16:12:02 GMT
2020-02-19T16:12:02.0051506Z == end clock drift check ==
2020-02-19T16:12:02.7155115Z 
2020-02-19T16:12:02.7245306Z ##[error]Bash exited with code '1'.
2020-02-19T16:12:02.7259893Z ##[section]Finishing: Run build
2020-02-19T16:12:02.7273691Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69201/merge to s
2020-02-19T16:12:02.7275407Z Task         : Get sources
2020-02-19T16:12:02.7275476Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-19T16:12:02.7275526Z Version      : 1.0.0
2020-02-19T16:12:02.7275569Z Author       : Microsoft
2020-02-19T16:12:02.7275569Z Author       : Microsoft
2020-02-19T16:12:02.7275633Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-19T16:12:02.7275687Z ==============================================================================
2020-02-19T16:12:03.1035820Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-19T16:12:03.1075712Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69201/merge to s
2020-02-19T16:12:03.1180888Z Cleaning up task key
2020-02-19T16:12:03.1181809Z Start cleaning up orphan processes.
2020-02-19T16:12:03.1285956Z Terminate orphan process: pid (4010) (python)
2020-02-19T16:12:03.1461964Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me when FCP is done

@scottmcm
Copy link
Member

@rfcbot reviewed

I don't have a complaint about this situation in particular, but do wonder about philosophy around attributes here. @Centril mentioned in the meeting that it's expressions in certain context that can allow attributes; I'd like a page in the reference or something about why particular things can or cannot have attributes. For example, the following currently doesn't work:

let x = #[cfg(true)] 4 #[cfg(not(true))] 5;

But in some sense there isn't a reason that it couldn't be made to work, since either way is a valid expression for the RHS of the binding.

So I'd just like a definition somewhere about why it's the right thing to do on an if expression, but not on a literal expression. (Sorry if it already exists somewhere, but I didn't see an answer in the OP, in the RFC proposal comment, or in skimming the thread.)

@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Feb 27, 2020
@rfcbot
Copy link

rfcbot commented Feb 27, 2020

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Feb 27, 2020
@eddyb
Copy link
Member

eddyb commented Feb 27, 2020

@scottmcm There is one interesting distinction: expressions if are allowed to be expression statements without a ;.
AFAIK, the shortest version of your example that does work is:

let x = {
    #[cfg(foo)] { 4 }
    #[cfg(not(foo))] { 5 }
};

This is because this parses even if you remove the #[cfg]s (and results in a mismatched types error, as it expects { 4 } to have the type ()).

@Centril
Copy link
Contributor

Centril commented Feb 28, 2020

The reason why e.g. #[cfg(stuff))] let x = 0; works but e.g. let x = #[cfg(true)] 4 #[cfg(not(true))] 5; doesn't can I think be summarized with "because monoids". In the former context, we have a list of statements, and lists have as their identity element the empty list. In the latter context, we have an expression to the right of =. Expressions do not have an identity element, so what do we do if both 4 and 5 are removed? Similarly, what do we do if both are kept? Remember that the conditional compilation engine does not perform any form of "there will only be one remaining" analysis after stripping is done. (This is ignoring the fact that the parser would not allow Attrs* 4 Attrs* 5, so we never reach conditional compilation to begin with.)

@bors

This comment has been minimized.

Previously, attributes on 'if' expressions (e.g. #[attr] if true {})
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.

This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) are supported.

We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:

```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```
Centril added a commit to Centril/rust that referenced this pull request Mar 9, 2020
…=Centril

Permit attributes on 'if' expressions

Previously, attributes on 'if' expressions (e.g. `#[attr] if true {}`)
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.

This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) and proc-macro attributes are supported.

We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:

```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```

Closes rust-lang#68618
Centril added a commit to Centril/rust that referenced this pull request Mar 9, 2020
…=Centril

Permit attributes on 'if' expressions

Previously, attributes on 'if' expressions (e.g. `#[attr] if true {}`)
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.

This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) and proc-macro attributes are supported.

We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:

```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```

Closes rust-lang#68618
bors added a commit that referenced this pull request Mar 9, 2020
Rollup of 6 pull requests

Successful merges:

 - #69201 (Permit attributes on 'if' expressions)
 - #69402 (Extend search)
 - #69519 ( Don't use static crt by default when build proc-macro)
 - #69685 (unix: Don't override existing SIGSEGV/BUS handlers)
 - #69762 (Ensure that validity only raises validity errors)
 - #69779 (librustc_codegen_llvm: Use slices in preference to 0-terminated strings)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Mar 9, 2020
…=Centril

Permit attributes on 'if' expressions

Previously, attributes on 'if' expressions (e.g. `#[attr] if true {}`)
were disallowed during parsing. This made it impossible for macros to
perform any custom handling of such attributes (e.g. stripping them
away), since a compilation error would be emitted before they ever had a
chance to run.

This PR permits attributes on 'if' expressions ('if-attrs' from here on).
Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) and proc-macro attributes are supported.

We still do *not* accept attributes on 'other parts' of an if-else
chain. That is, the following code snippet still fails to parse:

```rust
if true {} #[attr] else if false {} else #[attr] if false {} #[attr]
else {}
```

Closes rust-lang#68618
bors added a commit that referenced this pull request Mar 9, 2020
Rollup of 6 pull requests

Successful merges:

 - #69201 (Permit attributes on 'if' expressions)
 - #69685 (unix: Don't override existing SIGSEGV/BUS handlers)
 - #69762 (Ensure that validity only raises validity errors)
 - #69779 (librustc_codegen_llvm: Use slices in preference to 0-terminated strings)
 - #69801 (rustc_parse: Remove `Parser::normalized(_prev)_token`)
 - #69842 (Add more regression tests)

Failed merges:

r? @ghost
@bors bors merged commit 4ec9975 into rust-lang:master Mar 9, 2020
Aaron1011 added a commit to Aaron1011/reference that referenced this pull request Mar 13, 2020
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 16, 2020
Pkgsrc changes:
 * Bump rust bootstrap version to 1.42.0, except for Darwin/i686 where the
   bootstrap is not (yet?) available.

Upstream changes:

Version 1.43.0 (2020-04-23)
==========================

Language
--------
- [Fixed using binary operations with `&{number}` (e.g. `&1.0`) not having
  the type inferred correctly.][68129]
- [Attributes such as `#[cfg()]` can now be used on `if` expressions.][69201]

**Syntax only changes**
- [Allow `type Foo: Ord` syntactically.][69361]
- [Fuse associated and extern items up to defaultness.][69194]
- [Syntactically allow `self` in all `fn` contexts.][68764]
- [Merge `fn` syntax + cleanup item parsing.][68728]
- [`item` macro fragments can be interpolated into `trait`s, `impl`s,
  and `extern` blocks.][69366]
  For example, you may now write:
  ```rust
  macro_rules! mac_trait {
      ($i:item) => {
          trait T { $i }
      }
  }
  mac_trait! {
      fn foo() {}
  }
  ```
These are still rejected *semantically*, so you will likely receive an error but
these changes can be seen and parsed by macros and
conditional compilation.


Compiler
--------
- [You can now pass multiple lint flags to rustc to override the previous
  flags.][67885] For example; `rustc -D unused -A unused-variables` denies
  everything in the `unused` lint group except `unused-variables` which
  is explicitly allowed. However, passing `rustc -A unused-variables -D unused` denies
  everything in the `unused` lint group **including** `unused-variables` since
  the allow flag is specified before the deny flag (and therefore overridden).
- [rustc will now prefer your system MinGW libraries over its bundled libraries
  if they are available on `windows-gnu`.][67429]
- [rustc now buffers errors/warnings printed in JSON.][69227]

Libraries
---------
- [`Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement
  `TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>`
  respectively.][69538] **Note** These conversions are only available when `N`
  is `0..=32`.
- [You can now use associated constants on floats and integers directly, rather
  than having to import the module.][68952] e.g. You can now write `u32::MAX` or
  `f32::NAN` with no imports.
- [`u8::is_ascii` is now `const`.][68984]
- [`String` now implements `AsMut<str>`.][68742]
- [Added the `primitive` module to `std` and `core`.][67637] This module
  reexports Rust's primitive types. This is mainly useful in macros
  where you want avoid these types being shadowed.
- [Relaxed some of the trait bounds on `HashMap` and `HashSet`.][67642]
- [`string::FromUtf8Error` now implements `Clone + Eq`.][68738]

Stabilized APIs
---------------
- [`Once::is_completed`]
- [`f32::LOG10_2`]
- [`f32::LOG2_10`]
- [`f64::LOG10_2`]
- [`f64::LOG2_10`]
- [`iter::once_with`]

Cargo
-----
- [You can now set config `[profile]`s in your `.cargo/config`, or through
  your environment.][cargo/7823]
- [Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a binary's
  executable path when running integration tests or benchmarks.][cargo/7697]
  `<name>` is the name of your binary as-is e.g. If you wanted the executable
  path for a binary named `my-program`you would use
  `env!("CARGO_BIN_EXE_my-program")`.

Misc
----
- [Certain checks in the `const_err` lint were deemed unrelated to const
  evaluation][69185], and have been moved to the `unconditional_panic` and
  `arithmetic_overflow` lints.

Compatibility Notes
-------------------

- [Having trailing syntax in the `assert!` macro is now a hard error.][69548]
  This has been a warning since 1.36.0.
- [Fixed `Self` not having the correctly inferred type.][69340] This incorrectly
  led to some instances being accepted, and now correctly emits a hard error.

[69340]: rust-lang/rust#69340

Internal Only
-------------
These changes provide no direct user facing benefits, but represent significant
improvements to the internals and overall performance of `rustc` and
related tools.

- [All components are now built with `opt-level=3` instead of `2`.][67878]
- [Improved how rustc generates drop code.][67332]
- [Improved performance from `#[inline]`-ing certain hot functions.][69256]
- [traits: preallocate 2 Vecs of known initial size][69022]
- [Avoid exponential behaviour when relating types][68772]
- [Skip `Drop` terminators for enum variants without drop glue][68943]
- [Improve performance of coherence checks][68966]
- [Deduplicate types in the generator witness][68672]
- [Invert control in struct_lint_level.][68725]

[67332]: rust-lang/rust#67332
[67429]: rust-lang/rust#67429
[67637]: rust-lang/rust#67637
[67642]: rust-lang/rust#67642
[67878]: rust-lang/rust#67878
[67885]: rust-lang/rust#67885
[68129]: rust-lang/rust#68129
[68672]: rust-lang/rust#68672
[68725]: rust-lang/rust#68725
[68728]: rust-lang/rust#68728
[68738]: rust-lang/rust#68738
[68742]: rust-lang/rust#68742
[68764]: rust-lang/rust#68764
[68772]: rust-lang/rust#68772
[68943]: rust-lang/rust#68943
[68952]: rust-lang/rust#68952
[68966]: rust-lang/rust#68966
[68984]: rust-lang/rust#68984
[69022]: rust-lang/rust#69022
[69185]: rust-lang/rust#69185
[69194]: rust-lang/rust#69194
[69201]: rust-lang/rust#69201
[69227]: rust-lang/rust#69227
[69548]: rust-lang/rust#69548
[69256]: rust-lang/rust#69256
[69361]: rust-lang/rust#69361
[69366]: rust-lang/rust#69366
[69538]: rust-lang/rust#69538
[cargo/7823]: rust-lang/cargo#7823
[cargo/7697]: rust-lang/cargo#7697
[`Once::is_completed`]: https://doc.rust-lang.org/std/sync/struct.Once.html#method.is_completed
[`f32::LOG10_2`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG10_2.html
[`f32::LOG2_10`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG2_10.html
[`f64::LOG10_2`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG10_2.html
[`f64::LOG2_10`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG2_10.html
[`iter::once_with`]: https://doc.rust-lang.org/std/iter/fn.once_with.html
matklad added a commit to matklad/rust-analyzer that referenced this pull request Jun 15, 2020
brendanzab added a commit to pikelet-lang/pikelet that referenced this pull request Aug 21, 2020
This fixes the build with flexi_logger, which was failing due to a usage of attributes on if expressions (permitted in rust-lang/rust#69201).
Havvy pushed a commit to Havvy/reference that referenced this pull request Aug 25, 2020
@pm100 pm100 mentioned this pull request Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow #[attr] if to be passed to proc macros
9 participants