about summary refs log tree commit diff
path: root/src/test/compile-fail/method-macro-backtrace.rs
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-35/+0
2016-03-11Adjust tests to new error messageAaron Turon-1/+1
2015-09-10Don't print the macro definition site in backtracesJonas Schievink-1/+1
This halves the backtrace length. The definition site wasn't very useful anyways, since it may be invalid (for compiler expansions) or located in another crate. Since the macro name is still printed, grepping for it is still an easy way of finding the definition.
2015-02-24rustc_resolve: don't handle impl items as if they were modules.Eduard Burtescu-1/+1
2015-01-05Un-gate macro_rulesKeegan McAllister-2/+0
2015-01-05Modernize macro_rules! invocationsKeegan McAllister-3/+3
macro_rules! is like an item that defines a macro. Other items don't have a trailing semicolon, or use a paren-delimited body. If there's an argument for matching the invocation syntax, e.g. parentheses for an expr macro, then I think that applies more strongly to the *inner* delimiters on the LHS, wrapping the individual argument patterns.
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-9/+9
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-09-17Pop the expansion context after expanding a method macroKeegan McAllister-0/+37
We were leaving these on the stack, causing spurious backtraces. I've confirmed that this test fails without the fix.