-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #239 from dtolnay/quotespanned
Generalize quote_spanned to accept DelimSpan as span
- Loading branch information
Showing
3 changed files
with
31 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
error[E0308]: mismatched types | ||
error[E0277]: the trait bound `&str: IntoSpan` is not satisfied | ||
--> tests/ui/wrong-type-span.rs:6:20 | ||
| | ||
6 | quote_spanned!(span=> #x); | ||
| ---------------^^^^------ | ||
| | | | ||
| | expected `Span`, found `&str` | ||
| expected due to this | ||
| | the trait `IntoSpan` is not implemented for `&str` | ||
| required by a bound introduced by this call | ||
| | ||
= help: the following other types implement trait `IntoSpan`: | ||
Span | ||
proc_macro2::extra::DelimSpan |