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
a5c52c72ae3c1d8b3896756541b115a1d5ea94b7
rust/src/test/ui/tuple/tuple-struct-fields/test3.rs

13 lines
246 B
Rust
Raw Normal View History

Add tests
2016-04-23 06:22:38 +00:00
macro_rules! define_struct {
($t:ty) => {
struct S1(pub($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 S2(pub (in foo) ());
struct S3(pub($t) ());
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 `(`
Add tests
2016-04-23 06:22:38 +00:00
}
}
mod foo {
define_struct! { foo }
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 1055ms 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