Make meta-item API compatible with LocalInternedString::get soundness fix
This commit is contained in:
parent
7cf074a1e6
commit
db74efce69
17 changed files with 84 additions and 97 deletions
|
|
@ -576,8 +576,8 @@ fn expect_associated_value(tcx: TyCtxt<'_, '_, '_>, item: &NestedMetaItem) -> as
|
|||
if let Some(value) = item.value_str() {
|
||||
value
|
||||
} else {
|
||||
let msg = if let Some(name) = item.ident_str() {
|
||||
format!("associated value expected for `{}`", name)
|
||||
let msg = if let Some(ident) = item.ident() {
|
||||
format!("associated value expected for `{}`", ident)
|
||||
} else {
|
||||
"expected an associated value".to_string()
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue