Skip to content

Commit f046532

Browse files
committed
Auto merge of #29980 - Manishearth:missing-diag, r=eddyb
None
2 parents ced9ad3 + bef9355 commit f046532

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src/librustc/diagnostics.rs

+3
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,9 @@ It is also possible to manually transmute:
858858
```
859859
ptr::read(&v as *const _ as *const SomeType) // `v` transmuted to `SomeType`
860860
```
861+
862+
Note that this does not move `v` (unlike `transmute`), and may need a
863+
call to `mem::forget(v)` in case you want to avoid destructors being called.
861864
"##,
862865

863866
E0152: r##"

src/librustc_driver/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,8 @@ pub fn diagnostics_registry() -> diagnostics::registry::Registry {
907907
all_errors.push_all(&rustc_typeck::DIAGNOSTICS);
908908
all_errors.push_all(&rustc_borrowck::DIAGNOSTICS);
909909
all_errors.push_all(&rustc_resolve::DIAGNOSTICS);
910+
all_errors.push_all(&rustc_privacy::DIAGNOSTICS);
911+
all_errors.push_all(&rustc_trans::DIAGNOSTICS);
910912

911913
Registry::new(&*all_errors)
912914
}

src/librustc_privacy/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1505,3 +1505,5 @@ pub fn check_crate(tcx: &ty::ctxt,
15051505

15061506
access_levels
15071507
}
1508+
1509+
__build_diagnostic_array! { librustc_privacy, DIAGNOSTICS }

src/librustc_trans/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,5 @@ pub mod save;
8989
pub mod lib {
9090
pub use llvm;
9191
}
92+
93+
__build_diagnostic_array! { librustc_trans, DIAGNOSTICS }

0 commit comments

Comments
 (0)