Commit c2dbfa6
authored
Rollup merge of rust-lang#49035 - klnusbaum:49001_epoch, r=Manishearth
rename epoch to edition
As outlined in rust-lang#49001 we'd like to rename all instances of `epoch` to `edition`. I developed the following bash script to assist in the rename. It renames all instances of `epoch` to `edition` and `Epoch` to `Edition` in all of the files I was able to determine were relevant. It then renames a few relevant files that had `epoch` in there name and finally prints out all of the remaining instance of the strings `epoch` and `Epoch` (which, as far as I can tell should not be changed). Here is the script:
```
replace() {
sed -i '' "s/epoch/edition/g" "$1"
sed -i '' "s/Epoch/Edition/g" "$1"
}
replace "src/librustc/lint/context.rs"
replace "src/librustc/lint/mod.rs"
replace "src/librustc/session/config.rs"
replace "src/librustc/session/mod.rs"
replace "src/librustc_driver/driver.rs"
replace "src/librustc_lint/lib.rs"
replace "src/librustc_typeck/check/method/probe.rs"
replace "src/libsyntax/config.rs"
replace "src/libsyntax/epoch.rs"
replace "src/libsyntax/feature_gate.rs"
replace "src/libsyntax/lib.rs"
replace "src/test/compile-fail/epoch-raw-pointer-method-2015.rs"
replace "src/test/compile-fail/epoch-raw-pointer-method-2018.rs"
replace "src/test/run-pass/dyn-trait.rs"
replace "src/test/run-pass/epoch-gate-feature.rs"
replace "src/test/ui/inference-variable-behind-raw-pointer.stderr"
git mv src/libsyntax/epoch.rs src/libsyntax/edition.rs
git mv src/test/compile-fail/epoch-raw-pointer-method-2015.rs src/test/compile-fail/edition-raw-pointer-method-2015.rs
git mv src/test/compile-fail/epoch-raw-pointer-method-2018.rs src/test/compile-fail/edition-raw-pointer-method-2018.rs
git grep "epoch" ./*
git grep "Epoch" ./*
```
And here is the output of the script:
```
kurtis-rust$ ./epoch_to_edition.sh
src/Cargo.lock: "crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
src/Cargo.lock:name = "crossbeam-epoch"
src/Cargo.lock:"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552"
src/ci/docker/scripts/android-start-emulator.sh:# Using the default qemu2 engine makes time::tests::since_epoch fails because
src/ci/docker/scripts/android-start-emulator.sh:# the emulator date is set to unix epoch (in armeabi-v7a-18 image). Using
src/librustc_incremental/persist/fs.rs: let micros_since_unix_epoch = u64::from_str_radix(s, INT_ENCODE_BASE as u32);
src/librustc_incremental/persist/fs.rs: if micros_since_unix_epoch.is_err() {
src/librustc_incremental/persist/fs.rs: let micros_since_unix_epoch = micros_since_unix_epoch.unwrap();
src/librustc_incremental/persist/fs.rs: let duration = Duration::new(micros_since_unix_epoch / 1_000_000,
src/librustc_incremental/persist/fs.rs: 1000 * (micros_since_unix_epoch % 1_000_000) as u32);
src/libstd/sys/cloudabi/abi/cloudabi.rs: /// The epoch of this clock is undefined. The absolute
src/libstd/time.rs: let one_second_from_epoch = UNIX_EPOCH + Duration::new(1, 0);
src/libstd/time.rs: let one_second_from_epoch2 = UNIX_EPOCH + Duration::new(0, 500_000_000)
src/libstd/time.rs: assert_eq!(one_second_from_epoch, one_second_from_epoch2);
src/libstd/time.rs: fn since_epoch() {
src/test/run-pass/issue-29540.rs: pub mon_min_osdmap_epochs: String,
src/test/run-pass/issue-29540.rs: pub mon_max_pgmap_epochs: String,
src/test/run-pass/issue-29540.rs: pub mon_max_log_epochs: String,
src/test/run-pass/issue-29540.rs: pub mon_max_mdsmap_epochs: String,
src/test/run-pass/issue-29540.rs: pub osd_map_share_max_epochs: String,
src/test/run-pass/issue-29540.rs: pub osd_pg_epoch_persisted_max_stale: String,
```
If it looks like I've missed any things that should be converted, please let me know. There were also some notes in `src/libsyntax/epoch.rs` that indicated there might be some necessary/parallel changes that need to made in cargo. But we should probably make a separate issue for that.File tree
16 files changed
+95
-95
lines changed- src
- librustc_driver
- librustc_lint
- librustc_typeck/check/method
- librustc
- lint
- session
- libsyntax
- test
- compile-fail
- run-pass
- ui
16 files changed
+95
-95
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
| 204 | + | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
503 | | - | |
| 502 | + | |
| 503 | + | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
| 986 | + | |
987 | 987 | | |
988 | 988 | | |
989 | | - | |
990 | | - | |
| 989 | + | |
| 990 | + | |
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
| |||
1280 | 1280 | | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
| |||
2258 | 2258 | | |
2259 | 2259 | | |
2260 | 2260 | | |
2261 | | - | |
| 2261 | + | |
2262 | 2262 | | |
2263 | 2263 | | |
2264 | 2264 | | |
| |||
2320 | 2320 | | |
2321 | 2321 | | |
2322 | 2322 | | |
2323 | | - | |
| 2323 | + | |
2324 | 2324 | | |
2325 | 2325 | | |
2326 | 2326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
979 | | - | |
| 979 | + | |
980 | 980 | | |
981 | | - | |
| 981 | + | |
982 | 982 | | |
983 | 983 | | |
984 | | - | |
985 | | - | |
| 984 | + | |
| 985 | + | |
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments