-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test of the new attr and fix the breaking test
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
- Loading branch information
1 parent
5a014eb
commit 2361904
Showing
6 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// check-fail | ||
|
||
/// issue #95698 | ||
macro_rules! from_cow_impls { | ||
($( $from: ty ),+ $(,)? ) => { | ||
// recursion call | ||
from_cow_impls!( | ||
$( $from, Cow::from ),+ | ||
); | ||
//~^^^ ERROR expansion grow limit reached while expanding `from_cow_impls!` | ||
}; | ||
|
||
($( $from: ty, $normalizer: expr ),+ $(,)? ) => { | ||
$( impl<'a> From<$from> for LhsValue<'a> { | ||
fn from(val: $from) -> Self { | ||
LhsValue::Bytes($normalizer(val)) | ||
} | ||
} )+ | ||
}; | ||
} | ||
|
||
from_cow_impls!( | ||
&'a [u8], /*callback,*/ | ||
Vec<u8>, /*callback,*/ | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error: expansion grow limit reached while expanding `from_cow_impls!` | ||
--> $DIR/issue-95698.rs:7:9 | ||
| | ||
LL | / from_cow_impls!( | ||
LL | | $( $from, Cow::from ),+ | ||
LL | | ); | ||
| |_________^ | ||
... | ||
LL | / from_cow_impls!( | ||
LL | | &'a [u8], /*callback,*/ | ||
LL | | Vec<u8>, /*callback,*/ | ||
LL | | ); | ||
| |_- in this macro invocation | ||
| | ||
= help: consider increasing the expansion grow limit by adding a `#![expansion_growth_limit = "12000"]` attribute to your crate (`issue_95698`) | ||
= note: this error originates in the macro `from_cow_impls` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#![expansion_growth_limit = "16000"] | ||
// run-pass | ||
// ignore-tidy-linelength | ||
|
||
|