Skip to content

Commit

Permalink
Rollup merge of rust-lang#85439 - mgacek8:add_diagnostic_item_to_CStr…
Browse files Browse the repository at this point in the history
…_type, r=davidtwco

Add diagnostic item to `CStr`

Required for clippy issue: rust-lang/rust-clippy#7145
  • Loading branch information
RalfJung committed May 19, 2021
2 parents c1c4cd5 + d730cc6 commit 1207b7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ symbols! {
Borrow,
Break,
C,
CStr,
CString,
Center,
Clone,
Expand Down
1 change: 1 addition & 0 deletions library/std/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ pub struct CString {
///
/// [`&str`]: prim@str
#[derive(Hash)]
#[cfg_attr(not(test), rustc_diagnostic_item = "CStr")]
#[stable(feature = "rust1", since = "1.0.0")]
// FIXME:
// `fn from` in `impl From<&CStr> for Box<CStr>` current implementation relies
Expand Down

0 comments on commit 1207b7f

Please sign in to comment.