Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
rust/tests/ui/proc-macro/negative-token.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
188 B
Rust
Raw Normal View History

tests: Add missing run-pass annotations
2019-07-27 00:54:25 +03:00
//@ run-pass
Update tests to use new proc-macro header
2024-11-24 17:37:25 -08:00
//@ proc-macro: negative-token.rs
proc_macro: Tweak doc comments and negative literals This commit tweaks the tokenization of a doc comment to use `#[doc = "..."]` like `macro_rules!` does (instead of treating it as a `Literal` token). Additionally it fixes treatment of negative literals in the compiler, for exapmle `Literal::i32(-1)`. The current fix is a bit of a hack around the current compiler implementation, providing a fix at the proc-macro layer rather than the libsyntax layer.
2018-03-30 02:55:54 -07:00
extern crate negative_token;
use negative_token::*;
fn main() {
assert_eq!(-1, neg_one!());
assert_eq!(-1.0, neg_one_float!());
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2516ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API