This repository was archived by the owner on Nov 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +126
-0
lines changed Expand file tree Collapse file tree 4 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 1+ * .recorded.json
2+ * .recorded.rs
Original file line number Diff line number Diff line change 1+ #![ allow( unused) ]
2+ #[ warn( rust_2018_migration) ]
3+
4+ mod private_mod {
5+ crate const FOO : & str = "BAR" ;
6+ }
7+
8+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ {
2+ "message" : " unreachable `pub` item" ,
3+ "code" : {
4+ "code" : " unreachable_pub" ,
5+ "explanation" : null
6+ },
7+ "level" : " warning" ,
8+ "spans" : [
9+ {
10+ "file_name" : " ./tests/edition/pub_crate.rs" ,
11+ "byte_start" : 70 ,
12+ "byte_end" : 98 ,
13+ "line_start" : 5 ,
14+ "line_end" : 5 ,
15+ "column_start" : 5 ,
16+ "column_end" : 33 ,
17+ "is_primary" : true ,
18+ "text" : [
19+ {
20+ "text" : " pub const FOO: &str = \" BAR\" ;" ,
21+ "highlight_start" : 5 ,
22+ "highlight_end" : 33
23+ }
24+ ],
25+ "label" : null ,
26+ "suggested_replacement" : null ,
27+ "expansion" : null
28+ }
29+ ],
30+ "children" : [
31+ {
32+ "message" : " lint level defined here" ,
33+ "code" : null ,
34+ "level" : " note" ,
35+ "spans" : [
36+ {
37+ "file_name" : " ./tests/edition/pub_crate.rs" ,
38+ "byte_start" : 25 ,
39+ "byte_end" : 44 ,
40+ "line_start" : 2 ,
41+ "line_end" : 2 ,
42+ "column_start" : 8 ,
43+ "column_end" : 27 ,
44+ "is_primary" : true ,
45+ "text" : [
46+ {
47+ "text" : " #[warn(rust_2018_migration)]" ,
48+ "highlight_start" : 8 ,
49+ "highlight_end" : 27
50+ }
51+ ],
52+ "label" : null ,
53+ "suggested_replacement" : null ,
54+ "expansion" : null
55+ }
56+ ],
57+ "children" : [],
58+ "rendered" : null
59+ },
60+ {
61+ "message" : " #[warn(unreachable_pub)] implied by #[warn(rust_2018_migration)]" ,
62+ "code" : null ,
63+ "level" : " note" ,
64+ "spans" : [],
65+ "children" : [],
66+ "rendered" : null
67+ },
68+ {
69+ "message" : " or consider exporting it for use by other crates" ,
70+ "code" : null ,
71+ "level" : " help" ,
72+ "spans" : [],
73+ "children" : [],
74+ "rendered" : null
75+ },
76+ {
77+ "message" : " consider restricting its visibility" ,
78+ "code" : null ,
79+ "level" : " help" ,
80+ "spans" : [
81+ {
82+ "file_name" : " ./tests/edition/pub_crate.rs" ,
83+ "byte_start" : 70 ,
84+ "byte_end" : 73 ,
85+ "line_start" : 5 ,
86+ "line_end" : 5 ,
87+ "column_start" : 5 ,
88+ "column_end" : 8 ,
89+ "is_primary" : true ,
90+ "text" : [
91+ {
92+ "text" : " pub const FOO: &str = \" BAR\" ;" ,
93+ "highlight_start" : 5 ,
94+ "highlight_end" : 8
95+ }
96+ ],
97+ "label" : null ,
98+ "suggested_replacement" : " crate" ,
99+ "suggestion_applicability" : " MachineApplicable" ,
100+ "expansion" : null
101+ }
102+ ],
103+ "children" : [],
104+ "rendered" : null
105+ }
106+ ],
107+ "rendered" : " warning: unreachable `pub` item\n --> ./tests/edition/pub_crate.rs:5:5\n |\n 5 | pub const FOO: &str = \" BAR\" ;\n | ---^^^^^^^^^^^^^^^^^^^^^^^^^\n | |\n | help: consider restricting its visibility: `crate`\n |\n note: lint level defined here\n --> ./tests/edition/pub_crate.rs:2:8\n |\n 2 | #[warn(rust_2018_migration)]\n | ^^^^^^^^^^^^^^^^^^^\n = note: #[warn(unreachable_pub)] implied by #[warn(rust_2018_migration)]\n = help: or consider exporting it for use by other crates\n\n "
108+ }
Original file line number Diff line number Diff line change 1+ #![ allow( unused) ]
2+ #[ warn( rust_2018_migration) ]
3+
4+ mod private_mod {
5+ pub const FOO : & str = "BAR" ;
6+ }
7+
8+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments