about summary refs log tree commit diff
path: root/src/test/ui/macros
AgeCommit message (Collapse)AuthorLines
2017-11-09Allow a trailing comma in assert_eq/ne macroKonrad Borowski-42/+0
2017-11-06Update tests for new format! error messageTommy Ip-1/+1
2017-09-03Fix testbjorn3-1/+0
2017-09-02Fix tidy errorbjorn3-1/+1
2017-09-02Better trace-macro and less span_err_fatalbjorn3-39/+10
2017-09-02Dont abort on first macro errorbjorn3-0/+136
2017-07-26Rollup merge of #43447 - estebank:import-span, r=nikomatsakisMark Simulacrum-1/+1
Point at path segment on module not found Point at the correct path segment on a import statement where a module doesn't exist. New output: ```rust error[E0432]: unresolved import `std::bar` --> <anon>:1:10 | 1 | use std::bar::{foo1, foo2}; | ^^^ Could not find `bar` in `std` ``` instead of: ```rust error[E0432]: unresolved import `std::bar::foo1` --> <anon>:1:16 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` error[E0432]: unresolved import `std::bar::foo2` --> <anon>:1:22 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` ``` Fix #43040.
2017-07-25Point at path segment on module not foundEsteban Küber-1/+1
Point at the correct path segment on a import statement where a module doesn't exist. New output: ```rust error[E0432]: unresolved import `std::bar` --> <anon>:1:10 | 1 | use std::bar::{foo1, foo2}; | ^^^ Could not find `bar` in `std` ``` instead of: ```rust error[E0432]: unresolved import `std::bar::foo1` --> <anon>:1:16 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` error[E0432]: unresolved import `std::bar::foo2` --> <anon>:1:22 | 1 | use std::bar::{foo1, foo2}; | ^^^^ Could not find `bar` in `std` ```
2017-07-21More testsPerry Fraser-0/+80
2017-07-18Change the error message for multiple unused print paramsPerry Fraser-16/+5
2017-07-17Change some helps to suggestionsOliver Schneider-8/+4
2017-07-17Move some tests from compile-fail to uiOliver Schneider-0/+64
2017-07-07Fold E0613 into E0609boreeas-2/+2
Resolves #42945
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-5/+5
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-15Add E0613Guillaume Gomez-2/+2
2017-06-15Add E0612Guillaume Gomez-2/+2
2017-06-12Add E0610Guillaume Gomez-2/+2
2017-06-11Add E0609Guillaume Gomez-2/+2
2017-05-29Auto merge of #42264 - GuillaumeGomez:new-error-codes, r=Susurrusbors-2/+2
New error codes Part of #42229.
2017-05-27Add new error codes and update testsGuillaume Gomez-2/+2
2017-05-27Auto merge of #42103 - jorendorff:master, r=estebankbors-2/+5
trace_macro: Show both the macro call and its expansion. #42072. See #42072 for the initial motivation behind this. The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
2017-05-24Change error count messagesMichael Kohl-5/+5
See #33525 for details.
2017-05-19trace_macro: Show both the macro call and its expansion. #42072.Jason Orendorff-2/+5
2017-05-06Group "macro expansion" notes per call spanEsteban Küber-10/+7
2017-05-05Use diagnostics for trace_macro instead of printlnEsteban Küber-0/+27
2017-03-29Refactor how spans are combined in the parser.Jeffrey Seyfried-4/+1
2017-02-06improve error message when two-arg assert_eq! receives a trailing commaZack M. Davis-0/+38
Previously, `assert_eq!(left, right,)` (respectively, `assert_ne!(left, right,)`; note the trailing comma) would result in a confusing "requires at least a format string argument" error. In reality, a format string is optional, but the trailing comma puts us into the "match a token tree of zero or more tokens" branch of the macro (in order to support the optional format string), and passing the empty token tree into `format_args!` results in the confusing error. If instead we match a token tree of one or more tokens, we get a much more sensible "unexpected end of macro invocation" error. While we're here, fix up a stray space before a comma in the match guards. Resolves #39369.
2017-01-12resolve: Do not use "resolve"/"resolution" in error messagesVadim Petrochenkov-4/+4
2016-12-26More systematic error reporting in path resolutionVadim Petrochenkov-4/+4
2016-12-16Allow path fragments to be parsed as type parameter bounds in macro expansionKalita Alexey-0/+30
2016-11-11Add foreign formatting directive detection.Daniel Keep-0/+72
This teaches `format_args!` how to interpret format printf- and shell-style format directives. This is used in cases where there are unused formatting arguments, and the reason for that *might* be because the programmer is trying to use the wrong kind of formatting string. This was prompted by an issue encountered by simulacrum on the #rust IRC channel. In short: although `println!` told them that they weren't using all of the conversion arguments, the problem was in using printf-syle directives rather than ones `println!` would undertand. Where possible, `format_args!` will tell the programmer what they should use instead. For example, it will suggest replacing `%05d` with `{:0>5}`, or `%2$.*3$s` with `{1:.3$}`. Even if it cannot suggest a replacement, it will explicitly note that Rust does not support that style of directive, and direct the user to the `std::fmt` documentation.
2016-10-02Improve error message and snippet for "did you mean `x`"Gavin Baker-6/+6
- Fixes #36164 - Part of #35233 - handles unknown fields - uses UI-style tests - update all related tests (cfail, ui, incremental)
2016-09-26Update E0425, E0446, E0449Jonathan Turner-2/+2
2016-08-17Replace local backtrace with def-use, repair std macro spansJonathan Turner-0/+223