about summary refs log tree commit diff
path: root/src/test/compile-fail/privacy/restricted
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-184/+0
2018-06-04Changed a few tests, and changed the folder of a few of them.Crazycolorz5-61/+0
2018-01-15Reexport -> re-export in error messagesCarol (Nichols || Goulding)-1/+1
2017-10-28Auto merge of #45503 - thombles:tk/i44339-v5, r=petrochenkovbors-3/+1
Improve diagnostics when list of tokens has incorrect separators Make `parse_seq_to_before_tokens` more resilient to error conditions. Where possible it is better if it can consume up to the final bracket before returning. This change improves the diagnostics in a couple of situations: ``` struct S(pub () ()); // omitted separator use std::{foo. bar}; // used a similar but wrong separator ``` Fixes #44339 r? @petrochenkov
2017-10-25Update tests for less noisy error messagesThomas Karpiniec-3/+1
2017-10-22`crate` shorthand visibility modifierZack M. Davis-1/+11
With regrets, this breaks rustfmt and rls. This is in the matter of #45388.
2017-07-27Give span to angle bracketed generic argumentsVadim Petrochenkov-23/+0
2017-07-27Discern between `Path` and `Path<>` in ASTVadim Petrochenkov-1/+5
2017-05-30Turn sufficiently old compatibility lints into hard errorsVadim Petrochenkov-2/+0
2017-03-22Add diagnostic for incorrect `pub (restriction)`Esteban Küber-9/+12
Given the following statement ```rust pub (a) fn afn() {} ``` Provide the following diagnostic: ```rust error: incorrect restriction in `pub` --> file.rs:15:1 | 15 | pub (a) fn afn() {} | ^^^^^^^ | = help: some valid visibility restrictions are: `pub(crate)`: visible only on the current crate `pub(super)`: visible only in the current module's parent `pub(in path::to::module)`: visible only on the specified path help: to make this visible only to module `a`, add `in` before the path: | pub (in a) fn afn() {} ``` Remove cruft from old `pub(path)` syntax.
2017-03-21Refactor parsing of trait object typesVadim Petrochenkov-6/+6
2017-03-17Make priv in pub hard error for crates using pub(restricted)Taylor Cramer-4/+0
2017-03-15Stabilize pub(restricted)Taylor Cramer-41/+4
2017-03-10Update syntax for `pub(restricted)`Vadim Petrochenkov-11/+6
2017-01-14Auto merge of #38914 - est31:tidy-gate-tests, r=nikomatsakisbors-0/+2
Make tidy check for lang gate tests Add gate tests to the checks that tidy performs. Excerpt from the commit message of the main commit: Require compile-fail tests for new lang features Its non trivial to test lang feature gates, and people forget to add such tests. So we extend the features lint of the tidy tool to ensure that all new lang features contain a new compile-fail test. Of course, one could drop this requirement and just grep all tests in run-pass for #![feature(abc)] and then run this test again, removing the mention, requiring that it fails. But this only tests for the existence of a compilation failure. Manual tests ensure that also the correct lines spawn the error, and also test the actual error message. For library features, it makes no sense to require such a test, as here code is used that is generic for all library features. The tidy lint extension now checks the compile-fail test suite for occurences of "gate-test-X" where X is a feature. Alternatively, it also accepts file names with the form "feature-gate-X.rs". If a lang feature is found that has no such check, we emit a tidy error. I've applied the markings to all tests I could find in the test suite. I left a small (20 elements) whitelist of features that right now have no gate test, or where I couldn't find one. Once this PR gets merged, I'd like to close issue #22820 and open a new one on suggestion of @nikomatsakis to track the removal of all elements from that whitelist (already have a draft). Writing such a small test can be a good opportunity for a first contribution, so I won't touch it (let others have the fun xD). cc @brson , @pnkfelix (they both discussed about this in the issue linked above).
2017-01-12Mark even more tests as gate testsest31-0/+2
Now, no feature outside of the whitelist is without a test marked as its gate test.
2017-01-12resolve: Do not use "resolve"/"resolution" in error messagesVadim Petrochenkov-1/+1
2016-12-26More systematic error reporting in path resolutionVadim Petrochenkov-3/+3
2016-08-26Stabilize type-macrosDaniele Baracchi-3/+3
Closes #27245
2016-05-28Move some other checks to AST sanity passVadim Petrochenkov-0/+2
2016-05-06s/aux/auxiliary, because windowsNiko Matsakis-0/+0
For legacy reasons (presumably), Windows does not permit files name aux.
2016-05-06move auxiliary builds to a test-relative `aux`Niko Matsakis-0/+23
Instead of finding aux-build files in `auxiliary`, we now search for an `aux` directory relative to the test. So if your test is `compile-fail/foo.rs`, we would look in `compile-fail/aux`. Similarly, we ignore the `aux` directory when searching for tets.
2016-04-27Add testsJeffrey Seyfried-0/+70
2016-04-24syntax: Check paths in visibilities for type parametersVadim Petrochenkov-0/+20
syntax: Merge PathParsingMode::NoTypesAllowed and PathParsingMode::ImportPrefix syntax: Rename PathParsingMode and its variants to better express their purpose syntax: Remove obsolete error message about 'self lifetime syntax: Remove ALLOW_MODULE_PATHS workaround syntax/resolve: Adjust some error messages resolve: Compare unhygienic (not renamed) names with keywords::Invalid, invalid identifiers may appear to be valid after renaming
2016-04-21fix broken test revealed by compiletestNiko Matsakis-1/+3
2016-04-16Add tests for `pub(restricted)`Jeffrey Seyfried-0/+182