Skip to content

Commit

Permalink
Rollup merge of rust-lang#43292 - kennytm:fix-quasi-quoting-warning-i…
Browse files Browse the repository at this point in the history
…n-rustbuild, r=alexcrichton

Workaround "Quasi-quoting is inefficient" warning in incremental rustbuild introduced in rust-lang#43252.

After rust-lang#43252 is merged, building stage0 libcore with `-i` (`--incremental`) flag will cause 17 "Quasi-quoting might make incremental compilation very inefficient: NtExpr(..)" warnings, as in rust-lang#40946.

```
warning: Quasi-quoting might make incremental compilation very inefficient: NtExpr(..)
   --> src/libcore/default.rs:133:21
    |
133 |             #[doc = $doc]
    |                     ^^^^
...
139 | default_impl! { (), (), "Returns the default value of `()`" }
    | ------------------------------------------------------------- in this macro invocation
(× 17)
```

True fix for rust-lang#40946 will take at least 12 weeks from now to make into the next stage0, so it is quicker to workaround it in libcore instead.

cc @vbrandl @jseyfried
  • Loading branch information
Mark-Simulacrum authored Jul 18, 2017
2 parents 751c6e2 + 2d6c10f commit ac9e9e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub trait Default: Sized {
}

macro_rules! default_impl {
($t:ty, $v:expr, $doc:expr) => {
($t:ty, $v:expr, $doc:tt) => {
#[stable(feature = "rust1", since = "1.0.0")]
impl Default for $t {
#[inline]
Expand Down

0 comments on commit ac9e9e5

Please sign in to comment.