Rollup merge of #82057 - upsuper-forks:cstr, r=davidtwco,wesleywiser
Replace const_cstr with cstr crate This PR replaces the `const_cstr` macro inside `rustc_data_structures` with `cstr` macro from [cstr](https://crates.io/crates/cstr) crate. The two macros basically serve the same purpose, which is to generate `&'static CStr` from a string literal. `cstr` is better because it validates the literal at compile time, while the existing `const_cstr` does it at runtime when `debug_assertions` is enabled. In addition, the value `cstr` generates can be used in constant context (which is seemingly not needed anywhere currently, though).
This commit is contained in:
commit
cabe97272d
11 changed files with 42 additions and 60 deletions
|
@ -69,7 +69,6 @@ pub mod base_n;
|
|||
pub mod binary_search_util;
|
||||
pub mod box_region;
|
||||
pub mod captures;
|
||||
pub mod const_cstr;
|
||||
pub mod flock;
|
||||
pub mod functor;
|
||||
pub mod fx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue