summary refs log tree commit diff
path: root/src/test/ui/macros
AgeCommit message (Collapse)AuthorLines
2018-11-25resolve: Suggest `crate::` for resolving ambiguities when appropriateVadim Petrochenkov-0/+42
More precise spans for ambiguities from macros
2018-11-17resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-16/+16
2018-11-17resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-1/+1
2018-11-17resolve: Check resolution consistency for import paths and multi-segment ↵Vadim Petrochenkov-4/+5
macro paths
2018-11-17resolve: Improve diagnostics for resolution ambiguitiesVadim Petrochenkov-70/+56
2018-11-07enforce unused-must-use lint in macrosAlex Burka-0/+31
2018-10-29resolve: More precise spans for privacy errorsVadim Petrochenkov-2/+2
2018-10-24Add `extern crate` items to extern preludeVadim Petrochenkov-4/+0
2018-10-12Add missing lifetime fragment specifier to error message.Eric Huss-1/+1
A very minor issue, `lifetime` was missing from the error list. I left `literal` in the list, even though it is unstable. It looks like it may stabilize soon anyways.
2018-10-10Remove incorrect span for second label inner macro invocationholmgr-3/+0
2018-10-07Auto merge of #54813 - petrochenkov:uilocale, r=alexcrichtonbors-28/+17
Fix two UI tests with locale-dependent output Closes https://github.com/rust-lang/rust/issues/54719
2018-10-05make `Parser::parse_foreign_item()` return a foreign item or errorAustin Bonander-0/+27
closes #54441
2018-10-05Fix two UI tests with locale-dependent outputVadim Petrochenkov-28/+17
2018-10-03resolve: Prefer `macro_rules` definitions to in-module macro definitions in ↵Vadim Petrochenkov-0/+83
some cases
2018-09-22Stabilize crate_in_paths, extern_absolute_paths and extern_prelude on all ↵Eduard-Mihai Burtescu-0/+8
editions.
2018-09-16Auto merge of #54157 - euclio:structured-suggestion, r=estebankbors-1/+1
use structured suggestion for "missing mut" label Fixes #54133 for both NLL and non-NLL. r? @estebank I'm not super happy with the existing wording here, since it's now a suggestion. I wonder if the message would work better as something like "help: make binding mutable: `mut foo`"? Also, are the `HELP` and `SUGGESTION` comments necessary?
2018-09-13resolve: Introduce two sub-namespaces in macro namespaceVadim Petrochenkov-21/+14
2018-09-12use structured suggestion for "missing mut" labelAndy Russell-1/+1
Fixes #54133.
2018-09-08resolve: More precise spans for ambiguous resolution errorsVadim Petrochenkov-34/+16
Add labels to ambiguous resolution errors
2018-09-08Add checks for expected macro output in restricted shadowing testsVadim Petrochenkov-116/+132
2018-09-08Add test cases for possible restricted shadowing configurationsVadim Petrochenkov-0/+876
Whitelist `#[rustc_transparent_macro]` so it's not interpreted as a potential attribute macro
2018-09-08resolve: Relax shadowing restriction on macro-expanded macrosVadim Petrochenkov-26/+42
... for both legacy and modern macros. Fix previously introduced regressions, add tests.
2018-09-08resolve: Model shadowing restriction for macro_rules after modern macrosVadim Petrochenkov-2/+26
This is a regression for legacy macros that will be fixed in the next commit
2018-09-08resolve: Model `resolve_legacy_scope` after `resolve_lexical_macro_path_segment`Vadim Petrochenkov-5/+16
2018-08-31cleanup: Add main functions to some UI testsVadim Petrochenkov-14/+8
2018-08-20resolve: Consolidate error reporting for resolved macros in `fn ↵Vadim Petrochenkov-2/+2
resolve_macro_to_def`
2018-08-17Auto merge of #50911 - petrochenkov:macuse, r=alexcrichtonbors-66/+17
Stabilize `use_extern_macros` Closes https://github.com/rust-lang/rust/issues/35896
2018-08-17Rollup merge of #53413 - eddyb:featured-in-the-latest-edition, r=varkorCorey Farwell-5/+5
Warn that `#![feature(rust_2018_preview)]` is implied when the edition is set to Rust 2018. cc @varkor @petrochenkov @joshtriplett
2018-08-17Stabilize `use_extern_macros`Vadim Petrochenkov-66/+17
2018-08-17Rollup merge of #53412 - eddyb:stage-who, r=alexcrichtonkennytm-16/+15
syntax_ext: remove leftover span_err_if_not_stage0 macro. I believe this is the right fix for #53380, although I'm not sure what happened. My guess is this copy of the macro was accidentally missed when others were removed? cc @matthewjasper @varkor (please do not put this in a rollup, in case it fails)
2018-08-16Auto merge of #53256 - ollie27:writeln, r=KodrAusbors-0/+53
Don't accept non-string literals for the format string in writeln This is to improve diagnostics. `println` and `eprintln` were already fixed by #52394. Fixes #30143
2018-08-16tests: prefer edition: directives to compile-flags:--edition.Eduard-Mihai Burtescu-5/+5
2018-08-16Auto merge of #53293 - petrochenkov:gramattr2, r=alexcrichtonbors-8/+7
syntax: Enforce attribute grammar in the parser Also fix feature-gating for `unrestricted_attribute_tokens` that was introduced in https://github.com/rust-lang/rust/pull/53270, but was actually broken. cc https://github.com/rust-lang/rust/pull/50911
2018-08-16Revert "Ignore test that fails on stage1"Eduard-Mihai Burtescu-16/+15
This reverts commit 0e43e6fef251732f5268738eee9c258668ec7942.
2018-08-14Ignore test that fails on stage1Matthew Jasper-15/+16
2018-08-15syntax: Enforce attribute grammar in the parserVadim Petrochenkov-8/+7
2018-08-14Fixed 'no such file or directory' mismatch between Windows and Linux.David Wood-15/+18
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+2381
2018-08-10Don't accept none str literals for the format string in writelnOliver Middleton-0/+53
2018-08-07Suggest comma when missing in macro callEsteban Küber-4/+36
When missing a comma in a macro call, suggest it, regardless of position. When a macro call doesn't match any of the patterns, check if the call's token stream could be missing a comma between two idents, and if so, create a new token stream containing the comma and try to match against the macro patterns. If successful, emit the suggestion.
2018-08-06Point at correct span when missing comma in `println`Esteban Küber-7/+19
2018-08-06Suggest comma when writing `println!("{}" a);`Esteban Küber-0/+24
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-4/+1
2018-07-31Use suggestions for shell format argumentsEsteban Küber-5/+24
2018-07-26Rollup merge of #52649 - estebank:fmt-span, r=oli-obkMark Rousskov-13/+43
Point spans to inner elements of format strings - Point at missing positional specifiers in string literal ``` error: invalid reference to positional arguments 3, 4 and 5 (there are 3 arguments) --> $DIR/ifmt-bad-arg.rs:34:38 | LL | format!("{name} {value} {} {} {} {} {} {}", 0, name=1, value=2); | ^^ ^^ ^^ | = note: positional arguments are zero-based ``` - Point at named formatting specifier in string literal ``` error: there is no argument named `foo` --> $DIR/ifmt-bad-arg.rs:37:17 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | ^^^^^ ``` - Update label for formatting string in "multiple unused formatting arguments" to be more correct ``` error: multiple unused formatting arguments --> $DIR/ifmt-bad-arg.rs:42:17 | LL | format!("", 1, 2); //~ ERROR: multiple unused formatting arguments | -- ^ ^ | | | multiple missing formatting specifiers ``` - When using `printf` string formatting, provide a structured suggestion instead of a note ``` error: multiple unused formatting arguments --> $DIR/format-foreign.rs:12:30 | LL | println!("%.*3$s %s!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments | -------------- ^^^^^^^^ ^^^^^^^ ^ | | | multiple missing formatting specifiers | = note: printf formatting not supported; see the documentation for `std::fmt` help: format specifiers in Rust are written using `{}` | LL | println!("{:.2$} {}!/n", "Hello,", "World", 4); //~ ERROR multiple unused formatting arguments | ^^^^^^ ^^ ```
2018-07-24Add span label for format str missing specifierEsteban Küber-5/+9
2018-07-24Use suggestions for `printf` formatEsteban Küber-7/+33
2018-07-24Reword missing formatting arguments labelEsteban Küber-4/+4
2018-07-23Allow by default, fix testsmark-2/+18
2018-07-23Implement 2015 vs 2018 `?` kleene op + testmark-133/+376