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
81a964c23ea4fe9ab52b4449bb166bf280035797
rust/tests/ui/tuple/tuple-struct-fields/test.rs

10 lines
246 B
Rust
Raw Normal View History

Add tests
2016-04-23 06:22:38 +00:00
mod foo {
type T = ();
Add diagnostic for incorrect `pub (restriction)` 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-17 21:13:00 -07:00
struct S1(pub(in foo) (), pub(T), pub(crate) (), pub(((), T)));
struct S2(pub((foo)) ());
Changed a few tests, and changed the folder of a few of them.
2018-06-04 22:35:39 -04:00
//~^ ERROR expected one of `)` or `,`, found `(`
Update tests for less noisy error messages
2017-10-25 07:39:15 +11:00
//~| ERROR cannot find type `foo` in this scope
Add tests
2016-04-23 06:22:38 +00:00
}
cleanup: Add main functions to some UI tests
2018-08-23 02:19:38 +03:00
fn main() {}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3952ms 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